diff options
author | Kalle Viironen <kalle.viironen@qt.io> | 2023-08-29 09:46:41 +0300 |
---|---|---|
committer | Kalle Viironen <kalle.viironen@qt.io> | 2023-11-16 12:42:58 +0300 |
commit | 0650e7b99a23667cbd49fedb78e057a67bf8d58d (patch) | |
tree | d1d590f33b0f0cfd3120a55f4924bf0ff66d57a4 /src/qmltest/quicktestresult.cpp | |
parent | 675aea369c0906600fedc7ab8164dfeb05924fdc (diff) |
qmltest: Move the remaining blacklist setting into caller functions
QTestPrivate::checkBlackLists function now returns true if the
test case is blacklisted, so we can move the remaining blacklist
setting from checkBlackLists into callig functions.
Change-Id: I27e26e56aecbf6b05289a57d9fcff86897a173da
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Diffstat (limited to 'src/qmltest/quicktestresult.cpp')
-rw-r--r-- | src/qmltest/quicktestresult.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp index 98d6f7912a..9c7dc89f66 100644 --- a/src/qmltest/quicktestresult.cpp +++ b/src/qmltest/quicktestresult.cpp @@ -223,7 +223,8 @@ void QuickTestResult::setFunctionName(const QString &name) QString fullName = d->testCaseName + QLatin1String("::") + name; QTestResult::setCurrentTestFunction (d->intern(fullName).constData()); - QTestPrivate::checkBlackLists(fullName.toUtf8().constData(), nullptr); + if (QTestPrivate::checkBlackLists(fullName.toUtf8().constData(), nullptr)) + QTestResult::setBlacklistCurrentTest(true); } } else { QTestResult::setCurrentTestFunction(nullptr); @@ -252,7 +253,10 @@ void QuickTestResult::setDataTag(const QString &tag) if (!tag.isEmpty()) { QTestData *data = &(QTest::newRow(tag.toUtf8().constData())); QTestResult::setCurrentTestData(data); - QTestPrivate::checkBlackLists((testCaseName() + QLatin1String("::") + functionName()).toUtf8().constData(), tag.toUtf8().constData()); + if (QTestPrivate::checkBlackLists((testCaseName() + QLatin1String("::") + + functionName()).toUtf8().constData(), tag.toUtf8().constData())) { + QTestResult::setBlacklistCurrentTest(true); + } emit dataTagChanged(); } else { QTestResult::setCurrentTestData(nullptr); |