summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/kernel')
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro2
-rw-r--r--tests/auto/corelib/kernel/qtimer/qtimer.pro2
-rw-r--r--tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp4
-rw-r--r--tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp11
4 files changed, 14 insertions, 5 deletions
diff --git a/tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro b/tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro
index e37542be65..1a76085c1b 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro
+++ b/tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro
@@ -5,5 +5,5 @@ SOURCES = tst_qcoreapplication.cpp
HEADERS = tst_qcoreapplication.h
win32: VERSION = 1.2.3.4
else: VERSION = 1.2.3
-darwin: QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,$$shell_quote($$PWD/Info.plist)
+QMAKE_INFO_PLIST = $$PWD/Info.plist
requires(qtConfig(private_tests))
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 343a9384bc..2c6d9ea7c0 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/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
index 304f6121a5..15a39b62c0 100644
--- a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
+++ b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
@@ -41,6 +41,7 @@ protected slots:
void simple_activated();
void simple_timerSet();
private slots:
+ void simple_data();
void simple();
void manyNotifiers();
@@ -61,9 +62,17 @@ void tst_QWinEventNotifier::simple_timerSet()
SetEvent((HANDLE)simpleHEvent);
}
+void tst_QWinEventNotifier::simple_data()
+{
+ QTest::addColumn<bool>("resetManually");
+ QTest::newRow("manual_reset") << true;
+ QTest::newRow("auto_reset") << false;
+}
+
void tst_QWinEventNotifier::simple()
{
- simpleHEvent = CreateEvent(0, true, false, 0);
+ QFETCH(bool, resetManually);
+ simpleHEvent = CreateEvent(0, resetManually, false, 0);
QVERIFY(simpleHEvent);
QWinEventNotifier n(simpleHEvent);