summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/projectexplorer.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2022-09-30 15:57:27 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2022-10-04 09:02:22 +0000
commit898053533a54ccdceb568d5efa80c24d1ad64b43 (patch)
treec990f87a455553ef47355dc9cd75b1fab323832f /src/plugins/projectexplorer/projectexplorer.cpp
parent50f2f57f6a783aa59d14326313fb9907e8b4ed86 (diff)
downloadqt-creator-898053533a54ccdceb568d5efa80c24d1ad64b43.tar.gz
ProjectExplorer: Limit the usage of qMakePair
Make the code less verbose. Change-Id: If9fe08a6a7538d34c80ca97a2aec21a2bd6e5d22 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/projectexplorer.cpp')
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 030e92da3c..8ef24d8ed3 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -3247,7 +3247,7 @@ QList<QPair<CommandLine, ProcessHandle>> ProjectExplorerPlugin::runningRunContro
const QList<RunControl *> runControls = allRunControls();
for (RunControl *rc : runControls) {
if (rc->isRunning())
- processes << qMakePair(rc->commandLine(), rc->applicationProcessHandle());
+ processes.push_back({rc->commandLine(), rc->applicationProcessHandle()});
}
return processes;
}
@@ -3420,7 +3420,7 @@ void ProjectExplorerPluginPrivate::addToRecentProjects(const FilePath &filePath,
if (m_recentProjects.count() > m_maxRecentProjects)
m_recentProjects.removeLast();
- m_recentProjects.prepend(qMakePair(filePath, displayName));
+ m_recentProjects.push_front({filePath, displayName});
m_lastOpenDirectory = filePath.absolutePath();
emit m_instance->recentProjectsChanged();
}
@@ -3947,10 +3947,10 @@ void ProjectExplorerPluginPrivate::removeFile()
const FilePath filePath = currentNode->filePath();
using NodeAndPath = QPair<const Node *, FilePath>;
- QList<NodeAndPath> filesToRemove{qMakePair(currentNode, currentNode->filePath())};
+ QList<NodeAndPath> filesToRemove{{currentNode, currentNode->filePath()}};
QList<NodeAndPath> siblings;
for (const Node * const n : ProjectTree::siblingsWithSameBaseName(currentNode))
- siblings << qMakePair(n, n->filePath());
+ siblings.push_back({n, n->filePath()});
RemoveFileDialog removeFileDialog(filePath, ICore::dialogParent());
if (removeFileDialog.exec() != QDialog::Accepted)