aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/cppmodelmanager_test.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-02-07 16:59:21 +0100
committerhjk <hjk@qt.io>2017-02-08 11:21:45 +0000
commit56409f5afa9afe9c9a0d0ef3f83005b66164a9a0 (patch)
tree3529f318e7058f8e22acb08a60615b4f7c7eb9a4 /src/plugins/cpptools/cppmodelmanager_test.cpp
parent95e2d7f54509c9e5ac4a96330ddb9aaaba50db92 (diff)
Replace a few occurrences of QStringList() << ...
... by something shorter. Change-Id: I363b4e509adb07997517b2d233246a333aea4aea Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppmodelmanager_test.cpp')
-rw-r--r--src/plugins/cpptools/cppmodelmanager_test.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/plugins/cpptools/cppmodelmanager_test.cpp b/src/plugins/cpptools/cppmodelmanager_test.cpp
index 91970ae2973..97858b3c634 100644
--- a/src/plugins/cpptools/cppmodelmanager_test.cpp
+++ b/src/plugins/cpptools/cppmodelmanager_test.cpp
@@ -545,8 +545,8 @@ void CppToolsPlugin::test_modelmanager_refresh_timeStampModified_if_sourcefiles_
const QString testCpp2 = QLatin1String("source2.cpp");
const QString fileToChange = testCpp;
- const QStringList projectFiles1 = QStringList() << testCpp;
- const QStringList projectFiles2 = QStringList() << testCpp << testCpp2;
+ const QStringList projectFiles1 = { testCpp };
+ const QStringList projectFiles2 = { testCpp, testCpp2 };
// Add a file
QTest::newRow("case: add project file") << fileToChange << projectFiles1 << projectFiles2;
@@ -568,9 +568,7 @@ void CppToolsPlugin::test_modelmanager_snapshot_after_two_projects()
// Project 1
project1.create(_("test_modelmanager_snapshot_after_two_projects.1"),
_("testdata_project1"),
- QStringList() << _("foo.h")
- << _("foo.cpp")
- << _("main.cpp"));
+ { "foo.h", "foo.cpp", "main.cpp" });
refreshedFiles = helper.updateProjectInfo(project1.projectInfo);
QCOMPARE(refreshedFiles, project1.projectFiles.toSet());
@@ -582,9 +580,7 @@ void CppToolsPlugin::test_modelmanager_snapshot_after_two_projects()
// Project 2
project2.create(_("test_modelmanager_snapshot_after_two_projects.2"),
_("testdata_project2"),
- QStringList() << _("bar.h")
- << _("bar.cpp")
- << _("main.cpp"));
+ { "bar.h", "bar.cpp", "main.cpp" });
refreshedFiles = helper.updateProjectInfo(project2.projectInfo);
QCOMPARE(refreshedFiles, project2.projectFiles.toSet());
@@ -1029,7 +1025,7 @@ void CppToolsPlugin::test_modelmanager_renameIncludes()
QVERIFY(tmpDir.isValid());
const QDir workingDir(tmpDir.path());
- const QStringList fileNames = QStringList() << _("foo.h") << _("foo.cpp") << _("main.cpp");
+ const QStringList fileNames = { "foo.h", "foo.cpp", "main.cpp" };
const QString oldHeader(workingDir.filePath(_("foo.h")));
const QString newHeader(workingDir.filePath(_("bar.h")));
CppModelManager *modelManager = CppModelManager::instance();
@@ -1075,7 +1071,7 @@ void CppToolsPlugin::test_modelmanager_renameIncludesInEditor()
QVERIFY(tmpDir.isValid());
const QDir workingDir(tmpDir.path());
- const QStringList fileNames = QStringList() << _("foo.h") << _("foo.cpp") << _("main.cpp");
+ const QStringList fileNames = { "foo.h", "foo.cpp", "main.cpp" };
const QString oldHeader(workingDir.filePath(_("foo.h")));
const QString newHeader(workingDir.filePath(_("bar.h")));
const QString mainFile(workingDir.filePath(_("main.cpp")));