diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-09-22 11:20:54 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-09-29 03:30:13 +0000 |
commit | 7fd3cc3980a25bfbc9c0aca935c2afa90230374a (patch) | |
tree | 5565efe0b903effcef7a0d9643b7822a090a23e2 /tests | |
parent | 0f5c4ba7cbd628a29d3e84219834c20c29cd6741 (diff) |
Clean up OS version checks for Apple platforms
Convert QSysInfo/QOperatingSystemVersion to __builtin_available where
required or possible, or to QOperatingSystemVersion where
__builtin_available cannot be used and is not needed (such as negated
conditions, which are not supported by that construct).
Change-Id: I83c0e7e777605b99ff4d24598bfcccf22126fdda
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/kernel/qtimer/qtimer.pro | 2 | ||||
-rw-r--r-- | tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp | 4 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qguitimer/qguitimer.pro | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/corelib/kernel/qtimer/qtimer.pro b/tests/auto/corelib/kernel/qtimer/qtimer.pro index b27d862bc5..710dfea682 100644 --- a/tests/auto/corelib/kernel/qtimer/qtimer.pro +++ b/tests/auto/corelib/kernel/qtimer/qtimer.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qtimer -QT = core testlib +QT = core core-private testlib SOURCES = tst_qtimer.cpp # Force C++17 if available diff --git a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp index e17d8ee38b..b921c0f13d 100644 --- a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp +++ b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp @@ -33,11 +33,11 @@ # include <QtCore/QCoreApplication> #endif +#include <QtCore/private/qglobal_p.h> #include <QtTest/QtTest> #include <qtimer.h> #include <qthread.h> -#include <qoperatingsystemversion.h> #if defined Q_OS_UNIX #include <unistd.h> @@ -500,7 +500,7 @@ void tst_QTimer::moveToThread() #if defined(Q_OS_WIN32) QSKIP("Does not work reliably on Windows :("); #elif defined(Q_OS_MACOS) - if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSSierra) + if (__builtin_available(macOS 10.12, *)) QSKIP("Does not work reliably on macOS 10.12 (QTBUG-59679)"); #endif QTimer ti1; diff --git a/tests/auto/gui/kernel/qguitimer/qguitimer.pro b/tests/auto/gui/kernel/qguitimer/qguitimer.pro index 8a71e48007..9c58f0e22c 100644 --- a/tests/auto/gui/kernel/qguitimer/qguitimer.pro +++ b/tests/auto/gui/kernel/qguitimer/qguitimer.pro @@ -1,4 +1,4 @@ CONFIG += testcase TARGET = tst_qguitimer -QT = core gui testlib +QT = core core-private gui testlib SOURCES += ../../../corelib/kernel/qtimer/tst_qtimer.cpp |