From 371fc0ffa2cb283cbff2148cbc21fd310064b710 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 14 Jul 2015 15:06:42 +0200 Subject: [PATCH] Qt4 test build: QTemporaryDir only exist since Qt5 Disable that test for older versions of Qt --- test/testfolderman.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/testfolderman.h b/test/testfolderman.h index d6cfac2cd..cb5b93e96 100644 --- a/test/testfolderman.h +++ b/test/testfolderman.h @@ -7,7 +7,10 @@ #pragma once + +#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) #include +#endif #include #include "utility.h" @@ -35,6 +38,7 @@ class TestFolderMan: public QObject private slots: void testCheckPathValidityForNewFolder() { +#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) QTemporaryDir dir; QVERIFY(dir.isValid()); QDir dir2(dir.path()); @@ -81,6 +85,9 @@ private slots: QVERIFY(!folderman->checkPathValidityForNewFolder(dir.path() + "/link3").isNull()); QVERIFY(!folderman->checkPathValidityForNewFolder(dir.path() + "/link4").isNull()); QVERIFY(!folderman->checkPathValidityForNewFolder(dir.path() + "/link3/folder").isNull()); +#else + QSKIP("Test not supported with Qt4", SkipSingle); +#endif } };