tests/auto/compilerwarnings/tst_compilerwarnings.cpp
changeset 37 758a864f9613
parent 29 b72c6db6890b
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   112 void tst_CompilerWarnings::warnings_data()
   112 void tst_CompilerWarnings::warnings_data()
   113 {
   113 {
   114     QTest::addColumn<QStringList>("cflags");
   114     QTest::addColumn<QStringList>("cflags");
   115 
   115 
   116     QTest::newRow("standard") << QStringList();
   116     QTest::newRow("standard") << QStringList();
       
   117     QTest::newRow("warn deprecated, fast plus, no debug") << (QStringList() << "-DQT_DEPRECATED_WARNINGS"
       
   118         << "-DQT_USE_FAST_OPERATOR_PLUS" << "-DQT_NU_DEBUG" << "-DQT_NO_DEBUG_STREAM" << "-DQT_NO_WARNING_OUTPUT");
       
   119     QTest::newRow("no deprecated, no keywords") << (QStringList() << "-DQT_NO_DEPRECATED" << "-DQT_NO_KEYWORDS");
   117 
   120 
   118 #if 0
   121 #if 0
   119 #ifdef Q_WS_QWS
   122 #ifdef Q_WS_QWS
   120     QStringList features = getFeatures();
   123     QStringList features = getFeatures();
   121     foreach (QString feature, features) {
   124     foreach (QString feature, features) {
   134 
   137 
   135 #if !defined(Q_CC_INTEL) && defined(Q_CC_GNU) && __GNUC__ == 3
   138 #if !defined(Q_CC_INTEL) && defined(Q_CC_GNU) && __GNUC__ == 3
   136     QSKIP("gcc 3.x outputs too many bogus warnings", SkipAll);
   139     QSKIP("gcc 3.x outputs too many bogus warnings", SkipAll);
   137 #endif
   140 #endif
   138 
   141 
   139     static QString tmpFile;
   142     /*static*/ QString tmpFile;
   140     if (tmpFile.isEmpty()) {
   143     if (tmpFile.isEmpty()) {
   141         QTemporaryFile tmpQFile;
   144         QTemporaryFile tmpQFile;
   142         tmpQFile.open();
   145         tmpQFile.open();
   143         tmpFile = tmpQFile.fileName();
   146         tmpFile = tmpQFile.fileName();
   144         tmpQFile.close();
   147         tmpQFile.close();
   145     }
   148     }
   146     static QString tmpSourceFile;
   149     /*static*/ QString tmpSourceFile;
   147     bool openResult = true;
   150     bool openResult = true;
   148     const QString tmpBaseName("XXXXXX-test.cpp");
   151     const QString tmpBaseName("XXXXXX-test.cpp");
   149     QString templatePath = QDir::temp().absoluteFilePath(tmpBaseName);
   152     QString templatePath = QDir::temp().absoluteFilePath(tmpBaseName);
   150     QFile tmpQSourceFile(templatePath);
   153     QFile tmpQSourceFile(templatePath);
   151     if (tmpSourceFile.isEmpty()) {
   154     if (tmpSourceFile.isEmpty()) {