forked from qt-creator/qt-creator
Utils: Add sorted() function
For simpler calling code. Change-Id: Ia0a16a28770fd172f74d06a626148248bf5d3c0c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -135,8 +135,8 @@ void TestCodeParser::updateTestTree(const QSet<ITestParser *> &parsers)
|
||||
|
||||
m_postponedUpdateType = UpdateType::NoUpdate;
|
||||
qCDebug(LOG) << "calling scanForTests (updateTestTree)";
|
||||
QList<ITestParser *> sortedParsers = Utils::toList(parsers);
|
||||
Utils::sort(sortedParsers, [](const ITestParser *lhs, const ITestParser *rhs) {
|
||||
const QList<ITestParser *> sortedParsers = Utils::sorted(Utils::toList(parsers),
|
||||
[](const ITestParser *lhs, const ITestParser *rhs) {
|
||||
return lhs->framework()->priority() < rhs->framework()->priority();
|
||||
});
|
||||
scanForTests(Utils::FilePaths(), sortedParsers);
|
||||
|
||||
Reference in New Issue
Block a user