diff --git a/kdevplatform/shell/runtimecontroller.cpp b/kdevplatform/shell/runtimecontroller.cpp --- a/kdevplatform/shell/runtimecontroller.cpp +++ b/kdevplatform/shell/runtimecontroller.cpp @@ -61,7 +61,7 @@ } addRuntimes(new IdentityRuntime); - setCurrentRuntime(m_runtimes.constFirst()); + setCurrentRuntime(m_runtimes.first()); if (haveUI) { setupActions(); diff --git a/plugins/android/androidruntime.cpp b/plugins/android/androidruntime.cpp --- a/plugins/android/androidruntime.cpp +++ b/plugins/android/androidruntime.cpp @@ -76,7 +76,7 @@ void AndroidRuntime::startProcess(KProcess* process) const { - if (process->program().constFirst().endsWith(QLatin1String("cmake"))) { + if (process->program().first().endsWith(QLatin1String("cmake"))) { process->setProgram(process->program() << args()); setEnvironmentVariables(process); } diff --git a/plugins/cmake/cmakeutils.cpp b/plugins/cmake/cmakeutils.cpp --- a/plugins/cmake/cmakeutils.cpp +++ b/plugins/cmake/cmakeutils.cpp @@ -698,20 +698,20 @@ test.arguments = kTransform(args, [](const CMakeFunctionArgument& arg) { return arg.value; }); tests += test; } else if (entry.name == QLatin1String("subdirs")) { - tests += importTestSuites(Path(buildDir, entry.arguments.constFirst().value)); + tests += importTestSuites(Path(buildDir, entry.arguments.first().value)); } else if (entry.name == QLatin1String("set_tests_properties")) { if(entry.arguments.count() < 4 || entry.arguments.count() % 2) { qCWarning(CMAKE) << "found set_tests_properties() with unexpected number of arguments:" << entry.arguments.count(); continue; } - if (tests.isEmpty() || entry.arguments.constFirst().value != tests.constLast().name) { - qCWarning(CMAKE) << "found set_tests_properties(" << entry.arguments.constFirst().value - << " ...), but expected test " << tests.constLast().name; + if (tests.isEmpty() || entry.arguments.first().value != tests.last().name) { + qCWarning(CMAKE) << "found set_tests_properties(" << entry.arguments.first().value + << " ...), but expected test " << tests.last().name; continue; } if (entry.arguments[1].value != QLatin1String("PROPERTIES")) { - qCWarning(CMAKE) << "found set_tests_properties(" << entry.arguments.constFirst().value + qCWarning(CMAKE) << "found set_tests_properties(" << entry.arguments.first().value << entry.arguments.at(1).value << "...), but expected PROPERTIES as second argument"; continue; } diff --git a/plugins/cmake/testing/ctestutils.cpp b/plugins/cmake/testing/ctestutils.cpp --- a/plugins/cmake/testing/ctestutils.cpp +++ b/plugins/cmake/testing/ctestutils.cpp @@ -59,7 +59,7 @@ if (target.artifacts.isEmpty()) { continue; } - executablePath = target.artifacts.constFirst(); + executablePath = target.artifacts.first(); } CTestSuite* suite = new CTestSuite(test.name, executablePath, {}, project, test.arguments, test.properties); diff --git a/plugins/cmake/tests/test_cmakemanager.cpp b/plugins/cmake/tests/test_cmakemanager.cpp --- a/plugins/cmake/tests/test_cmakemanager.cpp +++ b/plugins/cmake/tests/test_cmakemanager.cpp @@ -379,7 +379,7 @@ const auto targets = project->projectItem()->targetList(); QCOMPARE(targets.count(), 1); - const auto target = targets.constFirst()->executable(); + const auto target = targets.first()->executable(); QVERIFY(target); const KDevelop::Path exePath(target->executable()->builtUrl()); QCOMPARE(exePath, KDevelop::Path(project->buildSystemManager()->buildDirectory(project->projectItem()), QLatin1String("randomplace/mytest")));