forked from qt-creator/qt-creator
AutoTest: Make code more symmetric
... by assuming that active.keys() is a subset of TestFrameworkManager::registeredFrameworks() which is used in the case above. Also, TestFrameworkManager::registeredFrameworks() is already sorted, as can be seen from the above case, too. Change-Id: If82c8c998716fa56d6257d3ee0ec09c12d458bb1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -316,10 +316,10 @@ void TestTreeModel::synchronizeTestFrameworks()
|
|||||||
} else { // we've got custom project settings
|
} else { // we've got custom project settings
|
||||||
const TestProjectSettings *settings = AutotestPlugin::projectSettings(project);
|
const TestProjectSettings *settings = AutotestPlugin::projectSettings(project);
|
||||||
const QHash<ITestFramework *, bool> active = settings->activeFrameworks();
|
const QHash<ITestFramework *, bool> active = settings->activeFrameworks();
|
||||||
sorted = Utils::filtered(active.keys(), [active](ITestFramework *framework) {
|
sorted = Utils::filtered(TestFrameworkManager::registeredFrameworks(),
|
||||||
return active.value(framework);
|
[active](ITestFramework *framework) {
|
||||||
|
return active.value(framework, false);
|
||||||
});
|
});
|
||||||
Utils::sort(sorted, &ITestFramework::priority);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// pre-check to avoid further processing when frameworks are unchanged
|
// pre-check to avoid further processing when frameworks are unchanged
|
||||||
|
|||||||
Reference in New Issue
Block a user