Results 1 to 13 of 13

Thread: Qt4 Preprocessor defines

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    109
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Qt4 Preprocessor defines

    I don't think all of these macros need to be defined when building your own programs. For example QT_DEBUG clearly shouldn't need to be defined - from qglobal.h:
    Qt Code:
    1. /*
    2.   Debugging and error handling
    3. */
    4.  
    5. #if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG)
    6. # define QT_DEBUG
    7. #endif
    To copy to clipboard, switch view to plain text mode 
    The fact that qmake defines them doesn't necessarily mean you need them, qmake may define them because they're needed for building Qt itself.

    That said, it's not a good idea for qmake to define macros that are not needed. Also it would indeed be a good idea to list all needed macros in a paragraph of the documentation. These really should be reported as a bug to Trolltech...

  2. #2
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt4 Preprocessor defines

    Quote Originally Posted by dimitri
    The fact that qmake defines them doesn't necessarily mean you need them, qmake may define them because they're needed for building Qt itself.
    Indeed.

    That said, it's not a good idea for qmake to define macros that are not needed. Also it would indeed be a good idea to list all needed macros in a paragraph of the documentation. These really should be reported as a bug to Trolltech...
    My sentiments entirely.
    Save yourself some pain. Learn C++ before learning Qt.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.