Author Topic: QtWorkbench plugin  (Read 254423 times)

lgarrido

  • Guest
Re: QtWorkbench plugin
« Reply #30 on: April 10, 2006, 12:38:41 pm »
GOT IT!!! Turns out that the file qtworkbench_menu.xrc distributed contains a NUL (0x00) character near the end (how did _that_ ever got there?) and this drives nuts the XML parser, at least in Linux.

Once removed this character and rebuilt/reinstalled the zip file the plugin is loaded as expected. Now time to play with it!

Cheers,

Luis

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: QtWorkbench plugin
« Reply #31 on: April 10, 2006, 01:18:10 pm »
Turns out that the file qtworkbench_menu.xrc distributed contains a NUL (0x00) character near the end [...]
Now that you say this: Yes! That character I had to remove, too. Anyway: Within the archive I've uploaded in this forum  thread this character was already removed. Which version did you use for compiling? The same question I'd like to ask to yop...?!
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

lgarrido

  • Guest
Re: QtWorkbench plugin
« Reply #32 on: April 10, 2006, 01:29:05 pm »
Quote
Which version did you use for compiling?

I took it from the first posting of this thread.

Hmm, how do I add non-Qt libraries? Out of CB I include them in the .pro file, adding lines like

INCLUDEPATH += . ../include
unix:LIBS += -llrdf

As I see in your sources, you just fire up the qmake project generator, which is ok for pure Qt but doesn't cut it for more complex projects. You could take information like this from the CB project and add it to the qmake command line so it will include it in the project file like this:

qmake -makefile -unix -o Makefile "CONFIG+=test" test.pro

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: QtWorkbench plugin
« Reply #33 on: April 10, 2006, 02:21:53 pm »
can anyone who is using successfully this plugin (Morten?) upload a demo CodeBlocks-project please,
where the build process works ?

what i've done so far:
* built the plugin without problems (from Mortens upload QtWorkbench.zip),
* made a new CB project (from the QT template) qt1
* Run Menu QtWorkbench->Qmake-Build,
   then a qt1.pro file exists in the project directory, but nothing else happens,
   when i run qmake manually from the commandline then the qt1.exe builds fine
* Run Menu QtWorkbench->Qmake-ReBuild, same as above
* Run Menu QtWorkbench->Qmake-Clean, same as above, also the qt1.pro file does still exist, which i would expect to be deleted.

from what i've read in the first posting of this thread from yop , i would expect, that when running QtWorkbench->Qmake-Build
after building the *.pro file qmake would be invoked to build the makefile and afterwards running make ?? am i wrong ?

how should i setup my project that it gets built ?

[edit]
found my problem during debugging the QtWb plugin !
i didn't have a QTDIR environment variable set,
as temporary workaround i've inserted a Messagebox informing the user about
instead of silently returning doing nothing  :)

Code
    if(!wxGetEnv(_T("QTDIR"),&cmd))
    {
        // Not a good Qt installation ;)
        wxMessageBox(_T("Error: environment variable QTDIR not found !"));
        return 0;
    }


beside the fact that i get tons of "dllimport: attribute ignored" warnings using the Qt headers & libs,

the QtWorkbench plugin works fine !
thanks tiwag
« Last Edit: April 10, 2006, 02:52:13 pm by tiwag »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: QtWorkbench plugin
« Reply #34 on: April 10, 2006, 03:13:06 pm »
As a sidenote, do not use wxMessageBox inside C::B and plugins. Use cbMessageBox instead which places the dialog on the correct screen for multi-head systems.
Be patient!
This bug will be fixed soon...

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #35 on: April 10, 2006, 10:54:51 pm »
Now that you say this: Yes! That character I had to remove, too. Anyway: Within the archive I've uploaded in this forum  thread this character was already removed. Which version did you use for compiling? The same question I'd like to ask to yop...?!
With regards, Morten.
Version of what?
I took it from the first posting of this thread.

Hmm, how do I add non-Qt libraries? Out of CB I include them in the .pro file, adding lines like
...
As I see in your sources, you just fire up the qmake project generator, which is ok for pure Qt but doesn't cut it for more complex projects. You could take information like this from the CB project and add it to the qmake command line so it will include it in the project file like this:
The plugin includes (or at least is supposed to) the settings from your C::B project, just add your custom settings to the Project->Build Options dialog and the plugin will generate a .pro file with your settings. I don't just fire and forget qmake, I provide a .pro file instead that "describes" the build process. I 've tested it with projects without Qt and it works just fine (though it adds -lqt in your link options but that's just something you have to live with if you use a trolltech product ;))
* Run Menu QtWorkbench->Qmake-Clean, same as above, also the qt1.pro file does still exist, which i would expect to be deleted.
No it shouldn't be deleted (it would be like deleting foo.cbp from codeblocks project foo when cleaning)
from what i've read in the first posting of this thread from yop , i would expect, that when running QtWorkbench->Qmake-Build
after building the *.pro file qmake would be invoked to build the makefile and afterwards running make ?? am i wrong ?
Yeap that's it, qmake is just a makefile generator that takes a configuration file as input (the .pro file). QTDIR I 'm afraid is getting outdated, I should change that (it is still there in Qt 4.x but it's not needed for the actual build process).
As a sidenote, do not use wxMessageBox inside C::B and plugins. Use cbMessageBox instead which places the dialog on the correct screen for multi-head systems.
I won't don't worry :)
« Last Edit: April 10, 2006, 11:00:16 pm by yop »
Life would be so much easier if we could just look at the source code.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: QtWorkbench plugin
« Reply #36 on: April 10, 2006, 11:15:11 pm »
Version of what?
Version of the QTWorkspace plugin. Basically if it's the one of the first post to the thread or the one I posted. It was to see whether the XRC error is still raised allthough I've removed this NUL character. If you were able to compile and had no troubles you can safely ignore this question... which was actually intended as a hint... ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #37 on: April 10, 2006, 11:32:03 pm »
Version of what?
Version of the QTWorkspace plugin. Basically if it's the one of the first post to the thread or the one I posted. It was to see whether the XRC error is still raised allthough I've removed this NUL character. If you were able to compile and had no troubles you can safely ignore this question... which was actually intended as a hint... ;-)
With regards, Morten.
Hmm, no I haven't tried to build the one you uploaded. When i was asked some questions about the plugin I remember downloading the exact same zip file from the first post and built it without any problems.
I 'll check it out anyway thanks :)
Life would be so much easier if we could just look at the source code.

lgarrido

  • Guest
Re: QtWorkbench plugin
« Reply #38 on: April 11, 2006, 12:11:20 am »
Quote
The plugin includes (or at least is supposed to) the settings from your C::B project, just add your custom settings to the Project->Build Options dialog and the plugin will generate a .pro file with your settings.

That would be great! Then I must be missing something. My project depends on /usr/lib/liblrdf.so. I added "lrdf" to "Build Options | Linker | Link libraries" but this has no influence on the .pro file and the build thus fails. The "include" dirs and the "defines" do appear, though.

Luis

briahn06

  • Guest
Re: QtWorkbench plugin
« Reply #39 on: April 11, 2006, 03:12:37 am »
I just want to say that this plugin is awesome.  As I said in a previous post, I built it, but hadn't tested it yet.  I tested it, and it works flawlessly.  I built it on Windows, CB (4/9).

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #40 on: April 11, 2006, 08:42:50 am »
Quote
The plugin includes (or at least is supposed to) the settings from your C::B project, just add your custom settings to the Project->Build Options dialog and the plugin will generate a .pro file with your settings.

That would be great! Then I must be missing something. My project depends on /usr/lib/liblrdf.so. I added "lrdf" to "Build Options | Linker | Link libraries" but this has no influence on the .pro file and the build thus fails. The "include" dirs and the "defines" do appear, though.

Luis
Then it's a bug, I 'll take a look at it thanks. As a temporary solution you can open up the .pro file and add the missing library *outside* the identifiers that say "Code::Blocks identifier" like this: LIBS+=lrdf. Let me know if it works as I want the .pro file I create to let the user edit it by hand (that's why I used identifiers in the first place).
I just want to say that this plugin is awesome.  As I said in a previous post, I built it, but hadn't tested it yet.  I tested it, and it works flawlessly.  I built it on Windows, CB (4/9).
:D
Life would be so much easier if we could just look at the source code.

lgarrido

  • Guest
Re: QtWorkbench plugin
« Reply #41 on: April 11, 2006, 10:38:42 am »
Quote
like this: LIBS+=lrdf.

In fact you have to add  LIBS+=-llrdf but yes, it works well like that :)

By the way, there is a small funny typo in the comments of the .pro file: "genegation"

Mmm, I think in the end I will use a autotools + self-made qmake approach and will set C::B to use custom makefiles, since I intend my project to be cross-platform. But your plugin is nice for pure Qt projects.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: QtWorkbench plugin
« Reply #42 on: April 11, 2006, 11:25:22 am »
is any way known to suppress these nasty warnings about inlined functions declared as dllimport ?
like this one:
Quote
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #43 on: April 12, 2006, 09:34:34 pm »
is any way known to suppress these nasty warnings about inlined functions declared as dllimport ?
like this one:
Quote
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored
Never got them :? Which compiler are you using?
Life would be so much easier if we could just look at the source code.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: QtWorkbench plugin
« Reply #44 on: April 12, 2006, 10:49:00 pm »
is any way known to suppress these nasty warnings about inlined functions declared as dllimport ?
like this one:
Quote
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored
Never got them :? Which compiler are you using?

MinGW gcc 3.4.5