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

QT_REQUIRE_VERSION causes a warning

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 4.6.2
    • Other
    • None
    • Linux, g++ 4.4.3, Qt 4.6.2

    Description

      The following code causes a warning :

      #include <QApplication>
      #include <QMessageBox> // Why is QT_REQUIRE_VERSION found here instead 
                             // of QtGlobal as documented?
      #include <QtGlobal>
      
      int main(int argc, char *argv[]) {
      	QT_REQUIRE_VERSION(argc, argv, "4.5.0")
      	QApplication app(argc, argv);
      	return app.exec();
      }
      

      main.cpp: In function 'int main(int, char**)':
      main.cpp:8: warning: format not a string literal and no format arguments

      The compiler flags passed are:

      g++ -c -pipe -march=native -fomit-frame-pointer -O3 -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp
      

      The only flags unique to my environment are "-march=native -fomit-frame-pointer -O3 -pipe" the rest are the default Qt flags.

      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)
            eteran Evan Teran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes