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>
This commit is contained in:
parent
0dc31e667f
commit
facb8b7491
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user