forked from qt-creator/qt-creator
Remove spaces in initializer lists
Format initializer lists code style like. Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -188,8 +188,8 @@ void CppToolsPlugin::test_modelmanager_paths_are_clean()
|
||||
ProjectPart::Ptr part(new ProjectPart);
|
||||
part->qtVersion = ProjectPart::Qt5;
|
||||
part->projectDefines = QByteArray("#define OH_BEHAVE -1\n");
|
||||
part->headerPaths = { HeaderPath(testDataDir.includeDir(false), HeaderPath::IncludePath),
|
||||
HeaderPath(testDataDir.frameworksDir(false), HeaderPath::FrameworkPath) };
|
||||
part->headerPaths = {HeaderPath(testDataDir.includeDir(false), HeaderPath::IncludePath),
|
||||
HeaderPath(testDataDir.frameworksDir(false), HeaderPath::FrameworkPath)};
|
||||
pi.appendProjectPart(part);
|
||||
|
||||
mm->updateProjectInfo(pi);
|
||||
@@ -220,8 +220,8 @@ void CppToolsPlugin::test_modelmanager_framework_headers()
|
||||
ProjectPart::Ptr part(new ProjectPart);
|
||||
part->qtVersion = ProjectPart::Qt5;
|
||||
part->projectDefines = QByteArray("#define OH_BEHAVE -1\n");
|
||||
part->headerPaths = { HeaderPath(testDataDir.includeDir(false), HeaderPath::IncludePath),
|
||||
HeaderPath(testDataDir.frameworksDir(false), HeaderPath::FrameworkPath) };
|
||||
part->headerPaths = {HeaderPath(testDataDir.includeDir(false), HeaderPath::IncludePath),
|
||||
HeaderPath(testDataDir.frameworksDir(false), HeaderPath::FrameworkPath)};
|
||||
const QString &source = testDataDir.fileFromSourcesDir(
|
||||
_("test_modelmanager_framework_headers.cpp"));
|
||||
part->files << ProjectFile(source, ProjectFile::CXXSource);
|
||||
@@ -269,7 +269,7 @@ void CppToolsPlugin::test_modelmanager_refresh_also_includes_of_project_files()
|
||||
ProjectPart::Ptr part(new ProjectPart);
|
||||
part->qtVersion = ProjectPart::Qt5;
|
||||
part->projectDefines = QByteArray("#define OH_BEHAVE -1\n");
|
||||
part->headerPaths = { HeaderPath(testDataDir.includeDir(false), HeaderPath::IncludePath) };
|
||||
part->headerPaths = {HeaderPath(testDataDir.includeDir(false), HeaderPath::IncludePath)};
|
||||
part->files.append(ProjectFile(testCpp, ProjectFile::CXXSource));
|
||||
pi.appendProjectPart(part);
|
||||
|
||||
@@ -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 = { testCpp };
|
||||
const QStringList projectFiles2 = { testCpp, testCpp2 };
|
||||
const QStringList projectFiles1 = {testCpp};
|
||||
const QStringList projectFiles2 = {testCpp, testCpp2};
|
||||
|
||||
// Add a file
|
||||
QTest::newRow("case: add project file") << fileToChange << projectFiles1 << projectFiles2;
|
||||
@@ -568,7 +568,7 @@ void CppToolsPlugin::test_modelmanager_snapshot_after_two_projects()
|
||||
// Project 1
|
||||
project1.create(_("test_modelmanager_snapshot_after_two_projects.1"),
|
||||
_("testdata_project1"),
|
||||
{ "foo.h", "foo.cpp", "main.cpp" });
|
||||
{"foo.h", "foo.cpp", "main.cpp"});
|
||||
|
||||
refreshedFiles = helper.updateProjectInfo(project1.projectInfo);
|
||||
QCOMPARE(refreshedFiles, project1.projectFiles.toSet());
|
||||
@@ -580,7 +580,7 @@ void CppToolsPlugin::test_modelmanager_snapshot_after_two_projects()
|
||||
// Project 2
|
||||
project2.create(_("test_modelmanager_snapshot_after_two_projects.2"),
|
||||
_("testdata_project2"),
|
||||
{ "bar.h", "bar.cpp", "main.cpp" });
|
||||
{"bar.h", "bar.cpp", "main.cpp"});
|
||||
|
||||
refreshedFiles = helper.updateProjectInfo(project2.projectInfo);
|
||||
QCOMPARE(refreshedFiles, project2.projectFiles.toSet());
|
||||
@@ -762,7 +762,7 @@ void CppToolsPlugin::test_modelmanager_defines_per_project()
|
||||
part1->files.append(ProjectFile(header, ProjectFile::CXXHeader));
|
||||
part1->qtVersion = ProjectPart::NoQt;
|
||||
part1->projectDefines = QByteArray("#define SUB1\n");
|
||||
part1->headerPaths = { HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath) };
|
||||
part1->headerPaths = {HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath)};
|
||||
|
||||
ProjectPart::Ptr part2(new ProjectPart);
|
||||
part2->projectFile = QLatin1String("project1.projectfile");
|
||||
@@ -770,7 +770,7 @@ void CppToolsPlugin::test_modelmanager_defines_per_project()
|
||||
part2->files.append(ProjectFile(header, ProjectFile::CXXHeader));
|
||||
part2->qtVersion = ProjectPart::NoQt;
|
||||
part2->projectDefines = QByteArray("#define SUB2\n");
|
||||
part2->headerPaths = { HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath) };
|
||||
part2->headerPaths = {HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath)};
|
||||
|
||||
ProjectInfo pi = ProjectInfo(project);
|
||||
pi.appendProjectPart(part1);
|
||||
@@ -786,8 +786,8 @@ void CppToolsPlugin::test_modelmanager_defines_per_project()
|
||||
QString firstDeclarationName;
|
||||
QString fileName;
|
||||
} d[] = {
|
||||
{ _("one"), main1File },
|
||||
{ _("two"), main2File }
|
||||
{_("one"), main1File},
|
||||
{_("two"), main2File}
|
||||
};
|
||||
const int size = sizeof(d) / sizeof(d[0]);
|
||||
for (int i = 0; i < size; ++i) {
|
||||
@@ -828,7 +828,7 @@ void CppToolsPlugin::test_modelmanager_precompiled_headers()
|
||||
part1->files.append(ProjectFile(header, ProjectFile::CXXHeader));
|
||||
part1->qtVersion = ProjectPart::NoQt;
|
||||
part1->precompiledHeaders.append(pch1File);
|
||||
part1->headerPaths = { HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath) };
|
||||
part1->headerPaths = {HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath)};
|
||||
part1->updateLanguageFeatures();
|
||||
|
||||
ProjectPart::Ptr part2(new ProjectPart);
|
||||
@@ -837,7 +837,7 @@ void CppToolsPlugin::test_modelmanager_precompiled_headers()
|
||||
part2->files.append(ProjectFile(header, ProjectFile::CXXHeader));
|
||||
part2->qtVersion = ProjectPart::NoQt;
|
||||
part2->precompiledHeaders.append(pch2File);
|
||||
part2->headerPaths = { HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath) };
|
||||
part2->headerPaths = {HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath)};
|
||||
part2->updateLanguageFeatures();
|
||||
|
||||
ProjectInfo pi = ProjectInfo(project);
|
||||
@@ -855,8 +855,8 @@ void CppToolsPlugin::test_modelmanager_precompiled_headers()
|
||||
QString firstClassInPchFile;
|
||||
QString fileName;
|
||||
} d[] = {
|
||||
{ _("one"), _("ClassInPch1"), main1File },
|
||||
{ _("two"), _("ClassInPch2"), main2File }
|
||||
{_("one"), _("ClassInPch1"), main1File},
|
||||
{_("two"), _("ClassInPch2"), main2File}
|
||||
};
|
||||
const int size = sizeof(d) / sizeof(d[0]);
|
||||
for (int i = 0; i < size; ++i) {
|
||||
@@ -911,13 +911,13 @@ void CppToolsPlugin::test_modelmanager_defines_per_editor()
|
||||
part1->files.append(ProjectFile(main1File, ProjectFile::CXXSource));
|
||||
part1->files.append(ProjectFile(header, ProjectFile::CXXHeader));
|
||||
part1->qtVersion = ProjectPart::NoQt;
|
||||
part1->headerPaths = { HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath) };
|
||||
part1->headerPaths = {HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath)};
|
||||
|
||||
ProjectPart::Ptr part2(new ProjectPart);
|
||||
part2->files.append(ProjectFile(main2File, ProjectFile::CXXSource));
|
||||
part2->files.append(ProjectFile(header, ProjectFile::CXXHeader));
|
||||
part2->qtVersion = ProjectPart::NoQt;
|
||||
part2->headerPaths = { HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath) };
|
||||
part2->headerPaths = {HeaderPath(testDataDirectory.includeDir(false), HeaderPath::IncludePath)};
|
||||
|
||||
ProjectInfo pi = ProjectInfo(project);
|
||||
pi.appendProjectPart(part1);
|
||||
@@ -934,8 +934,8 @@ void CppToolsPlugin::test_modelmanager_defines_per_editor()
|
||||
QString editorDefines;
|
||||
QString firstDeclarationName;
|
||||
} d[] = {
|
||||
{ _("#define SUB1\n"), _("one") },
|
||||
{ _("#define SUB2\n"), _("two") }
|
||||
{_("#define SUB1\n"), _("one")},
|
||||
{_("#define SUB2\n"), _("two")}
|
||||
};
|
||||
const int size = sizeof(d) / sizeof(d[0]);
|
||||
for (int i = 0; i < size; ++i) {
|
||||
@@ -1025,7 +1025,7 @@ void CppToolsPlugin::test_modelmanager_renameIncludes()
|
||||
QVERIFY(tmpDir.isValid());
|
||||
|
||||
const QDir workingDir(tmpDir.path());
|
||||
const QStringList fileNames = { "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();
|
||||
@@ -1071,7 +1071,7 @@ void CppToolsPlugin::test_modelmanager_renameIncludesInEditor()
|
||||
QVERIFY(tmpDir.isValid());
|
||||
|
||||
const QDir workingDir(tmpDir.path());
|
||||
const QStringList fileNames = { "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")));
|
||||
|
||||
Reference in New Issue
Block a user