diff options
21 files changed, 154 insertions, 149 deletions
diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp index 7e38bae943..1517686a2c 100644 --- a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp +++ b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp @@ -155,7 +155,7 @@ Utils::FileName AbstractMsvcToolChain::compilerCommand() const { Utils::Environment env; addToEnvironment(env); - return Utils::FileName::fromString(env.searchInPath("cl.exe")); + return Utils::FileName::fromString(env.searchInPath(QLatin1String("cl.exe"))); } IOutputParser *AbstractMsvcToolChain::outputParser() const diff --git a/src/plugins/projectexplorer/clangparser.cpp b/src/plugins/projectexplorer/clangparser.cpp index d7159c2999..0aedec582c 100644 --- a/src/plugins/projectexplorer/clangparser.cpp +++ b/src/plugins/projectexplorer/clangparser.cpp @@ -197,13 +197,13 @@ void ProjectExplorerPlugin::testClangOutputParser_data() << (QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In file included from ..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h:45:"), - Utils::FileName::fromUserInput("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h"), 45, + Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h")), 45, categoryCompile) << Task(Task::Warning, QLatin1String("unknown attribute 'dllimport' ignored [-Wunknown-attributes]\n" "class Q_CORE_EXPORT QSysInfo {\n" " ^"), - Utils::FileName::fromUserInput("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h"), 1425, + Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h")), 1425, categoryCompile)) << QString(); QTest::newRow("note") @@ -217,7 +217,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() QLatin1String("instantiated from:\n" "# define Q_CORE_EXPORT Q_DECL_IMPORT\n" " ^"), - Utils::FileName::fromUserInput("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h"), 1289, + Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h")), 1289, categoryCompile)) << QString(); QTest::newRow("fatal error") @@ -231,7 +231,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() QLatin1String("'bits/c++config.h' file not found\n" "#include <bits/c++config.h>\n" " ^"), - Utils::FileName::fromUserInput("/usr/include/c++/4.6/utility"), 68, + Utils::FileName::fromUserInput(QLatin1String("/usr/include/c++/4.6/utility")), 68, categoryCompile)) << QString(); @@ -246,7 +246,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() QLatin1String("?: has lower precedence than +; + will be evaluated first [-Wparentheses]\n" " int x = option->rect.x() + horizontal ? 2 : 6;\n" " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^"), - Utils::FileName::fromUserInput("/home/code/src/creator/src/plugins/coreplugin/manhattanstyle.cpp"), 567, + Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/coreplugin/manhattanstyle.cpp")), 567, categoryCompile)) << QString(); } diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index f522afd23c..c31ac1e505 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -303,18 +303,18 @@ void IDevice::fromMap(const QVariantMap &map) d->id = Core::Id(map.value(QLatin1String(IdKey), newId().name()).toByteArray()); d->origin = static_cast<Origin>(map.value(QLatin1String(OriginKey), ManuallyAdded).toInt()); - d->sshParameters.host = map.value(HostKey).toString(); - d->sshParameters.port = map.value(SshPortKey, 22).toInt(); - d->sshParameters.userName = map.value(UserNameKey).toString(); + d->sshParameters.host = map.value(QLatin1String(HostKey)).toString(); + d->sshParameters.port = map.value(QLatin1String(SshPortKey), 22).toInt(); + d->sshParameters.userName = map.value(QLatin1String(UserNameKey)).toString(); d->sshParameters.authenticationType - = static_cast<AuthType>(map.value(AuthKey, DefaultAuthType).toInt()); - d->sshParameters.password = map.value(PasswordKey).toString(); - d->sshParameters.privateKeyFile = map.value(KeyFileKey, defaultPrivateKeyFilePath()).toString(); - d->sshParameters.timeout = map.value(TimeoutKey, DefaultTimeout).toInt(); + = static_cast<AuthType>(map.value(QLatin1String(AuthKey), DefaultAuthType).toInt()); + d->sshParameters.password = map.value(QLatin1String(PasswordKey)).toString(); + d->sshParameters.privateKeyFile = map.value(QLatin1String(KeyFileKey), defaultPrivateKeyFilePath()).toString(); + d->sshParameters.timeout = map.value(QLatin1String(TimeoutKey), DefaultTimeout).toInt(); - d->freePorts = Utils::PortList::fromString(map.value(PortsSpecKey, + d->freePorts = Utils::PortList::fromString(map.value(QLatin1String(PortsSpecKey), QLatin1String("10000-10100")).toString()); - d->machineType = static_cast<MachineType>(map.value(MachineTypeKey, DefaultMachineType).toInt()); + d->machineType = static_cast<MachineType>(map.value(QLatin1String(MachineTypeKey), DefaultMachineType).toInt()); } QVariantMap IDevice::toMap() const @@ -325,16 +325,16 @@ QVariantMap IDevice::toMap() const map.insert(QLatin1String(IdKey), d->id.name()); map.insert(QLatin1String(OriginKey), d->origin); - map.insert(MachineTypeKey, d->machineType); - map.insert(HostKey, d->sshParameters.host); - map.insert(SshPortKey, d->sshParameters.port); - map.insert(UserNameKey, d->sshParameters.userName); - map.insert(AuthKey, d->sshParameters.authenticationType); - map.insert(PasswordKey, d->sshParameters.password); - map.insert(KeyFileKey, d->sshParameters.privateKeyFile); - map.insert(TimeoutKey, d->sshParameters.timeout); + map.insert(QLatin1String(MachineTypeKey), d->machineType); + map.insert(QLatin1String(HostKey), d->sshParameters.host); + map.insert(QLatin1String(SshPortKey), d->sshParameters.port); + map.insert(QLatin1String(UserNameKey), d->sshParameters.userName); + map.insert(QLatin1String(AuthKey), d->sshParameters.authenticationType); + map.insert(QLatin1String(PasswordKey), d->sshParameters.password); + map.insert(QLatin1String(KeyFileKey), d->sshParameters.privateKeyFile); + map.insert(QLatin1String(TimeoutKey), d->sshParameters.timeout); - map.insert(PortsSpecKey, d->freePorts.toString()); + map.insert(QLatin1String(PortsSpecKey), d->freePorts.toString()); return map; } diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index 8baccac119..a87ba50811 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -171,17 +171,17 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString() << QString() << (QList<ProjectExplorer::Task>() << Task(Task::Unknown, - QLatin1String("In function `int main(int, char**)':"), - Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), -1, - categoryCompile) + QLatin1String("In function `int main(int, char**)':"), + Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), -1, + categoryCompile) << Task(Task::Error, - QLatin1String("`sfasdf' undeclared (first use this function)"), - Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), 9, - categoryCompile) + QLatin1String("`sfasdf' undeclared (first use this function)"), + Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 9, + categoryCompile) << Task(Task::Error, - QLatin1String("(Each undeclared identifier is reported only once for each function it appears in.)"), - Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), 9, - categoryCompile) + QLatin1String("(Each undeclared identifier is reported only once for each function it appears in.)"), + Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 9, + categoryCompile) ) << QString(); QTest::newRow("GCCE warning") @@ -191,7 +191,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Warning, QLatin1String("inline function `QDebug qDebug()' used but never defined"), - Utils::FileName::fromUserInput("/src/corelib/global/qglobal.h"), 1635, + Utils::FileName::fromUserInput(QLatin1String("/src/corelib/global/qglobal.h")), 1635, categoryCompile)) << QString(); QTest::newRow("warning") @@ -200,36 +200,39 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString() << QString() << (QList<ProjectExplorer::Task>() << Task(Task::Warning, QLatin1String("Some warning"), - Utils::FileName::fromUserInput("main.cpp"), 7, + Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 7, categoryCompile)) << QString(); QTest::newRow("GCCE #error") << QString::fromLatin1("C:\\temp\\test\\untitled8\\main.cpp:7: #error Symbian error") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Error, - QLatin1String("#error Symbian error"), - Utils::FileName::fromUserInput("C:\\temp\\test\\untitled8\\main.cpp"), 7, - categoryCompile)) + << (QList<ProjectExplorer::Task>() + << Task(Task::Error, + QLatin1String("#error Symbian error"), + Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8\\main.cpp")), 7, + categoryCompile)) << QString(); // Symbian reports #warning(s) twice (using different syntax). QTest::newRow("GCCE #warning1") << QString::fromLatin1("C:\\temp\\test\\untitled8\\main.cpp:8: warning: #warning Symbian warning") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Warning, - QLatin1String("#warning Symbian warning"), - Utils::FileName::fromUserInput("C:\\temp\\test\\untitled8\\main.cpp"), 8, - categoryCompile)) + << (QList<ProjectExplorer::Task>() + << Task(Task::Warning, + QLatin1String("#warning Symbian warning"), + Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8\\main.cpp")), 8, + categoryCompile)) << QString(); QTest::newRow("GCCE #warning2") << QString::fromLatin1("/temp/test/untitled8/main.cpp:8:2: warning: #warning Symbian warning") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Warning, - QLatin1String("#warning Symbian warning"), - Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), 8, - categoryCompile)) + << (QList<ProjectExplorer::Task>() + << Task(Task::Warning, + QLatin1String("#warning Symbian warning"), + Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 8, + categoryCompile)) << QString(); QTest::newRow("Undefined reference (debug)") << QString::fromLatin1("main.o: In function `main':\n" @@ -240,11 +243,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In function `main':"), - Utils::FileName::fromUserInput("main.o"), -1, + Utils::FileName::fromUserInput(QLatin1String("main.o")), -1, categoryCompile) << Task(Task::Error, QLatin1String("undefined reference to `MainWindow::doSomething()'"), - Utils::FileName::fromUserInput("C:\\temp\\test\\untitled8/main.cpp"), 8, + Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8/main.cpp")), 8, categoryCompile) << Task(Task::Error, QLatin1String("collect2: ld returned 1 exit status"), @@ -261,11 +264,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In function `main':"), - Utils::FileName::fromUserInput("main.o"), -1, + Utils::FileName::fromUserInput(QLatin1String("main.o")), -1, categoryCompile) << Task(Task::Error, QLatin1String("undefined reference to `MainWindow::doSomething()'"), - Utils::FileName::fromUserInput("C:\\temp\\test\\untitled8/main.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8/main.cpp")), -1, categoryCompile) << Task(Task::Error, QLatin1String("collect2: ld returned 1 exit status"), @@ -280,7 +283,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Error, QLatin1String("file not recognized: File format not recognized"), - Utils::FileName::fromUserInput("c:\\Qt\\4.6\\lib/QtGuid4.dll"), -1, + Utils::FileName::fromUserInput(QLatin1String("c:\\Qt\\4.6\\lib/QtGuid4.dll")), -1, categoryCompile)) << QString(); QTest::newRow("Invalid rpath") @@ -303,15 +306,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In member function 'void Debugger::Internal::GdbEngine::handleBreakInsert2(const Debugger::Internal::GdbResponse&)':"), - Utils::FileName::fromUserInput("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp")), -1, categoryCompile) << Task(Task::Warning, QLatin1String("unused variable 'index'"), - Utils::FileName::fromUserInput("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2114, + Utils::FileName::fromUserInput(QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp")), 2114, categoryCompile) << Task(Task::Warning, QLatin1String("unused variable 'handler'"), - Utils::FileName::fromUserInput("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2115, + Utils::FileName::fromUserInput(QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp")), 2115, categoryCompile)) << QString(); QTest::newRow("gnumakeparser.cpp errors") @@ -323,15 +326,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In member function 'void ProjectExplorer::ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()':"), - Utils::FileName::fromUserInput("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp")), -1, categoryCompile) << Task(Task::Error, QLatin1String("expected primary-expression before ':' token"), - Utils::FileName::fromUserInput("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp"), 264, + Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp")), 264, categoryCompile) << Task(Task::Error, QLatin1String("expected ';' before ':' token"), - Utils::FileName::fromUserInput("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp"), 264, + Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp")), 264, categoryCompile)) << QString(); QTest::newRow("distcc error(QTCREATORBUG-904)") @@ -375,7 +378,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("initialized from here"), - Utils::FileName::fromUserInput("/home/dev/creator/share/qtcreator/dumper/dumper.cpp"), 1079, + Utils::FileName::fromUserInput(QLatin1String("/home/dev/creator/share/qtcreator/dumper/dumper.cpp")), 1079, categoryCompile)) << QString(); QTest::newRow("static member function") @@ -386,11 +389,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In static member function 'static std::_Rb_tree_node_base* std::_Rb_global<_Dummy>::_Rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&, std::_Rb_tree_node_base*&, std::_Rb_tree_node_base*&)':"), - Utils::FileName::fromUserInput("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c"), -1, + Utils::FileName::fromUserInput(QLatin1String("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c")), -1, categoryCompile) << Task(Task::Warning, QLatin1String("suggest explicit braces to avoid ambiguous 'else'"), - Utils::FileName::fromUserInput("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c"), 194, + Utils::FileName::fromUserInput(QLatin1String("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c")), 194, categoryCompile)) << QString(); QTest::newRow("rm false positive") @@ -424,15 +427,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In function void foo(i) [with i = double]:"), - Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1, categoryCompile) << Task(Task::Unknown, QLatin1String("instantiated from here"), - Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 22, + Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 22, categoryCompile) << Task(Task::Warning, QLatin1String("unused variable c"), - Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 8, + Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 8, categoryCompile)) << QString(); QTest::newRow("instanciated from here") @@ -442,7 +445,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("instantiated from here"), - Utils::FileName::fromUserInput("main.cpp"), 10, + Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 10, categoryCompile)) << QString(); QTest::newRow("In constructor") @@ -452,7 +455,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In constructor 'Find::BaseTextFind::BaseTextFind(QTextEdit*)':"), - Utils::FileName::fromUserInput("/dev/creator/src/plugins/find/basetextfind.h"), -1, + Utils::FileName::fromUserInput(QLatin1String("/dev/creator/src/plugins/find/basetextfind.h")), -1, categoryCompile)) << QString(); @@ -467,23 +470,23 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("At global scope:"), - Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1, categoryCompile) << Task(Task::Unknown, QLatin1String("In instantiation of void bar(i) [with i = double]:"), - Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1, categoryCompile) << Task(Task::Unknown, QLatin1String("instantiated from void foo(i) [with i = double]"), - Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 8, + Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 8, categoryCompile) << Task(Task::Unknown, QLatin1String("instantiated from here"), - Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 22, + Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 22, categoryCompile) << Task(Task::Warning, QLatin1String("unused parameter v"), - Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 5, + Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 5, categoryCompile)) << QString(); @@ -494,7 +497,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Error, QLatin1String("test.moc: No such file or directory"), - Utils::FileName::fromUserInput("/home/code/test.cpp"), 54, + Utils::FileName::fromUserInput(QLatin1String("/home/code/test.cpp")), 54, categoryCompile)) << QString(); @@ -508,15 +511,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In function `QPlotAxis':"), - Utils::FileName::fromUserInput("debug/qplotaxis.o"), -1, + Utils::FileName::fromUserInput(QLatin1String("debug/qplotaxis.o")), -1, categoryCompile) << Task(Task::Error, QLatin1String("undefined reference to `vtable for QPlotAxis'"), - Utils::FileName::fromUserInput("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"), 26, + Utils::FileName::fromUserInput(QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp")), 26, categoryCompile) << Task(Task::Error, QLatin1String("undefined reference to `vtable for QPlotAxis'"), - Utils::FileName::fromUserInput("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"), 26, + Utils::FileName::fromUserInput(QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp")), 26, categoryCompile) << Task(Task::Error, QLatin1String("collect2: ld returned 1 exit status"), @@ -535,23 +538,23 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In member function typename _Vector_base<_Tp, _Alloc>::_Tp_alloc_type::const_reference Vector<_Tp, _Alloc>::at(int) [with _Tp = Point, _Alloc = Allocator<Point>]:"), - Utils::FileName::fromUserInput("../stl/main.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), -1, categoryCompile) << Task(Task::Unknown, QLatin1String("instantiated from here"), - Utils::FileName::fromUserInput("../stl/main.cpp"), 38, + Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), 38, categoryCompile) << Task(Task::Warning, QLatin1String("returning reference to temporary"), - Utils::FileName::fromUserInput("../stl/main.cpp"), 31, + Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), 31, categoryCompile) << Task(Task::Unknown, QLatin1String("At global scope:"), - Utils::FileName::fromUserInput("../stl/main.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), -1, categoryCompile) << Task(Task::Warning, QLatin1String("unused parameter index"), - Utils::FileName::fromUserInput("../stl/main.cpp"), 31, + Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), 31, categoryCompile)) << QString(); @@ -565,19 +568,19 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In file included from C:/Symbian_SDK/epoc32/include/e32cmn.h:6792,"), - Utils::FileName::fromUserInput("C:/Symbian_SDK/epoc32/include/e32cmn.h"), 6792, + Utils::FileName::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.h")), 6792, categoryCompile) << Task(Task::Unknown, QLatin1String("from C:/Symbian_SDK/epoc32/include/e32std.h:25,"), - Utils::FileName::fromUserInput("C:/Symbian_SDK/epoc32/include/e32std.h"), 25, + Utils::FileName::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32std.h")), 25, categoryCompile) << Task(Task::Unknown, QLatin1String("In member function 'SSecureId::operator const TSecureId&() const':"), - Utils::FileName::fromUserInput("C:/Symbian_SDK/epoc32/include/e32cmn.inl"), -1, + Utils::FileName::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.inl")), -1, categoryCompile) << Task(Task::Warning, QLatin1String("returning reference to temporary"), - Utils::FileName::fromUserInput("C:/Symbian_SDK/epoc32/include/e32cmn.inl"), 7094, + Utils::FileName::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.inl")), 7094, categoryCompile)) << QString(); @@ -588,7 +591,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("At top level:"), - Utils::FileName::fromUserInput("../../../src/XmlUg/targetdelete.c"), -1, + Utils::FileName::fromUserInput(QLatin1String("../../../src/XmlUg/targetdelete.c")), -1, categoryCompile)) << QString(); @@ -601,15 +604,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In file included from /Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h:15,"), - Utils::FileName::fromUserInput("/Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h"), 15, + Utils::FileName::fromUserInput(QLatin1String("/Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h")), 15, categoryCompile) << Task(Task::Unknown, QLatin1String("from <command line>:26:"), - Utils::FileName::fromUserInput("<command line>"), 26, + Utils::FileName::fromUserInput(QLatin1String("<command line>")), 26, categoryCompile) << Task(Task::Warning, QLatin1String("no newline at end of file"), - Utils::FileName::fromUserInput("/Symbian/SDK/epoc32/include/variant/Symbian_OS.hrh"), 1134, + Utils::FileName::fromUserInput(QLatin1String("/Symbian/SDK/epoc32/include/variant/Symbian_OS.hrh")), 1134, categoryCompile)) << QString(); @@ -620,7 +623,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Error, QLatin1String("undefined reference to `MainWindow::doSomething()'"), - Utils::FileName::fromUserInput("main.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("main.cpp")), -1, categoryCompile)) << QString(); @@ -632,11 +635,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In member function 'ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateConditionalFunction(const ProString&, const ProStringList&)':"), - Utils::FileName::fromUserInput("../../../src/shared/proparser/profileevaluator.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("../../../src/shared/proparser/profileevaluator.cpp")), -1, categoryCompile) << Task(Task::Warning, QLatin1String("case value '0' not in enumerated type 'ProFileEvaluator::Private::TestFunc'"), - Utils::FileName::fromUserInput("../../../src/shared/proparser/profileevaluator.cpp"), 2817, + Utils::FileName::fromUserInput(QLatin1String("../../../src/shared/proparser/profileevaluator.cpp")), 2817, categoryCompile)) << QString(); @@ -648,11 +651,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In file included from <command-line>:0:0:"), - Utils::FileName::fromUserInput("<command-line>"), 0, + Utils::FileName::fromUserInput(QLatin1String("<command-line>")), 0, categoryCompile) << Task(Task::Warning, QLatin1String("\"STUPID_DEFINE\" redefined"), - Utils::FileName::fromUserInput("./mw.h"), 4, + Utils::FileName::fromUserInput(QLatin1String("./mw.h")), 4, categoryCompile)) << QString(); QTest::newRow("instanciation with line:column info") @@ -664,15 +667,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Unknown, QLatin1String("In function 'void UnitTest::CheckEqual(UnitTest::TestResults&, const Expected&, const Actual&, const UnitTest::TestDetails&) [with Expected = unsigned int, Actual = int]':"), - Utils::FileName::fromUserInput("file.h"), -1, + Utils::FileName::fromUserInput(QLatin1String("file.h")), -1, categoryCompile) << Task(Task::Unknown, QLatin1String("instantiated from here"), - Utils::FileName::fromUserInput("file.cpp"), 87, + Utils::FileName::fromUserInput(QLatin1String("file.cpp")), 87, categoryCompile) << Task(Task::Warning, QLatin1String("comparison between signed and unsigned integer expressions [-Wsign-compare]"), - Utils::FileName::fromUserInput("file.h"), 21, + Utils::FileName::fromUserInput(QLatin1String("file.h")), 21, categoryCompile)) << QString(); QTest::newRow("linker error") // QTCREATORBUG-3107 @@ -682,7 +685,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Error, QLatin1String("undefined reference to `CNS5kINSPacket::SOH_BYTE'"), - Utils::FileName::fromUserInput("cns5k_ins_parser_tests.cpp"), -1, + Utils::FileName::fromUserInput(QLatin1String("cns5k_ins_parser_tests.cpp")), -1, categoryCompile)) << QString(); @@ -693,7 +696,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Warning, QLatin1String("The name 'pushButton' (QPushButton) is already in use, defaulting to 'pushButton1'."), - Utils::FileName::fromUserInput("mainwindow.ui"), -1, + Utils::FileName::fromUserInput(QLatin1String("mainwindow.ui")), -1, Constants::TASK_CATEGORY_COMPILE)) << QString(); @@ -704,7 +707,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << ( QList<ProjectExplorer::Task>() << Task(Task::Warning, QLatin1String("warning: feupdateenv is not implemented and will always fail"), - Utils::FileName::fromUserInput("libimf.so"), -1, + Utils::FileName::fromUserInput(QLatin1String("libimf.so")), -1, Constants::TASK_CATEGORY_COMPILE)) << QString(); } diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index f5720bfb92..5a538b7747 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -394,8 +394,8 @@ QByteArray GccToolChain::predefinedMacros(const QStringList &cxxflags) const ToolChain::CompilerFlags GccToolChain::compilerFlags(const QStringList &cxxflags) const { - if (cxxflags.contains("-std=c++0x") || cxxflags.contains("-std=gnu++0x") || - cxxflags.contains("-std=c++11") || cxxflags.contains("-std=gnu++11")) + if (cxxflags.contains(QLatin1String("-std=c++0x")) || cxxflags.contains(QLatin1String("-std=gnu++0x")) || + cxxflags.contains(QLatin1String("-std=c++11")) || cxxflags.contains(QLatin1String("-std=gnu++11"))) return STD_CXX11; return NO_FLAGS; } @@ -621,7 +621,7 @@ ToolChain *Internal::GccToolChainFactory::restore(const QVariantMap &data) // Updating from 2.5: QVariantMap updated = data; QString id = idFromMap(updated); - if (id.startsWith(LEGACY_MAEMO_ID)) { + if (id.startsWith(QLatin1String(LEGACY_MAEMO_ID))) { id = QString::fromLatin1(Constants::GCC_TOOLCHAIN_ID).append(id.mid(id.indexOf(QLatin1Char(':')))); idToMap(updated, id); autoDetectionToMap(updated, false); @@ -888,7 +888,7 @@ QList<FileName> MingwToolChain::suggestedMkspecList() const if (Utils::HostOsInfo::isWindowsHost()) return QList<FileName>() << FileName::fromString(QLatin1String("win32-g++")); if (Utils::HostOsInfo::isLinuxHost()) { - if (version().startsWith("4.6.")) + if (version().startsWith(QLatin1String("4.6."))) return QList<FileName>() << FileName::fromString(QLatin1String("win32-g++-4.6-cross")) << FileName::fromString(QLatin1String("unsupported/win32-g++-4.6-cross")); diff --git a/src/plugins/projectexplorer/gnumakeparser.cpp b/src/plugins/projectexplorer/gnumakeparser.cpp index a0dca99174..648e51d639 100644 --- a/src/plugins/projectexplorer/gnumakeparser.cpp +++ b/src/plugins/projectexplorer/gnumakeparser.cpp @@ -284,7 +284,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << (QList<Task>() << Task(Task::Error, QString::fromLatin1("missing separator (did you mean TAB instead of 8 spaces?). Stop."), - Utils::FileName::fromUserInput("Makefile"), 360, + Utils::FileName::fromUserInput(QLatin1String("Makefile")), 360, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))) << QString() << QStringList(); @@ -417,12 +417,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data() << QStringList() << Task(Task::Error, QLatin1String("unknown filename, no mangling"), - Utils::FileName::fromUserInput("some/path/unknown.cpp"), + Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")), -1, Core::Id(Constants::TASK_CATEGORY_COMPILE)) << Task(Task::Error, QLatin1String("unknown filename, no mangling"), - Utils::FileName::fromUserInput("some/path/unknown.cpp"), + Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")), -1, Core::Id(Constants::TASK_CATEGORY_COMPILE)); QTest::newRow("find file") @@ -430,12 +430,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data() << (QStringList(QLatin1String("test"))) << Task(Task::Error, QLatin1String("mangling"), - Utils::FileName::fromUserInput("file.cpp"), + Utils::FileName::fromUserInput(QLatin1String("file.cpp")), 10, Core::Id(Constants::TASK_CATEGORY_COMPILE)) << Task(Task::Error, QLatin1String("mangling"), - Utils::FileName::fromUserInput("$TMPDIR/test/file.cpp"), + Utils::FileName::fromUserInput(QLatin1String("$TMPDIR/test/file.cpp")), 10, Core::Id(Constants::TASK_CATEGORY_COMPILE)); } diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index 96cc3ac14d..b32e69e4c9 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -63,10 +63,10 @@ namespace ProjectExplorer { static QString cleanName(const QString &name) { QString result = name; - result.replace(QRegExp("\\W"), QLatin1String("_")); - result.replace(QRegExp("_+"), "_"); // compact _ - result.remove(QRegExp("^_*")); // remove leading _ - result.remove(QRegExp("_+$")); // remove trailing _ + result.replace(QRegExp(QLatin1String("\\W")), QLatin1String("_")); + result.replace(QRegExp(QLatin1String("_+")), QLatin1String("_")); // compact _ + result.remove(QRegExp(QLatin1String("^_*"))); // remove leading _ + result.remove(QRegExp(QLatin1String("_+$"))); // remove trailing _ if (result.isEmpty()) result = QLatin1String("unknown"); return result; diff --git a/src/plugins/projectexplorer/kitmodel.cpp b/src/plugins/projectexplorer/kitmodel.cpp index bbacfaca9b..bbbe6b661f 100644 --- a/src/plugins/projectexplorer/kitmodel.cpp +++ b/src/plugins/projectexplorer/kitmodel.cpp @@ -153,7 +153,7 @@ int KitModel::columnCount(const QModelIndex &parent) const QVariant KitModel::data(const QModelIndex &index, int role) const { - static QIcon warningIcon(":/projectexplorer/images/compile_warning.png"); + static QIcon warningIcon(QLatin1String(":/projectexplorer/images/compile_warning.png")); if (!index.isValid() || index.column() != 0) return QVariant(); diff --git a/src/plugins/projectexplorer/kitoptionspage.cpp b/src/plugins/projectexplorer/kitoptionspage.cpp index 63c4ca15e1..2aee5a777a 100644 --- a/src/plugins/projectexplorer/kitoptionspage.cpp +++ b/src/plugins/projectexplorer/kitoptionspage.cpp @@ -55,7 +55,7 @@ namespace ProjectExplorer { KitOptionsPage::KitOptionsPage() : m_model(0), m_selectionModel(0), m_currentWidget(0), m_toShow(0) { - setId(Constants::KITS_SETTINGS_PAGE_ID); + setId(QLatin1String(Constants::KITS_SETTINGS_PAGE_ID)); setDisplayName(tr("Kits")); setCategory(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY)); setDisplayCategory(QCoreApplication::translate("ProjectExplorer", diff --git a/src/plugins/projectexplorer/linuxiccparser.cpp b/src/plugins/projectexplorer/linuxiccparser.cpp index 801f489274..15ba83e92c 100644 --- a/src/plugins/projectexplorer/linuxiccparser.cpp +++ b/src/plugins/projectexplorer/linuxiccparser.cpp @@ -144,7 +144,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Error, QLatin1String("identifier \"f\" is undefined\nf(0);"), - Utils::FileName::fromUserInput("main.cpp"), 13, + Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 13, Core::Id(Constants::TASK_CATEGORY_COMPILE))) << QString(); @@ -158,7 +158,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Error, QLatin1String("function \"AClass::privatefunc\" (declared at line 4 of \"main.h\") is inaccessible\nb.privatefunc();"), - Utils::FileName::fromUserInput("main.cpp"), 53, + Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 53, Core::Id(Constants::TASK_CATEGORY_COMPILE))) << QString(); @@ -172,7 +172,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Warning, QLatin1String("use of \"=\" where \"==\" may have been intended\nwhile (a = true)"), - Utils::FileName::fromUserInput("main.cpp"), 41, + Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 41, Core::Id(Constants::TASK_CATEGORY_COMPILE))) << QString(); } diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp index ab2f479879..b5dd05e8ed 100644 --- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp +++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp @@ -1451,13 +1451,13 @@ void MiniProjectTargetSelector::updateSummary() .arg(startupProject->displayName()); } else { if (!m_listWidgets[TARGET]->isVisibleTo(this)) - summary.append("<br/>"); + summary.append(QLatin1String("<br/>")); if (!m_listWidgets[BUILD]->isVisibleTo(this)) - summary.append("<br/>"); + summary.append(QLatin1String("<br/>")); if (!m_listWidgets[DEPLOY]->isVisibleTo(this)) - summary.append("<br/>"); + summary.append(QLatin1String("<br/>")); if (!m_listWidgets[RUN]->isVisibleTo(this)) - summary.append("<br/>"); + summary.append(QLatin1String("<br/>")); } } m_summaryLabel->setText(summary); diff --git a/src/plugins/projectexplorer/msvcparser.cpp b/src/plugins/projectexplorer/msvcparser.cpp index 324b4f7ac7..2e57244ef8 100644 --- a/src/plugins/projectexplorer/msvcparser.cpp +++ b/src/plugins/projectexplorer/msvcparser.cpp @@ -105,7 +105,7 @@ void MsvcParser::stdOutput(const QString &line) if (processCompileLine(line)) return; - if (line.startsWith("Error:")) { + if (line.startsWith(QLatin1String("Error:"))) { m_lastTask = Task(Task::Error, line.mid(6).trimmed(), /* description */ Utils::FileName(), /* fileName */ @@ -113,7 +113,7 @@ void MsvcParser::stdOutput(const QString &line) Core::Id(Constants::TASK_CATEGORY_COMPILE)); return; } - if (line.startsWith("Warning:")) { + if (line.startsWith(QLatin1String("Warning:"))) { m_lastTask = Task(Task::Warning, line.mid(8).trimmed(), /* description */ Utils::FileName(), /* fileName */ @@ -203,19 +203,21 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() QTest::newRow("labeled error") << QString::fromLatin1("qmlstandalone\\main.cpp(54) : error C4716: 'findUnresolvedModule' : must return a value") << OutputParserTester::STDOUT << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Error, - QLatin1String("C4716: 'findUnresolvedModule' : must return a value"), - Utils::FileName::fromUserInput("qmlstandalone\\main.cpp"), 54, - Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) + << (QList<ProjectExplorer::Task>() + << Task(Task::Error, + QLatin1String("C4716: 'findUnresolvedModule' : must return a value"), + Utils::FileName::fromUserInput(QLatin1String("qmlstandalone\\main.cpp")), 54, + Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) << QString(); QTest::newRow("labeled warning") << QString::fromLatin1("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp(69) : warning C4100: 'something' : unreferenced formal parameter") << OutputParserTester::STDOUT << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Warning, - QLatin1String("C4100: 'something' : unreferenced formal parameter"), - Utils::FileName::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69, - Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) + << (QList<ProjectExplorer::Task>() + << Task(Task::Warning, + QLatin1String("C4100: 'something' : unreferenced formal parameter"), + Utils::FileName::fromUserInput(QLatin1String("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp")), 69, + Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) << QString(); QTest::newRow("additional information") @@ -226,11 +228,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Warning, QLatin1String("C4099: 'TextEditor::CompletionItem' : type name first seen using 'struct' now seen using 'class'"), - Utils::FileName::fromUserInput("x:\\src\\plugins\\texteditor\\icompletioncollector.h"), 50, + Utils::FileName::fromUserInput(QLatin1String("x:\\src\\plugins\\texteditor\\icompletioncollector.h")), 50, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)) << Task(Task::Unknown, QLatin1String("see declaration of 'TextEditor::CompletionItem'"), - Utils::FileName::fromUserInput("x:\\src\\plugins\\texteditor\\completionsupport.h"), 39, + Utils::FileName::fromUserInput(QLatin1String("x:\\src\\plugins\\texteditor\\completionsupport.h")), 39, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) << QString(); @@ -273,7 +275,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() " _Traits=std::_Tmap_traits<int,double,std::less<int>,std::allocator<std::pair<const int,double>>,false>\n" "]\n" "No constructor could take the source type, or constructor overload resolution was ambiguous"), - Utils::FileName::fromUserInput("..\\untitled\\main.cpp"), 19, + Utils::FileName::fromUserInput(QLatin1String("..\\untitled\\main.cpp")), 19, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) << QString(); QTest::newRow("Linker error 1") @@ -283,7 +285,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Error, QLatin1String("LNK2019: unresolved external symbol \"public: void __thiscall Data::doit(void)\" (?doit@Data@@QAEXXZ) referenced in function _main"), - Utils::FileName::fromUserInput("main.obj"), -1, + Utils::FileName::fromUserInput(QLatin1String("main.obj")), -1, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) << QString(); QTest::newRow("Linker error 2") @@ -293,7 +295,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Error, QLatin1String("LNK1120: 1 unresolved externals"), - Utils::FileName::fromUserInput("debug\\Experimentation.exe"), -1, + Utils::FileName::fromUserInput(QLatin1String("debug\\Experimentation.exe")), -1, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) << QString(); QTest::newRow("Linker error 3") @@ -321,11 +323,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << (QList<ProjectExplorer::Task>() << Task(Task::Warning, QLatin1String("C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'"), - Utils::FileName::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2227, + Utils::FileName::fromUserInput(QLatin1String("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility")), 2227, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)) << Task(Task::Unknown, QLatin1String("see declaration of 'std::_Copy_impl'"), - Utils::FileName::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2212, + Utils::FileName::fromUserInput(QLatin1String("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility")), 2212, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)) << Task(Task::Unknown, QLatin1String("see reference to function template instantiation '_OutIt std::copy<const unsigned char*,unsigned short*>(_InIt,_InIt,_OutIt)' being compiled\n" @@ -334,7 +336,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() " _OutIt=unsigned short *,\n" " _InIt=const unsigned char *\n" "]"), - Utils::FileName::fromUserInput("symbolgroupvalue.cpp"), 2314, + Utils::FileName::fromUserInput(QLatin1String("symbolgroupvalue.cpp")), 2314, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) << QString(); } diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp index a47d1039e0..21f3d3c7ee 100644 --- a/src/plugins/projectexplorer/msvctoolchain.cpp +++ b/src/plugins/projectexplorer/msvctoolchain.cpp @@ -528,7 +528,7 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect() vcvarsAllbat, QLatin1String("ia64"), true)); results.append(new MsvcToolChain(generateDisplayName(vsName, MsvcToolChain::VS, MsvcToolChain::x86_ia64), findAbiOfMsvc(MsvcToolChain::VS, MsvcToolChain::x86_ia64, vsName), - vcvarsAllbat, QString("x86_ia64"), true)); + vcvarsAllbat, QLatin1String("x86_ia64"), true)); } else { qWarning("Unable to find MSVC setup script %s in version %d", qPrintable(vcvarsAllbat), version); } diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index b5978d0b7a..b4fa9a85df 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1942,7 +1942,7 @@ int ProjectExplorerPlugin::queue(QList<Project *> projects, QList<Core::Id> step foreach (const Project *p, projects) projectNames << p->displayName(); foreach (const Core::Id id, stepIds) - stepNames << id.name(); + stepNames << id.toString(); qDebug() << "Building" << stepNames << "for projects" << projectNames; } diff --git a/src/plugins/projectexplorer/projectexplorer.pro b/src/plugins/projectexplorer/projectexplorer.pro index 26185070f4..ba0ac01eec 100644 --- a/src/plugins/projectexplorer/projectexplorer.pro +++ b/src/plugins/projectexplorer/projectexplorer.pro @@ -285,4 +285,4 @@ RESOURCES += projectexplorer.qrc DEFINES += QTC_CPU=X86Architecture } -DEFINES += PROJECTEXPLORER_LIBRARY +DEFINES += PROJECTEXPLORER_LIBRARY QT_NO_CAST_FROM_ASCII diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs index 88c31b89ac..9955c0f79e 100644 --- a/src/plugins/projectexplorer/projectexplorer.qbs +++ b/src/plugins/projectexplorer/projectexplorer.qbs @@ -14,7 +14,7 @@ QtcPlugin { Depends { name: "QtcSsh" } Depends { name: "cpp" } - cpp.defines: base.concat(["QTC_CPU=X86Architecture"]) + cpp.defines: base.concat(["QTC_CPU=X86Architecture", "QT_NO_CAST_FROM_ASCII"]) cpp.includePaths: base.concat([ "customwizard", "publishing" diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp index 3221a6434e..122c2e5317 100644 --- a/src/plugins/projectexplorer/projectmodels.cpp +++ b/src/plugins/projectexplorer/projectmodels.cpp @@ -266,7 +266,7 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const const QString vcsTopic = node->vcsTopic(); if (!vcsTopic.isEmpty()) - name += " (" + vcsTopic + ")"; + name += QLatin1String(" (") + vcsTopic + QLatin1Char(')'); } result = name; diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp index 73de0c8f7a..85fa14adcb 100644 --- a/src/plugins/projectexplorer/settingsaccessor.cpp +++ b/src/plugins/projectexplorer/settingsaccessor.cpp @@ -2364,7 +2364,7 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map) tcId.replace(QLatin1String("Qt4ProjectManager.ToolChain.Maemo:"), QLatin1String("ProjectExplorer.ToolChain.Gcc:")); // convert Maemo to GCC QString data = tcId.mid(tcId.indexOf(QLatin1Char(':')) + 1); - QStringList split = data.split('.', QString::KeepEmptyParts); + QStringList split = data.split(QLatin1Char('.'), QString::KeepEmptyParts); QString compilerPath; QString debuggerPath; Abi compilerAbi; @@ -2423,7 +2423,7 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map) int dcPos = deployIt.key(); const QVariantMap &dc = deployIt.value(); // Device - QString devId = dc.value(QLatin1String("Qt4ProjectManager.MaemoRunConfiguration.DeviceId")).toString(); + QByteArray devId = dc.value(QLatin1String("Qt4ProjectManager.MaemoRunConfiguration.DeviceId")).toByteArray(); if (devId.isEmpty()) devId = QByteArray("Desktop Device"); if (!devId.isEmpty() && !DeviceManager::instance()->find(Core::Id(devId))) // We do not know that device diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp index 953b4059db..61cf1c7131 100644 --- a/src/plugins/projectexplorer/target.cpp +++ b/src/plugins/projectexplorer/target.cpp @@ -782,7 +782,7 @@ bool Target::fromMap(const QVariantMap &map) if (!factory) { Core::Id id = idFromMap(valueMap); qWarning("No factory found to restore deployment configuration of id '%s'!", - qPrintable(id.isValid() ? id.toString() : "UNKNOWN")); + id.isValid() ? qPrintable(id.toString()) : "UNKNOWN"); continue; } DeployConfiguration *dc = factory->restore(this, valueMap); diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp index a17dc8b0b4..f9b846baa5 100644 --- a/src/plugins/projectexplorer/toolchain.cpp +++ b/src/plugins/projectexplorer/toolchain.cpp @@ -60,7 +60,7 @@ public: static QString createId(const QString &id) { - QString newId = id.left(id.indexOf(':')); + QString newId = id.left(id.indexOf(QLatin1Char(':'))); newId.append(QLatin1Char(':') + QUuid::createUuid().toString()); return newId; } diff --git a/src/plugins/projectexplorer/wincetoolchain.cpp b/src/plugins/projectexplorer/wincetoolchain.cpp index a069e3df55..627a07a482 100644 --- a/src/plugins/projectexplorer/wincetoolchain.cpp +++ b/src/plugins/projectexplorer/wincetoolchain.cpp @@ -189,7 +189,7 @@ static bool parseSDK(QXmlStreamReader& theReader, if (theReader.isEndElement()) { // Got to the end element so return... - if (theReader.name() == "Platform") + if (theReader.name() == QLatin1String("Platform")) return (sdkArch!=Abi::UnknownArchitecture && !sdkName.isEmpty()); } else if (theReader.isStartElement()) { const QStringRef elemName = theReader.name(); |