diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2014-10-29 11:45:04 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2014-10-29 15:31:19 +0100 |
commit | 7c82e9f3f417564dff89b75c802e4bd91e4b1ca7 (patch) | |
tree | 8460da11f9cef9ab2b622e833eed3a699d41289b | |
parent | 167950d064c6b1bd1fb6c9fdd390873ebc29ae97 (diff) |
remove support for building qbs with Qt <= 5.1.0
Change-Id: I058eedd2d9dcaad1eaac1f4407f4f698133a774b
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-rw-r--r-- | doc/config/compat-qt4.qdocconf | 30 | ||||
-rw-r--r-- | doc/doc.pri | 16 | ||||
-rw-r--r-- | doc/doc.qbs | 2 | ||||
-rw-r--r-- | doc/qbs-qt4.qdocconf | 3 | ||||
-rw-r--r-- | doc/qbs.qdoc | 2 | ||||
-rw-r--r-- | qbs.pro | 4 | ||||
-rw-r--r-- | src/lib/corelib/language/moduleloader.cpp | 4 | ||||
-rw-r--r-- | src/lib/corelib/tools/buildgraphlocker.cpp | 8 | ||||
-rw-r--r-- | src/lib/corelib/tools/buildgraphlocker.h | 8 | ||||
-rw-r--r-- | tests/auto/api/tst_api.cpp | 3 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 24 | ||||
-rw-r--r-- | tests/auto/shared.h | 6 |
12 files changed, 18 insertions, 92 deletions
diff --git a/doc/config/compat-qt4.qdocconf b/doc/config/compat-qt4.qdocconf deleted file mode 100644 index 2d2a426e9..000000000 --- a/doc/config/compat-qt4.qdocconf +++ /dev/null @@ -1,30 +0,0 @@ -macro.li = "\\o" -alias.i = e -alias.include = input -macro.0 = "\\\\0" -macro.b = "\\bold" -macro.n = "\\\\n" -macro.r = "\\\\r" -macro.i = "\\o" -macro.i11 = "\\o{1,1}" -macro.i12 = "\\o{1,2}" -macro.i13 = "\\o{1,3}" -macro.i14 = "\\o{1,4}" -macro.i15 = "\\o{1,5}" -macro.i16 = "\\o{1,6}" -macro.i17 = "\\o{1,7}" -macro.i18 = "\\o{1,8}" -macro.i19 = "\\o{1,9}" -macro.i21 = "\\o{2,1}" -macro.i31 = "\\o{3,1}" -macro.i41 = "\\o{4,1}" -macro.i51 = "\\o{5,1}" -macro.i61 = "\\o{6,1}" -macro.i71 = "\\o{7,1}" -macro.i81 = "\\o{8,1}" -macro.i91 = "\\o{9,1}" -macro.img = "\\image" -macro.endquote = "\\endquotation" -macro.relatesto = "\\relates" -spurious = "Missing comma in .*" \ - "Missing pattern .*" diff --git a/doc/doc.pri b/doc/doc.pri index f1ea69935..5d311f52f 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -2,19 +2,8 @@ defineReplace(targetPath) { return($$replace(1, /, $$QMAKE_DIR_SEP)) } -qt:greaterThan(QT_MAJOR_VERSION, 4) { - QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc) - QDOC_MAINFILE = $$PWD/qbs.qdocconf -} else { - QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc3) - QDOC_MAINFILE = $$PWD/qbs-qt4.qdocconf - - # cheap replacement of the Qt5 shell_quote function - defineReplace(shell_quote) { - return("\"$$1\"") - } -} - +QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc) +QDOC_MAINFILE = $$PWD/qbs.qdocconf HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator) VERSION_TAG = $$replace(QBS_VERSION, "[-.]", ) @@ -38,7 +27,6 @@ QHP_FILE = $$HTML_DOC_PATH/qbs.qhp QCH_FILE = $$OUT_PWD/doc/qbs.qch HELP_DEP_FILES = $$PWD/qbs.qdoc \ - $$PWD/config/compat-qt4.qdocconf \ $$PWD/config/macros.qdocconf \ $$PWD/config/qt-cpp-ignore.qdocconf \ $$PWD/config/qt-html-templates.qdocconf \ diff --git a/doc/doc.qbs b/doc/doc.qbs index c28289701..575bfaa08 100644 --- a/doc/doc.qbs +++ b/doc/doc.qbs @@ -13,7 +13,7 @@ Product { ] Group { name: "main qdocconf file" - files: Qt.core.versionMajor >= 5 ? "qbs.qdocconf" : "qbs-qt4.qdocconf" + files: "qbs.qdocconf" fileTags: "qdocconf-main" } diff --git a/doc/qbs-qt4.qdocconf b/doc/qbs-qt4.qdocconf deleted file mode 100644 index dcbf04d90..000000000 --- a/doc/qbs-qt4.qdocconf +++ /dev/null @@ -1,3 +0,0 @@ -include(config/compat-qt4.qdocconf) -include(config/qbs-project.qdocconf) -include(config/qt-html-templates.qdocconf) diff --git a/doc/qbs.qdoc b/doc/qbs.qdoc index 12e31fea1..5ed0db3b4 100644 --- a/doc/qbs.qdoc +++ b/doc/qbs.qdoc @@ -122,7 +122,7 @@ \list - \li Qt >= 4.8 + \li Qt >= 5.1.0 \endlist @@ -21,9 +21,9 @@ defineTest(minQtVersion) { return(false) } -!minQtVersion(4, 8, 0) { +!minQtVersion(5, 1, 0) { message("Cannot build qbs with Qt version $${QT_VERSION}.") - error("Use at least Qt 4.8.0.") + error("Use at least Qt 5.1.0.") } TEMPLATE = subdirs diff --git a/src/lib/corelib/language/moduleloader.cpp b/src/lib/corelib/language/moduleloader.cpp index 854977287..4d49c7497 100644 --- a/src/lib/corelib/language/moduleloader.cpp +++ b/src/lib/corelib/language/moduleloader.cpp @@ -1384,11 +1384,7 @@ void ModuleLoader::setScopeForDescendants(Item *item, Item *scope) QString ModuleLoader::fullModuleName(const QStringList &moduleName) { -#if QT_VERSION >= 0x050000 return moduleName.join(QLatin1Char('.')); -#else - return moduleName.join(QLatin1String(".")); -#endif } void ModuleLoader::overrideItemProperties(Item *item, const QString &buildConfigKey, diff --git a/src/lib/corelib/tools/buildgraphlocker.cpp b/src/lib/corelib/tools/buildgraphlocker.cpp index 4b21b3b91..9127c4baa 100644 --- a/src/lib/corelib/tools/buildgraphlocker.cpp +++ b/src/lib/corelib/tools/buildgraphlocker.cpp @@ -42,11 +42,8 @@ namespace qbs { namespace Internal { BuildGraphLocker::BuildGraphLocker(const QString &buildGraphFilePath) -#if HAS_QLOCKFILE : m_lockFile(buildGraphFilePath + QLatin1String(".lock")) -#endif { -#if HAS_QLOCKFILE const QString buildDir = QFileInfo(buildGraphFilePath).absolutePath(); if (!QDir::root().mkpath(buildDir)) throw ErrorInfo(Tr::tr("Cannot lock build graph file '%1': Failed to create directory.")); @@ -81,16 +78,11 @@ BuildGraphLocker::BuildGraphLocker(const QString &buildGraphFilePath) // with the subsequent getLockInfo() failing as well. throw ErrorInfo(Tr::tr("Cannot lock build graph file '%1' (reason unknown).") .arg(buildGraphFilePath)); -#else - Q_UNUSED(buildGraphFilePath); -#endif } BuildGraphLocker::~BuildGraphLocker() { -#if HAS_QLOCKFILE m_lockFile.unlock(); -#endif } } // namespace Internal diff --git a/src/lib/corelib/tools/buildgraphlocker.h b/src/lib/corelib/tools/buildgraphlocker.h index c49617c73..5880e68cf 100644 --- a/src/lib/corelib/tools/buildgraphlocker.h +++ b/src/lib/corelib/tools/buildgraphlocker.h @@ -31,13 +31,7 @@ #ifndef QBS_BUILDGRAPHLOCKER_H #define QBS_BUILDGRAPHLOCKER_H -#include <QtGlobal> - -#define HAS_QLOCKFILE (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)) - -#if HAS_QLOCKFILE #include <QLockFile> -#endif QT_BEGIN_NAMESPACE class QString; @@ -53,9 +47,7 @@ public: ~BuildGraphLocker(); private: -#if HAS_QLOCKFILE QLockFile m_lockFile; -#endif }; } // namespace Internal diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp index e6250319a..9b72c0f04 100644 --- a/tests/auto/api/tst_api.cpp +++ b/tests/auto/api/tst_api.cpp @@ -244,9 +244,6 @@ void TestApi::buildGraphLocking() Q_UNUSED(project); setupJob.reset(qbs::Project().setupProject(setupParams, m_logSink, 0)); waitForFinished(setupJob.data()); -#if QT_VERSION < QT_VERSION_CHECK(5, 1, 0) - QEXPECT_FAIL("", "Build graph locking requires Qt >= 5.1", Abort); -#endif QVERIFY(setupJob->error().hasError()); QVERIFY2(setupJob->error().toString().contains("lock"), qPrintable(setupJob->error().toString())); diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 7e31b0fed..7f1f21252 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -1285,7 +1285,7 @@ void TestBlackbox::jsExtensionsProcess() void TestBlackbox::jsExtensionsPropertyList() { if (!HostOsInfo::isOsxHost()) - SKIP_TEST("temporarily only applies on OS X"); + QSKIP("temporarily only applies on OS X"); QDir::setCurrent(testDataDir + "/jsextensions"); QbsRunParameters params(QStringList() << "-nf" << "propertylist.qbs"); @@ -1654,7 +1654,7 @@ void TestBlackbox::testNsis() } if (!haveMakeNsis) { - SKIP_TEST("makensis is not installed"); + QSKIP("makensis is not installed"); return; } @@ -1671,7 +1671,7 @@ void TestBlackbox::testNsis() void TestBlackbox::testEmbedInfoPlist() { if (!HostOsInfo::isOsxHost()) - SKIP_TEST("only applies on OS X"); + QSKIP("only applies on OS X"); QDir::setCurrent(testDataDir + QLatin1String("/embedInfoPlist")); @@ -1720,12 +1720,12 @@ static bool haveWiX() void TestBlackbox::testWiX() { if (!HostOsInfo::isWindowsHost()) { - SKIP_TEST("only applies on Windows"); + QSKIP("only applies on Windows"); return; } if (!haveWiX()) { - SKIP_TEST("WiX is not installed"); + QSKIP("WiX is not installed"); return; } @@ -1770,7 +1770,7 @@ static bool haveNodeJs() void TestBlackbox::testNodeJs() { if (!haveNodeJs()) { - SKIP_TEST("Node.js is not installed"); + QSKIP("Node.js is not installed"); return; } @@ -1786,7 +1786,7 @@ void TestBlackbox::testNodeJs() void TestBlackbox::testTypeScript() { if (!haveNodeJs()) { - SKIP_TEST("node.js is not installed"); + QSKIP("node.js is not installed"); return; } @@ -1805,7 +1805,7 @@ void TestBlackbox::testTypeScript() void TestBlackbox::testIconset() { if (!HostOsInfo::isOsxHost()) - SKIP_TEST("only applies on OS X"); + QSKIP("only applies on OS X"); QDir::setCurrent(testDataDir + QLatin1String("/ib/iconset")); @@ -1820,7 +1820,7 @@ void TestBlackbox::testIconset() void TestBlackbox::testIconsetApp() { if (!HostOsInfo::isOsxHost()) - SKIP_TEST("only applies on OS X"); + QSKIP("only applies on OS X"); QDir::setCurrent(testDataDir + QLatin1String("/ib/iconsetapp")); @@ -1835,10 +1835,10 @@ void TestBlackbox::testIconsetApp() void TestBlackbox::testAssetCatalog() { if (!HostOsInfo::isOsxHost()) - SKIP_TEST("only applies on OS X"); + QSKIP("only applies on OS X"); #ifdef Q_OS_MAC if (QSysInfo::macVersion() < Q_MV_OSX(10, 9)) - SKIP_TEST("This test needs at least OS X 10.9."); + QSKIP("This test needs at least OS X 10.9."); #endif QDir::setCurrent(testDataDir + QLatin1String("/ib/assetcatalog")); @@ -1883,7 +1883,7 @@ void TestBlackbox::testAssetCatalog() void TestBlackbox::testObjcArc() { if (!HostOsInfo::isOsxHost()) - SKIP_TEST("only applies on platforms supporting Objective-C"); + QSKIP("only applies on platforms supporting Objective-C"); QDir::setCurrent(testDataDir + QLatin1String("/objc-arc")); diff --git a/tests/auto/shared.h b/tests/auto/shared.h index fc36d8e67..ea45f727e 100644 --- a/tests/auto/shared.h +++ b/tests/auto/shared.h @@ -41,12 +41,6 @@ #include <ctime> -#if QT_VERSION >= 0x050000 -#define SKIP_TEST(message) QSKIP(message) -#else -#define SKIP_TEST(message) QSKIP(message, SkipAll) -#endif - inline QString profileName() { return QLatin1String("qbs_autotests"); } inline QString relativeBuildDir() { return profileName() + QLatin1String("-debug"); } |