testlib: Let loggers know which test function is being left

None of the loggers rely on this at the moment, but one could imagine
one that does. Plus, doing any sort of debug logging in leaveTestFunction
will at the moment be attributed to  UnknownTestFunc().

Pick-to: 6.2
Change-Id: I284b2785a276e028b9f57c26357679fd9e045ca7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
bb10
Tor Arne Vestbø 2021-08-05 18:21:22 +02:00
parent 072e5d2a8f
commit d9fd41a1fe
1 changed files with 2 additions and 2 deletions

View File

@ -231,10 +231,10 @@ void QTestResult::finishedCurrentTestDataCleanup()
*/
void QTestResult::finishedCurrentTestFunction()
{
QTestLog::leaveTestFunction();
QTest::currentTestFunc = nullptr;
QTest::resetFailed();
QTestLog::leaveTestFunction();
}
const char *QTestResult::currentTestFunction()