diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-01-31 19:02:08 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-02-01 00:49:23 +0100 |
commit | facb8b74911cc9ff0fd61b4d31f45b14a5c004cf (patch) | |
tree | 9959ddfb7dac05fa83b48128b117763830d16561 /src/testlib/qtestcase.cpp | |
parent | 0dc31e667fc66ed98e855a0553958555e2fab2d5 (diff) |
testlib: Properly cleanup after caught exception
We were only doing half of what qCleanup was doing in the
exception case, and in an inconsistent order. There's no
reason not to just call qCleanup to align the behavior.
Change-Id: Ic4e63afb4733de5b01a79272cca8908fca3de762
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r-- | src/testlib/qtestcase.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 76a1b36a61..02eb8a1661 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1957,13 +1957,7 @@ int QTest::qRun() QTestResult::setCurrentTestFunction(nullptr); } - QTestLog::stopLogging(); - -#if defined(Q_OS_MACOS) - IOPMAssertionRelease(macPowerSavingDisabled); -#endif - - currentTestObject = nullptr; + qCleanup(); // Re-throw exception to make debugging easier throw; |