Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

QtWorkbench plugin

<< < (23/44) > >>

yop:
Thanks build succesfully in svn build rev 3223 (2006-11-15 22:32:19) gcc 4.1.2 Linux/unicode
Updated the svn sources as well.

joachim:
I have been trying a while to get the QTWorkbench plugin to work for me. Actually the one shot timer in qtworkbench seemed never to trigger and the menu remained grayed out after each compile. The only way to reset (That I could find) was to restart CB.

Anyway, I added the line
    m_Timer.SetOwner(this,idQtWbTimer); just before starting the timer in the OnProcessTerminated method. It actually made things work. :P See excerpt below. I could submit  a patch but it is really only one line to add.

When reading the wxWidgets documentation it seem like that line has to be called in order to direct the timer message.

void QtWorkbench::OnProcessTerminated(CodeBlocksEvent& event)
{
......
......
......
    wxMenuBar* mbar = Manager::Get()->GetAppWindow()->GetMenuBar();
    if (mbar)
    {
        mbar->Enable(idQtWbMenuCompile,false);
        mbar->Enable(idQtWbMenuClean,false);
        mbar->Enable(idQtWbMenuRebuild,false);
        mbar->Enable(idQtWbMenuDistClean,false);
        mbar->Enable(idQtWbMenuCompileWorkspace,false);
        mbar->Enable(idQtWbMenuRebuildWorkspace,false);
        mbar->Enable(idQtWbMenuCleanWorkspace,false);
    }

    m_Timer.SetOwner(this,idQtWbTimer); 
        m_Timer.Start(500,wxTIMER_ONE_SHOT);
}

Br Joachim

yop:
OK I commited this and it works, I haven't checked the build process lately and I don't know what has changed but in the make options I had to put a lot of sub-$target-[action] in order to make it build my project.

joachim:
Yes, and without the timer triggering, there was a lot of sub-sub-sub.... built up in the make command. Having passed that we have the next issue. I cannot debug. Actually, the debug command from the menu will first try to build using the regular make. This fails and debug is aborted. (I havent understood why it fails but it does complain about unexpected end of file) I wonder if there is a need to add a QTWorkBench debug command....

BUILD LOG:
/bin/sh: -c: line 2: syntax error: unexpected end of file
cd Debug && mingw32-make.exe debug
mingw32-make.exe: *** [Release\Makefile] Error 258
c:\devel\mingw\bin\mingw32-make.exe[1]: Entering directory `c:/SW_Dev/qt/Empire/Debug'
c:/devel/mingw/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[2]: Entering directory `c:/SW_Dev/qt/Empire/Debug'
mingw32-make.exe[2]: Nothing to be done for `first'.
mingw32-make.exe[2]: Leaving directory `c:/SW_Dev/qt/Empire/Debug'
c:\devel\mingw\bin\mingw32-make.exe[1]: Leaving directory `c:/SW_Dev/qt/Empire/Debug'
Process terminated with status 2 (0 minutes, 13 seconds)
0 errors, 0 warnings

DEBUGGER:
Building to ensure sources are up-to-date
Build failed...
Aborting debugging session
 
Br Joachim

yop:
I remember putting the sub- in front of the build targets before requesting to build a target but that is not quite enough. The right thing would be a correctly setup project with all the sub-[project]-[action] make targets already in the make commands list. Probably a c::b project template with an initial .pro file, custom makefile build auto selected and a qmake [project name] prebuild step would be quite enough if you can prepare your own .pro files.

The debug and many more issues have to do with the fact that c::b finds relative paths and initiates builds from the top level directory while qmake and make dive into subdirs. If you have many targets then you can' t even click on an error and go to the respective line/file. I guess this issue and possible solutions will be looked into by the c::b team.

As you can see by the activity in the svn this plugin is not one of my top priorities. I have after searching around and trying out stuff pretty much setup my workbench so this is not a necessity to me anymore. I want to pick it up again if I find the time.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version