[Qt-interest] : Problem in porting from QT3.3.4 to QT4.5
Tom Panning
lurchvt at gmail.com
Wed May 20 15:57:25 CEST 2009
Shivam,
I haven't seen this problem before, but I did run into quite a few
weird compilation errors after using qt3to4. Here's what I would do,
although there's no guarantee that this will actually find your
problem.
First, make sure that Qt 3 headers aren't somehow being pulled into
your build process. Look at the compiler execution statement and make
sure it's only looking in Qt 4 locations (also make sure you the Qt 3
headers from your distribution aren't in the include paths).
Second, use #if 0 ... #endif to "comment out" all of your code, and
then replace your main() with a trivial main() that just creates a
QApplication and runs it. This should compile and run fine. Then add a
#include <QLocale> to see whether the error comes back. If it still
compiles, remove the #if 0/#endif one file at a time, and see when
this problem returns. At this point, you're just trying to figure out
what part of your code is having odd interactions with Qt 4. You
should be able to narrow it down to a few lines.
Tom
On Fri, May 15, 2009 at 9:09 AM, shivam priyadarshi
<shivam.priyadarshi at gmail.com> wrote:
> Hi Everybody,
>
> I am porting my application from qt 3.4.4 to qt 4.5. I have successfully
> executes qt3to4 script with QT += qt3support in .pro file. It has
> successfully changed the class names as required in QT 4.5. Now i am
> compiling my application with QT4.5. And I am getting following error in
> qlocale.h at line 651
>
> /src/corelib/tools/qlocale.h:651: error: expected identifier before numeric
> constant
> /src/corelib/tools/qlocale.h:651: error: expected `}' before numeric
> constant
> /src/corelib/tools/qlocale.h:651: error: expected unqualified-id before
> numeric constant
> /src/corelib/tools/qlocale.h:651: error: expected declaration before ‘}’
> token
>
> line 651 in qlocale.h is Q_DECLARE_TYPEINFO(QLocale, Q_MOVABLE_TYPE);
>
> I am not able to understand what is wrong in above line.
>
> I will be grateful for your help.
>
> regards:
> shivam
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
More information about the Qt-interest-old
mailing list