diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-22 21:58:37 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-22 21:58:45 +0200 |
commit | 2111bf00fef0185d70d3247e74c2c57080711ee0 (patch) | |
tree | 276558c07b3f22e4e5905ab093dc71e02df24fe9 /src/testlib/qtestcase.cpp | |
parent | 53f0b43a4bfa65ad62bb0c144bab7236ad322b8c (diff) | |
parent | 881bda9e6ecdd8729edf7df68f94f72f5d7c9042 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I4f4ab05b2de67cd4b1d29b294b96a8c9ffb964b2
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r-- | src/testlib/qtestcase.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 703af6b677..f3aaa7c89d 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -72,6 +72,9 @@ #if defined(HAVE_XCTEST) #include <QtTest/private/qxctestlogger_p.h> #endif +#if defined Q_OS_MACOS +#include <QtTest/private/qtestutil_macos_p.h> +#endif #include <numeric> #include <algorithm> @@ -1648,6 +1651,9 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) #if defined(Q_OS_MACX) bool macNeedsActivate = qApp && (qstrcmp(qApp->metaObject()->className(), "QApplication") == 0); IOPMAssertionID powerID; + + // Don't restore saved window state for auto tests. + QTestPrivate::disableWindowRestore(); #endif #ifndef QT_NO_EXCEPTIONS try { |