Author Topic: QtWorkbench plugin  (Read 254451 times)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: QtWorkbench plugin
« Reply #45 on: April 12, 2006, 10:50:10 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

By strange coincidence, I stumbled upon this just today. Here's the strange thing:
If I compile with -Wall (all warnings, as usual), I don't get these warnings.
If I compile with -W (standard warnings), I get this  :?

It's strange because "all warnings" should be a superset of "standard warnings only" ?!?
Be patient!
This bug will be fixed soon...

takeshimiya

  • Guest
Re: QtWorkbench plugin
« Reply #46 on: April 12, 2006, 11:24:01 pm »
By strange coincidence, I stumbled upon this just today. Here's the strange thing:
If I compile with -Wall (all warnings, as usual), I don't get these warnings.
If I compile with -W (standard warnings), I get this  :?

It's strange because "all warnings" should be a superset of "standard warnings only" ?!?
I thought the same, but it seems it's not the case.
-W outputs different warnings (and usually more) than -Wall.
There is not any superset flag in GCC for all the warnings.

Note that -Wall does not imply all the other warnings, it's only a set of warnings.
The same is for -W, it's a set of warnings, not implied by any other flag.
And the other important flag is -pedantic, which is also not implied by any other flag.

It's more explained in the manual:
http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Warning-Options.html

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #47 on: April 13, 2006, 12:11:19 am »
AFAIR, -Wall is the default setting when generating Makefiles with qmake. Also that dllimport thingy is "ifdefed" out when using qmake to generate gcc Makefiles.  :?
Life would be so much easier if we could just look at the source code.

briahn06

  • Guest
Re: QtWorkbench plugin
« Reply #48 on: April 13, 2006, 07:51:33 am »
Is there anyway to link moc and uic?  I went to the QTWorkBench options, but only found intermediate folders.  This made me think that moc and uic ran by default (whenever necessary), but that doesn't seem to be the case b/c I get errors that are quelled when I run uic and moc manually from cmd.

Thanks, Brian.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: QtWorkbench plugin
« Reply #49 on: April 13, 2006, 08:53:48 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

By strange coincidence, I stumbled upon this just today. Here's the strange thing:
If I compile with -Wall (all warnings, as usual), I don't get these warnings.
If I compile with -W (standard warnings), I get this  :?

It's strange because "all warnings" should be a superset of "standard warnings only" ?!?
what gcc version are you using ?
do you get these warnings from Qt or also from wxWidgets headers ?

when i compile any Qt 4.1.2 project i get these warnings regardless of -W or -Wall compiler switch
using gcc 3.4.5 (maybe i could step back to gcc 3.4.4 in order to test if it happens then too)
« Last Edit: April 13, 2006, 08:55:42 am by tiwag »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: QtWorkbench plugin
« Reply #50 on: April 13, 2006, 09:00:38 am »
Quote
what gcc version are you using ?
do you get these warnings from Qt or also from wxWidgets headers ?

gcc-3.4.4 with wxWidgets 2.6.2.
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: QtWorkbench plugin
« Reply #51 on: April 13, 2006, 09:05:50 am »
-Wextra
    (This option used to be called -W. The older name is still supported, but the newer name is more descriptive.)

Now, that explains why I got confused :P
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: QtWorkbench plugin
« Reply #52 on: April 13, 2006, 10:10:24 am »
this is what i get when i build a simple hello world QtApp

Code
#include <qstring.h>
#include <qapplication.h>
#include <qpushbutton.h>

int main(int argc, char **argv)
{
    QApplication    app(argc, argv);
    QPushButton     quit("Hello World!");
   
    quit.resize(300, 40);
    quit.setFont(QFont("Arial", 18, QFont::Bold));
    QObject::connect(&quit, SIGNAL(clicked()), &app, SLOT(quit()));
    quit.show();
   
    return app.exec();
}


these tons of warnings are very annoying

Code
mingw32-make.exe -f Makefile.Release
mingw32-make.exe[1]: Entering directory `D:/Devel/_projects/Qt/qt2'
g++ -c -Wall -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NEEDS_QMAIN -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"D:/qt412/include/QtCore" -I"D:/qt412/include/QtGui" -I"D:/qt412/include" -I"D:/MinGW/include" -I"D:/Qt412/include" -I"D:/Qt412/include/ActiveQt" -I"D:/Qt412/include/Qt" -I"D:/Qt412/include/Qt3Support" -I"D:/Qt412/include/QtAssistant" -I"D:/Qt412/include/QtCore" -I"D:/Qt412/include/QtDesigner" -I"D:/Qt412/include/QtGui" -I"D:/Qt412/include/QtNetwork" -I"D:/Qt412/include/QtOpenGL" -I"D:/Qt412/include/QtSql" -I"D:/Qt412/include/QtSvg" -I"D:/Qt412/include/QtTest" -I"D:/Qt412/include/QtUiTools" -I"D:/Qt412/include/QtXml" -I"D:/qt412/include/ActiveQt" -I"release" -I"." -I"D:/qt412/mkspecs/win32-g++" -o .objs\main.o main.cpp
In file included from D:/qt412/include/QtCore/qrect.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/painting/qpaintdevice.h:28,
                 from D:/qt412/include/QtGui/qpaintdevice.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qpixmap.h:27,
                 from D:/qt412/include/QtGui/qpixmap.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qicon.h:29,
                 from D:/qt412/include/QtGui/qicon.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qabstractbutton.h:27,
                 from D:/qt412/include/QtGui/qabstractbutton.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qpushbutton.h:27,
                 from D:/qt412/include/QtGui/qpushbutton.h:1,
                 from main.cpp:3:
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:138: warning: inline function `bool operator==(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:139: warning: inline function `bool operator!=(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:166: warning: inline function `bool operator==(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:167: warning: inline function `bool operator!=(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:560: warning: inline function `bool operator==(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:561: warning: inline function `bool operator!=(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:573: warning: inline function `bool operator==(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:574: warning: inline function `bool operator!=(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
In file included from D:/qt412/include/QtGui/qrgb.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/painting/qcolor.h:27,
                 from D:/qt412/include/QtGui/qcolor.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qpixmap.h:28,
                 from D:/qt412/include/QtGui/qpixmap.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qicon.h:29,
                 from D:/qt412/include/QtGui/qicon.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qabstractbutton.h:27,
                 from D:/qt412/include/QtGui/qabstractbutton.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qpushbutton.h:27,
                 from D:/qt412/include/QtGui/qpushbutton.h:1,
                 from main.cpp:3:
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:36: warning: inline function `int qRed(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:39: warning: inline function `int qGreen(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:42: warning: inline function `int qBlue(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:45: warning: inline function `int qAlpha(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:48: warning: inline function `QRgb qRgb(int, int, int)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:51: warning: inline function `QRgb qRgba(int, int, int, int)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:54: warning: inline function `int qGray(int, int, int)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:60: warning: inline function `bool qIsGray(QRgb)' declared as dllimport: attribute ignored
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "qtapp.exe" .objs\main.o  -L"D:\MinGW\lib" -L"D:\Qt412\lib" -L"D:\qt412\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
mingw32-make.exe[1]: Leaving directory `D:/Devel/_projects/Qt/qt2'
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 17 warnings


using gcc 3.4.5, the warning level switches -W, -Wall etc. don't change anything ...

i'm looking for a way to suppress this single warning while all other warnings keep alive ...

maybe anyone had solved this puzzle already

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: QtWorkbench plugin
« Reply #53 on: April 13, 2006, 10:30:52 am »
the same code from above sample

compiled with gcc 3.4.4 with warnings switch -W gives 764 warnings !!!
Code
Process terminated with status 0 (0 minutes, 18 seconds)
0 errors, 764 warnings

compiled with gcc 3.4.4 with warnings switch -Wall gives 0 warnings (as Yiannis said)


Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #54 on: April 16, 2006, 11:05:28 pm »
Is there anyway to link moc and uic?  I went to the QTWorkBench options, but only found intermediate folders.  This made me think that moc and uic ran by default (whenever necessary), but that doesn't seem to be the case b/c I get errors that are quelled when I run uic and moc manually from cmd.

Thanks, Brian.
Depends on what your trying to do and how you want to handle ui files. If you want them to pass through the uic then just add them to your codeblocks project and they are added to your .pro file in the FORMS field.

the same code from above sample

compiled with gcc 3.4.4 with warnings switch -W gives 764 warnings !!!
Code
Process terminated with status 0 (0 minutes, 18 seconds)
0 errors, 764 warnings

compiled with gcc 3.4.4 with warnings switch -Wall gives 0 warnings (as Yiannis said)


Seems you 're not alone:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12477
« Last Edit: April 16, 2006, 11:13:49 pm by yop »
Life would be so much easier if we could just look at the source code.

ldindon

  • Guest
Re: QtWorkbench plugin
« Reply #55 on: April 19, 2006, 04:03:48 pm »
Yop,

Code::Blocks + QtWorkbench = ALL WHAT I NEED for Qt cross-platform development.

But I just need some precisions:

1. Where can I found the latest plugin's package? Is it from your original (sticky) post or the patched version of MortenMacFly (http://forums.codeblocks.org/index.php?topic=2253.msg22382#msg22382) or somewhere else?

2. Is it possible for you (or some other guys) to release too some pre-builds of the plugin? It will be nice for guy (like me) who do not have a ready to build Code::Blocks plugins environment (CB SDK + wxWidgets).

That's it...

Best regards.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: QtWorkbench plugin
« Reply #56 on: April 19, 2006, 05:02:46 pm »
... for guy (like me) who do not have a ready to build Code::Blocks plugins environment (CB SDK + wxWidgets)....

that's exactly the point
first, pre-build binaries are not generally usable, because the plugin needs to be built against exactly the same wxwidgets-dll's which are used by the binary release of C::B itself, and different developers may have (slightly) different builds of wxwidgets to build C::B and all plugins.

second point is, that at the moment the only existing C::B SDK is the working version in the svn repository and because of progress of development it is permanent subject of change until the next release of C::B will be ready.

so the only who can build and release binaries is killerbot, who releases the nightly builds,
maybe he will build the Qt-Workbench-plugin and provide it for download ...

the best way is surely if you check out the C::B sources as working version from svn and build it against your own built wxwidgets library.
how to do that can be read in the C::B wiki

btw. i used (and modified slightly) the sources uploaded by Morten

regards

ldindon

  • Guest
Re: QtWorkbench plugin
« Reply #57 on: April 19, 2006, 05:25:06 pm »
Thanks,

I see the problem...let's go for my first steps with subversion (cvs user)!

btw: it will be nice to put the plugin (and others) in http://www.codeblocks.org/downloads.shtml "third party addons" section. It will avoid people parsing forum to get a plugin (I don't who is responsible to update this section).

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: QtWorkbench plugin
« Reply #58 on: April 19, 2006, 05:49:41 pm »
you're welcome :)

...let's go for my first steps with subversion (cvs user)!
when you once got familiar with svn, you'll be satisfied and probably you won't want use cvs again :)


Offline yop

  • Regular
  • ***
  • Posts: 387
Re: QtWorkbench plugin
« Reply #59 on: April 19, 2006, 06:15:29 pm »
ldindon thanks for your nice words, I 'm happy it fit your needs. I 'm afraid that what tiwag said is 100% correct and I 've explained earlier why a precompiled release isn't possible. I will provide one after the next "stable" release of C::B. Also keep in mind that there is a reason why this is in the development section of the forum and not announced in the wiki or something...

P.S. Morten's .zip has exactly the same sources as the one in the first post with the major difference that Morten put it in the contrib plugins so it should be easier to build and integrade it with C::B. I'll also keep that approach from now on
« Last Edit: April 19, 2006, 06:18:23 pm by yop »
Life would be so much easier if we could just look at the source code.