diff options
author | Helmut K. C. Tessarek <tessarek@evermeet.cx> | 2017-09-13 07:26:56 +0300 |
---|---|---|
committer | Olivier Goffart <olivier@woboq.com> | 2017-09-15 08:11:05 +0300 |
commit | 709aa27031f07ffbc21e0478ae0da220885a4cf3 (patch) | |
tree | 9c50f0ad23de8f9a1b02131dcc5cd02e20f179ae /test | |
parent | 5b01d634915dbdab1d79e17f6af043a9031bd283 (diff) |
remove qt4 code
Diffstat (limited to 'test')
-rw-r--r-- | test/testchecksumvalidator.cpp | 14 | ||||
-rw-r--r-- | test/testfolderman.cpp | 10 | ||||
-rw-r--r-- | test/testutility.cpp | 6 | ||||
-rw-r--r-- | test/testxmlparse.cpp | 10 |
4 files changed, 0 insertions, 40 deletions
diff --git a/test/testchecksumvalidator.cpp b/test/testchecksumvalidator.cpp index fd1988eab..d2d10096d 100644 --- a/test/testchecksumvalidator.cpp +++ b/test/testchecksumvalidator.cpp @@ -15,10 +15,6 @@ #include "filesystem.h" #include "propagatorjobs.h" -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -// poor man QTRY_VERIFY when Qt5 is not available. -#define QTRY_VERIFY(Cond) QTest::qWait(1000); QVERIFY(Cond) -#endif using namespace OCC; @@ -155,16 +151,6 @@ using namespace OCC; } }; -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -// Qt4 does not have QTEST_GUILESS_MAIN, so we simulate it. -int main(int argc, char *argv[]) -{ - QCoreApplication app(argc, argv); - TestChecksumValidator tc; - return QTest::qExec(&tc, argc, argv); -} -#else QTEST_GUILESS_MAIN(TestChecksumValidator) -#endif #include "testchecksumvalidator.moc" diff --git a/test/testfolderman.cpp b/test/testfolderman.cpp index 78a2dd71a..39c657a05 100644 --- a/test/testfolderman.cpp +++ b/test/testfolderman.cpp @@ -6,9 +6,7 @@ */ #include <qglobal.h> -#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) #include <QTemporaryDir> -#endif #include <QtTest> #include "common/utility.h" @@ -49,7 +47,6 @@ class TestFolderMan: public QObject private slots: void testCheckPathValidityForNewFolder() { -#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) QTemporaryDir dir; ConfigFile::setConfDir(dir.path()); // we don't want to pollute the user's config file QVERIFY(dir.isValid()); @@ -149,14 +146,10 @@ private slots: // Should not have the rights QVERIFY(!folderman->checkPathValidityForNewFolder("/").isNull()); QVERIFY(!folderman->checkPathValidityForNewFolder("/usr/bin/somefolder").isNull()); -#else - QSKIP("Test not supported with Qt4", SkipSingle); -#endif } void testFindGoodPathForNewSyncFolder() { -#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) // SETUP QTemporaryDir dir; @@ -197,9 +190,6 @@ private slots: QString(dirPath + "/ownCloud2/bar")); QCOMPARE(folderman->findGoodPathForNewSyncFolder(dirPath + "/sub", url), QString(dirPath + "/sub2")); -#else - QSKIP("Test not supported with Qt4", SkipSingle); -#endif } }; diff --git a/test/testutility.cpp b/test/testutility.cpp index 5e86a336e..c83b14199 100644 --- a/test/testutility.cpp +++ b/test/testutility.cpp @@ -5,9 +5,7 @@ */ #include <QtTest> -#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) #include <QTemporaryDir> -#endif #include "common/utility.h" @@ -156,15 +154,12 @@ private slots: QVERIFY(fsCasePreserving()); qputenv("OWNCLOUD_TEST_CASE_PRESERVING", "0"); QVERIFY(! fsCasePreserving()); -#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) qunsetenv("OWNCLOUD_TEST_CASE_PRESERVING"); QVERIFY(isMac() || isWindows() ? fsCasePreserving() : ! fsCasePreserving()); -#endif } void testFileNamesEqual() { -#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) QTemporaryDir dir; QVERIFY(dir.isValid()); QDir dir2(dir.path()); @@ -190,7 +185,6 @@ private slots: dir.remove(); qunsetenv("OWNCLOUD_TEST_CASE_PRESERVING"); -#endif } diff --git a/test/testxmlparse.cpp b/test/testxmlparse.cpp index 4b7f7bd69..9ec675f47 100644 --- a/test/testxmlparse.cpp +++ b/test/testxmlparse.cpp @@ -441,16 +441,6 @@ private slots: }; -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -// Qt4 does not have QTEST_GUILESS_MAIN, so we simulate it. -int main(int argc, char *argv[]) -{ - QCoreApplication app(argc, argv); - TestXmlParse tc; - return QTest::qExec(&tc, argc, argv); -} -#else QTEST_GUILESS_MAIN(TestXmlParse) -#endif #include "testxmlparse.moc" |