diff --git a/src/plugins/classview/classviewmanager.cpp b/src/plugins/classview/classviewmanager.cpp index e72bbb29954..90301a7c87c 100644 --- a/src/plugins/classview/classviewmanager.cpp +++ b/src/plugins/classview/classviewmanager.cpp @@ -99,7 +99,7 @@ void ManagerPrivate::resetParser() QHash> projectData; for (const Project *project : SessionManager::projects()) { projectData.insert(project->projectFilePath(), - qMakePair(project->displayName(), project->files(Project::SourceFiles))); + {project->displayName(), project->files(Project::SourceFiles)}); } QMetaObject::invokeMethod(m_parser, [this, projectData]() { m_parser->resetData(projectData); diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 828ca013b1d..326fa93b733 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -2829,8 +2829,7 @@ void CppDebuggerEngine::validateRunParameters(DebuggerRunParameters &rp) if (it.key().startsWith('(')) { const QString expanded = rp.macroExpander->expand(it.value()); if (!expanded.isEmpty()) - globalRegExpSourceMap.push_back( - qMakePair(QRegularExpression(it.key()), expanded)); + globalRegExpSourceMap.push_back({QRegularExpression(it.key()), expanded}); } } if (globalRegExpSourceMap.isEmpty()) diff --git a/src/plugins/git/gerrit/gerritpushdialog.cpp b/src/plugins/git/gerrit/gerritpushdialog.cpp index 3e6365191f3..00fd6836ffb 100644 --- a/src/plugins/git/gerrit/gerritpushdialog.cpp +++ b/src/plugins/git/gerrit/gerritpushdialog.cpp @@ -305,7 +305,7 @@ void GerritPushDialog::setRemoteBranches(bool includeOld) const QStringList remoteBranches = GitClient::instance()->synchronousRepositoryBranches(remoteName, m_workingDir); for (const QString &branch : remoteBranches) - m_remoteBranches.insertMulti(remoteName, qMakePair(branch, QDate())); + m_remoteBranches.insertMulti(remoteName, {branch, {}}); if (remoteBranches.isEmpty()) { m_ui->targetBranchComboBox->setEditable(true); m_ui->targetBranchComboBox->setToolTip( diff --git a/src/plugins/valgrind/callgrind/callgrindparser.cpp b/src/plugins/valgrind/callgrind/callgrindparser.cpp index 3b188d4029f..e012168001f 100644 --- a/src/plugins/valgrind/callgrind/callgrindparser.cpp +++ b/src/plugins/valgrind/callgrind/callgrindparser.cpp @@ -320,11 +320,11 @@ Parser::Private::NamePair Parser::Private::parseName(const char *begin, const ch if (*current == '(') { current++; if ((nameShorthand = parseNameShorthand(¤t, end)) == -1) - return qMakePair(qint64(-1), QString()); // error + return {qint64(-1), {}}; // error } skipSpace(¤t, end); - return qMakePair(nameShorthand, QString::fromUtf8(QByteArray(current, end - current))); + return {nameShorthand, QString::fromUtf8(QByteArray(current, end - current))}; } /* diff --git a/src/plugins/valgrind/valgrindmemcheckparsertest.cpp b/src/plugins/valgrind/valgrindmemcheckparsertest.cpp index 8b3b446b8d4..0d4253c4d13 100644 --- a/src/plugins/valgrind/valgrindmemcheckparsertest.cpp +++ b/src/plugins/valgrind/valgrindmemcheckparsertest.cpp @@ -284,13 +284,11 @@ void ValgrindMemcheckParserTest::testMemcheckSample1() expectedErrors << error; } - QVector > expectedErrorCounts; - expectedErrorCounts.push_back(QPair(9, 2)); - - QVector > expectedSuppCounts; - expectedSuppCounts.push_back(qMakePair(QString("X on SUSE11 writev uninit padding"), static_cast(12))); - expectedSuppCounts.push_back(qMakePair(QString("dl-hack3-cond-1"), static_cast(2))); - expectedSuppCounts.push_back(qMakePair(QString("glibc-2.5.x-on-SUSE-10.2-(PPC)-2a"), static_cast(2))); + const QVector> expectedErrorCounts{{9, 2}}; + const QVector> expectedSuppCounts{ + {QString("X on SUSE11 writev uninit padding"), 12}, + {QString("dl-hack3-cond-1"), 2}, + {QString("glibc-2.5.x-on-SUSE-10.2-(PPC)-2a"), 2}}; Parser parser; Recorder rec(&parser); diff --git a/src/plugins/valgrind/valgrindmemcheckparsertest.h b/src/plugins/valgrind/valgrindmemcheckparsertest.h index 12966b3a46b..2343a6fcec1 100644 --- a/src/plugins/valgrind/valgrindmemcheckparsertest.h +++ b/src/plugins/valgrind/valgrindmemcheckparsertest.h @@ -51,12 +51,12 @@ public: void errorCount(qint64 unique, qint64 count) { - errorcounts.push_back(qMakePair(unique, count)); + errorcounts.push_back({unique, count}); } void suppressionCount(const QString &name, qint64 count) { - suppcounts.push_back(qMakePair(name, count)); + suppcounts.push_back({name, count}); } };