Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-741

error in qdebug.h/qglobal.h breaks compilations with QT_NO_WARNING_OUTPUT defined

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.3.0
    • Other
    • None

    Description

      Reproducible with any Qt 4.x version using the following code:

      #define QT_NO_WARNING_OUTPUT
      #include <QtGui>

      int main(int argc, char *argv[])
      {
      QApplication app(argc, argv);

      return 0;
      }

      With VC++ this generates syntax errors:

      ..\..\..\Qt\4.3.0\include\QtCore/../../src/corelib/io/qdebug.h(98) : warning C4091: 'inline __declspec(dllimport ) ' : ignored on left of 'class QDebug' when no variable is declared
      ..\..\..\Qt\4.3.0\include\QtCore/../../src/corelib/io/qdebug.h(98) : error C2143: syntax error : missing ';' before 'if'
      ..\..\..\Qt\4.3.0\include\QtCore/../../src/corelib/io/qdebug.h(98) : error C2143: syntax error : missing ';' before 'if'
      ..\..\..\Qt\4.3.0\include\QtCore/../../src/corelib/io/qdebug.h(98) : error C2143: syntax error : missing ';' before 'else'
      ..\..\..\Qt\4.3.0\include\QtCore/../../src/corelib/io/qdebug.h(98) : error C2143: syntax error : missing ';' before '{'
      ..\..\..\Qt\4.3.0\include\QtCore/../../src/corelib/io/qdebug.h(98) : error C2447: missing function header (old-style formal list?)

      To surpress error messages from Qt, install a message handler that does nothing:

      http://doc.trolltech.com/4.3/qtglobal.html#qInstallMsgHandler

      or that logs the messages for support purposes.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes