Results 1 to 11 of 11

Thread: Reg - Conversion of Qt3 to Qt4

  1. #1
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Reg - Conversion of Qt3 to Qt4

    dear all,

    Now i am trying to convert the Qt3.3.4 files into Qt4.1.4. After Executing Qt3to4 in cmd mode it gives the following some errors.

    D:/Qt/4.1.4/include/QtCore\../../src/corelib/thread/qthread.h(31) : error C2146: syntax error : missing ';' before identifier 'QT_MODULE'
    D:/Qt/4.1.4/include/QtCore\../../src/corelib/thread/qthread.h(31) : error C2501: 'QT_BEGIN_HEADER' : missing storage-class or type specifiers
    D:/Qt/4.1.4/include/QtCore\../../src/corelib/thread/qthread.h(31) : fatal error C1004: unexpected end of file found
    zonetrader.cpp
    C:\Qt\3.3.4\include\qhostaddress.h(59) : error C2079: 'QHostAddress' uses undefined class 'Q_EXPORT'
    C:\Qt\3.3.4\include\qhostaddress.h(59) : error C2239: unexpected token '{' following declaration of 'QHostAddress'
    C:\Qt\3.3.4\include\qsocket.h(58) : error C2079: 'QSocket' uses undefined class 'Q_EXPORT'
    C:\Qt\3.3.4\include\qsocket.h(58) : error C2239: unexpected token ':' following declaration of 'QSocket'
    C:\Qt\3.3.4\include\qsocket.h(58) : error C2059: syntax error : 'public'
    C:\Qt\3.3.4\include\qptrcollection.h(50) : error C2079: 'QPtrCollection' uses undefined class 'Q_EXPORT'
    C:\Qt\3.3.4\include\qptrcollection.h(50) : error C2239: unexpected token '{' following declaration of 'QPtrCollection'
    C:\Qt\3.3.4\include\qgdict.h(53) : error C2653: 'QPtrCollection' : is not a class or namespace name
    C:\Qt\3.3.4\include\qgdict.h(53) : error C2146: syntax error : missing ';' before identifier 'getData'
    C:\Qt\3.3.4\include\qgdict.h(53) : error C2501: 'Item' : missing storage-class or type specifiers
    C:\Qt\3.3.4\include\qgdict.h(53) : warning C4183: 'getData': member function definition looks like a ctor, but name does not match enclosing class
    C:\Qt\3.3.4\include\qgdict.h(54) : error C2653: 'QPtrCollection' : is not a class or namespace name
    C:\Qt\3.3.4\include\qgdict.h(54) : error C2146: syntax error : missing ';' before identifier 'setData'
    C:\Qt\3.3.4\include\qgdict.h(54) : error C2501: 'Item' : missing storage-class or type specifiers
    C:\Qt\3.3.4\include\qgdict.h(54) : error C2653: 'QPtrCollection' : is not a class or namespace name


    All errors shows in qt include files. give any solutions.

    regards,
    suresh.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - Conversion of Qt3 to Qt4

    Why does it include both Qt3 and Qt4 headers?

  3. #3
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - Conversion of Qt3 to Qt4

    I set only Qt4 includes in environment variables.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - Conversion of Qt3 to Qt4

    Check your project --- maybe path to Qt3 is set somewhere. Make sure you use Qt4 tools and double check your enviroment variables (echo %PATH% and so on).

  5. #5
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - Conversion of Qt3 to Qt4

    I crosschecked the environment variables and vc++ settings. i couldn't find the Qt3 include. Is there any possibility in somewhere because previously i was working with Qt3

    Regards,
    suresh.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - Conversion of Qt3 to Qt4

    Did you run "make clean"? Which file do you get those errors for?

  7. #7
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - Conversion of Qt3 to Qt4

    After running "make clean" the following errors occured.

    Microsoft (R) Program Maintenance Utility Version 7.10.3077
    Copyright (C) Microsoft Corporation. All rights reserved.

    nmake -f Makefile.Debug clean

    Microsoft (R) Program Maintenance Utility Version 7.10.3077
    Copyright (C) Microsoft Corporation. All rights reserved.

    del moc\moc_zonetraderwidget.cpp
    Could Not Find D:\projects\inprogress\Avadhi_orderSim\OrderSimula tion_Augest\Plu
    gins\ZoneTrader\moc\moc_zonetraderwidget.cpp
    del qmake_image_collection.cpp
    Could Not Find D:\projects\inprogress\Avadhi_orderSim\OrderSimula tion_Augest\Plu
    gins\ZoneTrader\qmake_image_collection.cpp
    del obj\zonetraderwidget.obj
    Could Not Find D:\projects\inprogress\Avadhi_orderSim\OrderSimula tion_Augest\Plu
    gins\ZoneTrader\obj\zonetraderwidget.obj
    del obj\plugin.obj
    Could Not Find D:\projects\inprogress\Avadhi_orderSim\OrderSimula tion_Augest\Plu
    gins\ZoneTrader\obj\plugin.obj
    del obj\moc_zonetraderwidget.obj
    Could Not Find D:\projects\inprogress\Avadhi_orderSim\OrderSimula tion_Augest\Plu
    gins\ZoneTrader\obj\moc_zonetraderwidget.obj
    del ..\..\bin\plugins\designer\ZoneTrader.exp


    Regards,
    suresh.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - Conversion of Qt3 to Qt4

    Quote Originally Posted by suresh
    After running "make clean" the following errors occured.
    I don't see any errors.

    Quote Originally Posted by suresh
    del qmake_image_collection.cpp
    If your Makefile knows something about image collections, then it isn't a Qt4 Makefile --- generate a new one and try again.

  9. The following user says thank you to jacek for this useful post:

    suresh (28th August 2006)

  10. #9
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Reg - Conversion of Qt3 to Qt4

    Quote Originally Posted by jacek
    If your Makefile knows something about image collections, then it isn't a Qt4 Makefile --- generate a new one and try again.
    Not true. uic3 will create a qmake_image_collection.cpp from an IMAGES variable in the .pro file.

    Like Qt3Support, this is a porting aid. You want to use resources instead of IMAGES in your finished project, but since you can't do everything at once, it's a helpful tool to get you there.

  11. #10
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - Conversion of Qt3 to Qt4

    Atlast I found my error. In vc++ Directories Qt3 path set. I changed and now it works fine.

    Thanks to Jacek and Brandybuck.

    Regards,
    suresh.

  12. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - Conversion of Qt3 to Qt4

    Quote Originally Posted by Brandybuck
    uic3 will create a qmake_image_collection.cpp from an IMAGES variable in the .pro file.
    Probably you are right, but I don't remember that IMAGES did work when I was porting my apps to Qt4. It was some time ago, so either I don't remember well, or something has changed.

    Anyway there is no IMAGES variable in Qt4 docs (there's FORMS3 only).

Similar Threads

  1. conversion of color
    By Stephano in forum Qt Programming
    Replies: 5
    Last Post: 22nd May 2006, 11:56
  2. template parameter and conversion operator
    By bitChanger in forum General Programming
    Replies: 7
    Last Post: 21st April 2006, 15:36
  3. use libs under qt4
    By raphaelf in forum Qt Programming
    Replies: 6
    Last Post: 27th February 2006, 17:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.