AutoTest: Pass context object to lambda connections

Remove some unneeded lambda () brackets.
Glue lambda brackets with parameters brackets.

Change-Id: I414f7dbbaf60b452cb71f77d53d972937f121a47
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Jarek Kobus
2022-12-07 14:45:43 +01:00
parent f6913ce791
commit 9e571931d0
13 changed files with 48 additions and 55 deletions

View File

@@ -46,7 +46,7 @@ TestCodeParser::TestCodeParser()
connect(&m_futureWatcher, &QFutureWatcher<TestParseResultPtr>::finished,
this, &TestCodeParser::onFinished);
connect(&m_futureWatcher, &QFutureWatcher<TestParseResultPtr>::resultReadyAt,
this, [this] (int index) {
this, [this](int index) {
emit testParseResultReady(m_futureWatcher.resultAt(index));
});
connect(this, &TestCodeParser::parsingFinished, this, &TestCodeParser::releaseParserInternals);
@@ -112,7 +112,7 @@ void TestCodeParser::emitUpdateTestTree(ITestParser *parser)
qCDebug(LOG) << "adding singleShot";
m_singleShotScheduled = true;
QTimer::singleShot(1000, this, [this]() { updateTestTree(m_updateParsers); });
QTimer::singleShot(1000, this, [this] { updateTestTree(m_updateParsers); });
}
void TestCodeParser::updateTestTree(const QSet<ITestParser *> &parsers)
@@ -310,7 +310,7 @@ void TestCodeParser::scanForTests(const Utils::FilePaths &fileList,
TestTreeModel::instance()->updateCheckStateCache();
if (isFullParse) {
// remove qml files as they will be found automatically by the referencing cpp file
list = Utils::filtered(list, [] (const Utils::FilePath &fn) {
list = Utils::filtered(list, [](const Utils::FilePath &fn) {
return !fn.endsWith(".qml");
});
if (!parsers.isEmpty()) {