CMakePM: clang-tidy fix for 'no-automatic-move'

See https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-
tidy/checks/performance/no-automatic-move.html

Change-Id: If265c9b0e2aea49e5923f079cd621e10bb958286
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2023-10-20 15:00:44 +02:00
parent 69815af272
commit 55cccfa59e
3 changed files with 3 additions and 3 deletions

View File

@@ -372,7 +372,7 @@ GroupItem CMakeBuildStep::runRecipe()
const auto onEnd = [this] { const auto onEnd = [this] {
updateDeploymentData(); updateDeploymentData();
}; };
const Group root { Group root {
ignoreReturnValue() ? finishAllAndDone : stopOnError, ignoreReturnValue() ? finishAllAndDone : stopOnError,
ProjectParserTask(onParserSetup, {}, onParserError), ProjectParserTask(onParserSetup, {}, onParserError),
defaultProcessTask(), defaultProcessTask(),

View File

@@ -1532,7 +1532,7 @@ void CMakeBuildSystem::runCTest()
if (bt != -1) { if (bt != -1) {
QSet<int> seen; QSet<int> seen;
std::function<QJsonObject(int)> findAncestor = [&](int index){ std::function<QJsonObject(int)> findAncestor = [&](int index){
const QJsonObject node = nodes.at(index).toObject(); QJsonObject node = nodes.at(index).toObject();
const int parent = node.value("parent").toInt(-1); const int parent = node.value("parent").toInt(-1);
if (parent < 0 || !Utils::insert(seen, parent)) if (parent < 0 || !Utils::insert(seen, parent))
return node; return node;

View File

@@ -228,7 +228,7 @@ FilePath CMakeTool::cmakeExecutable(const FilePath &path)
} }
} }
const FilePath resolvedPath = path.canonicalPath(); FilePath resolvedPath = path.canonicalPath();
// Evil hack to make snap-packages of CMake work. See QTCREATORBUG-23376 // Evil hack to make snap-packages of CMake work. See QTCREATORBUG-23376
if (path.osType() == OsTypeLinux && resolvedPath.fileName() == "snap") if (path.osType() == OsTypeLinux && resolvedPath.fileName() == "snap")
return path; return path;