diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2017-08-14 21:28:57 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-08-22 05:10:43 +0000 |
commit | 1497e5853beac21c1d40ea377f6d6f41b5a30082 (patch) | |
tree | d4a53ae19570a7f3eec9907d73b8dad8c68ad99b /src/testlib/qtestcase.cpp | |
parent | 8b8578a155b7932a79049174f913eea3379c0f28 (diff) |
QTestLib: Disable App Nap on macOS
App Nap may cause stalls or timer delays during test runs.
Change-Id: I828282d12127918439a9a2a4f7d7be6cac457b42
Task-number: QTBUG-61499
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r-- | src/testlib/qtestcase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index a4099c3cd8..cbd38d0788 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1728,6 +1728,9 @@ void QTest::qInit(QObject *testObject, int argc, char **argv) // Don't restore saved window state for auto tests. QTestPrivate::disableWindowRestore(); + + // Disable App Nap which may cause tests to stall. + QTestPrivate::AppNapDisabler appNapDisabler; #endif #if defined(Q_OS_MACX) |