From 0213c02683226834ff0c228f72ab123bdb10b6e4 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 23 Mar 2011 17:25:22 +0100 Subject: [PATCH] Modularized tst_compilerwarnings --- .../tests/auto/compilerwarnings/data/test_cpp.txt | 52 +++++++++++++++ .../tests/auto/compilerwarnings/data/test_cpp.txt | 52 +++++++++++++++ .../tests/auto/compilerwarnings/data/test_cpp.txt | 69 +++++++++++++++++++ .../tests/auto/compilerwarnings/data/test_cpp.txt | 51 ++++++++++++++ .../tests/auto/compilerwarnings/data/test_cpp.txt | 52 +++++++++++++++ .../auto/compilerwarnings/compilerwarnings.pro | 2 +- .../auto/compilerwarnings/compilerwarnings.qrc | 5 -- qtqa/tests/auto/compilerwarnings/test_cpp.txt | 70 -------------------- .../auto/compilerwarnings/tst_compilerwarnings.cpp | 57 +++++++++++++--- .../tests/auto/compilerwarnings/data/test_cpp.txt | 56 ++++++++++++++++ .../tests/auto/compilerwarnings/data/test_cpp.txt | 52 +++++++++++++++ .../tests/auto/compilerwarnings/data/test_cpp.txt | 52 +++++++++++++++ .../tests/auto/compilerwarnings/data/test_cpp.txt | 52 +++++++++++++++ 13 files changed, 535 insertions(+), 87 deletions(-) create mode 100644 phonon/tests/auto/compilerwarnings/data/test_cpp.txt create mode 100644 qt3support/tests/auto/compilerwarnings/data/test_cpp.txt create mode 100644 qtbase/tests/auto/compilerwarnings/data/test_cpp.txt create mode 100644 qtdeclarative/tests/auto/compilerwarnings/data/test_cpp.txt create mode 100644 qtmultimedia/tests/auto/compilerwarnings/data/test_cpp.txt delete mode 100644 qtqa/tests/auto/compilerwarnings/compilerwarnings.qrc delete mode 100644 qtqa/tests/auto/compilerwarnings/test_cpp.txt create mode 100644 qtscript/tests/auto/compilerwarnings/data/test_cpp.txt create mode 100644 qtsvg/tests/auto/compilerwarnings/data/test_cpp.txt create mode 100644 qttools/tests/auto/compilerwarnings/data/test_cpp.txt create mode 100644 qtxmlpatterns/tests/auto/compilerwarnings/data/test_cpp.txt diff --git a/phonon/tests/auto/compilerwarnings/data/test_cpp.txt b/phonon/tests/auto/compilerwarnings/data/test_cpp.txt new file mode 100644 index 0000000..775619a --- /dev/null +++ b/phonon/tests/auto/compilerwarnings/data/test_cpp.txt @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QT_NO_PHONON +#include +#endif + +#ifndef Q_OS_MAC +int main(int, char **) +{ + return 0; +} +#endif diff --git a/qt3support/tests/auto/compilerwarnings/data/test_cpp.txt b/qt3support/tests/auto/compilerwarnings/data/test_cpp.txt new file mode 100644 index 0000000..1c52f27 --- /dev/null +++ b/qt3support/tests/auto/compilerwarnings/data/test_cpp.txt @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifdef QT3_SUPPORT +#include +#endif + +#ifndef Q_OS_MAC +int main(int, char **) +{ + return 0; +} +#endif diff --git a/qtbase/tests/auto/compilerwarnings/data/test_cpp.txt b/qtbase/tests/auto/compilerwarnings/data/test_cpp.txt new file mode 100644 index 0000000..9b8d11c --- /dev/null +++ b/qtbase/tests/auto/compilerwarnings/data/test_cpp.txt @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include +#include +#include + +#ifndef QT_NO_GUI +#include +#endif + +#ifndef QT_NO_OPENGL +#include +#endif + +#include + +#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX) +#include +#endif + +#include + +#ifndef Q_OS_MAC +int main(int, char **) +{ + return 0; +} +#endif diff --git a/qtdeclarative/tests/auto/compilerwarnings/data/test_cpp.txt b/qtdeclarative/tests/auto/compilerwarnings/data/test_cpp.txt new file mode 100644 index 0000000..a3d65db --- /dev/null +++ b/qtdeclarative/tests/auto/compilerwarnings/data/test_cpp.txt @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QT_NO_DECLARATIVE +#include +#endif + +#ifndef Q_OS_MAC +int main(int, char **) +{ + return 0; +} +#endif diff --git a/qtmultimedia/tests/auto/compilerwarnings/data/test_cpp.txt b/qtmultimedia/tests/auto/compilerwarnings/data/test_cpp.txt new file mode 100644 index 0000000..3e33574 --- /dev/null +++ b/qtmultimedia/tests/auto/compilerwarnings/data/test_cpp.txt @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QT_NO_MULTIMEDIA +#include +#endif + +#ifndef Q_OS_MAC +int main(int, char **) +{ + return 0; +} +#endif diff --git a/qtqa/tests/auto/compilerwarnings/compilerwarnings.pro b/qtqa/tests/auto/compilerwarnings/compilerwarnings.pro index beb0279..301834c 100644 --- a/qtqa/tests/auto/compilerwarnings/compilerwarnings.pro +++ b/qtqa/tests/auto/compilerwarnings/compilerwarnings.pro @@ -1,4 +1,4 @@ load(qttest_p4) +INCLUDEPATH += ../../shared SOURCES += tst_compilerwarnings.cpp QT = core -RESOURCES = compilerwarnings.qrc diff --git a/qtqa/tests/auto/compilerwarnings/compilerwarnings.qrc b/qtqa/tests/auto/compilerwarnings/compilerwarnings.qrc deleted file mode 100644 index 3fa313c..0000000 --- a/qtqa/tests/auto/compilerwarnings/compilerwarnings.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - test_cpp.txt - - diff --git a/qtqa/tests/auto/compilerwarnings/test_cpp.txt b/qtqa/tests/auto/compilerwarnings/test_cpp.txt deleted file mode 100644 index d27e972..0000000 --- a/qtqa/tests/auto/compilerwarnings/test_cpp.txt +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -#include -#include -#include -#include -#include - -#ifndef QT_NO_OPENGL -#include -#endif - -#include - -#include - -#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX) -#include -#endif - -#include - - -#ifndef Q_OS_MAC -int main(int, char **) -{ - return 0; -} -#endif - diff --git a/qtqa/tests/auto/compilerwarnings/tst_compilerwarnings.cpp b/qtqa/tests/auto/compilerwarnings/tst_compilerwarnings.cpp index b518e20..d33ad6e 100644 --- a/qtqa/tests/auto/compilerwarnings/tst_compilerwarnings.cpp +++ b/qtqa/tests/auto/compilerwarnings/tst_compilerwarnings.cpp @@ -51,6 +51,8 @@ QTEST_NOOP_MAIN #else +#include "global.h" + #include QT_USE_NAMESPACE @@ -60,11 +62,18 @@ class tst_CompilerWarnings: public QObject Q_OBJECT private slots: + void initTestCase(); + void cleanupTestCase(); + void warnings_data(); void warnings(); private: bool shouldIgnoreWarning(QString const&); + + QString qtModuleDir; + QHash modules; + QStringList incPaths; }; #if 0 @@ -109,6 +118,28 @@ static QStringList getFeatures() } #endif +void tst_CompilerWarnings::initTestCase() +{ + QTest::qWarn("This test needs the correct qmake in PATH, we need it to generate INCPATH for qt modules."); + + qtModuleDir = QString::fromLocal8Bit(qgetenv("QT_MODULE_TO_TEST")); + QVERIFY2(!qtModuleDir.isEmpty(), "This test needs $QT_MODULE_TO_TEST, we need it to search data and etc."); + + QString configFile = qtModuleDir + "/tests/global/global.cfg"; + modules = qt_tests_shared_global_get_modules(configFile); + + QVERIFY2(modules.size() > 0, "Something is wrong in the global config file."); + + QString workDir = qtModuleDir + "/tests/global"; + incPaths = qt_tests_shared_global_get_include_paths(workDir, modules); + + QVERIFY2(incPaths.size() > 0, "Parse INCPATH failed."); +} + +void tst_CompilerWarnings::cleanupTestCase() +{ +} + void tst_CompilerWarnings::warnings_data() { QTest::addColumn("cflags"); @@ -133,6 +164,12 @@ void tst_CompilerWarnings::warnings_data() void tst_CompilerWarnings::warnings() { + QString workDir = qtModuleDir + "/tests/auto/compilerwarnings"; + if (!QDir::setCurrent(workDir)) { + QTest::qWarn("Change working dir failed."); + return; + } + QFETCH(QStringList, cflags); #if !defined(Q_CC_INTEL) && defined(Q_CC_GNU) && __GNUC__ == 3 @@ -149,12 +186,13 @@ void tst_CompilerWarnings::warnings() /*static*/ QString tmpSourceFile; bool openResult = true; const QString tmpBaseName("XXXXXX-test.cpp"); + const QString cppFileName(workDir + "/data/test_cpp.txt"); QString templatePath = QDir::temp().absoluteFilePath(tmpBaseName); QFile tmpQSourceFile(templatePath); if (tmpSourceFile.isEmpty()) { tmpQSourceFile.open(QIODevice::ReadWrite | QIODevice::Truncate); tmpSourceFile = tmpQSourceFile.fileName(); - QFile cppSource(":/test_cpp.txt"); + QFile cppSource(cppFileName); bool openResult = cppSource.open(QIODevice::ReadOnly); if (openResult) { @@ -164,18 +202,15 @@ void tst_CompilerWarnings::warnings() } } tmpQSourceFile.close(); - QVERIFY2(openResult, "Need resource temporary \"test_cpp.txt\""); + QVERIFY2(openResult, QString("Need data file \"" + cppFileName + "\"").toLatin1()); QStringList args; QString compilerName; - static QString qtDir = QString::fromLocal8Bit(qgetenv("QTDIR")); - QVERIFY2(!qtDir.isEmpty(), "This test needs $QTDIR"); - args << cflags; #if !defined(Q_CC_INTEL) && defined(Q_CC_GNU) compilerName = "g++"; - args << "-I" + qtDir + "/include"; + args << incPaths; args << "-I/usr/X11R6/include/"; #ifdef Q_OS_HPUX args << "-I/usr/local/mesa/aCC-64/include"; @@ -189,7 +224,7 @@ void tst_CompilerWarnings::warnings() << tmpSourceFile; #elif defined(Q_CC_XLC) compilerName = "xlC_r"; - args << "-I" + qtDir + "/include" + args << incPaths # if QT_POINTER_SIZE == 8 << "-q64" # endif @@ -198,13 +233,13 @@ void tst_CompilerWarnings::warnings() << tmpSourceFile; #elif defined(Q_CC_MSVC) compilerName = "cl"; - args << "-I" + qtDir + "/include" + args << incPaths << "-nologo" << "-W3" << tmpSourceFile; #elif defined (Q_CC_SUN) compilerName = "CC"; // +w or +w2 outputs too much bogus - args << "-I" + qtDir + "/include" + args << incPaths # if QT_POINTER_SIZE == 8 << "-xarch=v9" # endif @@ -212,7 +247,7 @@ void tst_CompilerWarnings::warnings() << tmpSourceFile; #elif defined (Q_CC_HPACC) compilerName = "aCC"; - args << "-I" + qtDir + "/include" + args << incPaths << "-I/usr/local/mesa/aCC-64/include" << "-I/opt/graphics/OpenGL/include" # if QT_POINTER_SIZE == 8 && !defined __ia64 @@ -224,7 +259,7 @@ void tst_CompilerWarnings::warnings() << tmpSourceFile; #elif defined(Q_CC_MIPS) compilerName = "CC"; - args << "-I" + qtDir + "/include" + args << incPaths << "-c" << "-woff" << "3303" // const qualifier on return << "-o" << tmpFile diff --git a/qtscript/tests/auto/compilerwarnings/data/test_cpp.txt b/qtscript/tests/auto/compilerwarnings/data/test_cpp.txt new file mode 100644 index 0000000..c5c5933 --- /dev/null +++ b/qtscript/tests/auto/compilerwarnings/data/test_cpp.txt @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QT_NO_SCRIPT +#include +#endif + +#ifndef QT_NO_SCRIPTTOOLS +#include +#endif + +#ifndef Q_OS_MAC +int main(int, char **) +{ + return 0; +} +#endif diff --git a/qtsvg/tests/auto/compilerwarnings/data/test_cpp.txt b/qtsvg/tests/auto/compilerwarnings/data/test_cpp.txt new file mode 100644 index 0000000..4ac69de --- /dev/null +++ b/qtsvg/tests/auto/compilerwarnings/data/test_cpp.txt @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QT_NO_SVG +#include +#endif + +#ifndef Q_OS_MAC +int main(int, char **) +{ + return 0; +} +#endif diff --git a/qttools/tests/auto/compilerwarnings/data/test_cpp.txt b/qttools/tests/auto/compilerwarnings/data/test_cpp.txt new file mode 100644 index 0000000..5e0cbf3 --- /dev/null +++ b/qttools/tests/auto/compilerwarnings/data/test_cpp.txt @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include +//#include + +#ifndef Q_OS_MAC +int main(int, char **) +{ + return 0; +} +#endif diff --git a/qtxmlpatterns/tests/auto/compilerwarnings/data/test_cpp.txt b/qtxmlpatterns/tests/auto/compilerwarnings/data/test_cpp.txt new file mode 100644 index 0000000..77fa9ba --- /dev/null +++ b/qtxmlpatterns/tests/auto/compilerwarnings/data/test_cpp.txt @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QT_NO_XMLPATTERNS +#include +#endif + +#ifndef Q_OS_MAC +int main(int, char **) +{ + return 0; +} +#endif -- 1.7.3.4