From 898053533a54ccdceb568d5efa80c24d1ad64b43 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 30 Sep 2022 15:57:27 +0200 Subject: ProjectExplorer: Limit the usage of qMakePair Make the code less verbose. Change-Id: If9fe08a6a7538d34c80ca97a2aec21a2bd6e5d22 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/projectexplorer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/projectexplorer/projectexplorer.cpp') 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> ProjectExplorerPlugin::runningRunContro const QList 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; - QList filesToRemove{qMakePair(currentNode, currentNode->filePath())}; + QList filesToRemove{{currentNode, currentNode->filePath()}}; QList 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) -- cgit v1.2.1