ProjectExplorer: Compile with QT_NO_CAST_FROM_ASCII

Change-Id: I84d9526449b8ca6cdcf8296e353c5d892d5f942d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Orgad Shaneh
2012-11-21 22:40:31 +02:00
committed by Orgad Shaneh
parent 5f10acd5c9
commit e9dae735dc
21 changed files with 154 additions and 149 deletions

View File

@@ -155,7 +155,7 @@ Utils::FileName AbstractMsvcToolChain::compilerCommand() const
{ {
Utils::Environment env; Utils::Environment env;
addToEnvironment(env); addToEnvironment(env);
return Utils::FileName::fromString(env.searchInPath("cl.exe")); return Utils::FileName::fromString(env.searchInPath(QLatin1String("cl.exe")));
} }
IOutputParser *AbstractMsvcToolChain::outputParser() const IOutputParser *AbstractMsvcToolChain::outputParser() const

View File

@@ -197,13 +197,13 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In file included from ..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h:45:"), 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) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("unknown attribute 'dllimport' ignored [-Wunknown-attributes]\n" QLatin1String("unknown attribute 'dllimport' ignored [-Wunknown-attributes]\n"
"class Q_CORE_EXPORT QSysInfo {\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)) categoryCompile))
<< QString(); << QString();
QTest::newRow("note") QTest::newRow("note")
@@ -217,7 +217,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("instantiated from:\n" QLatin1String("instantiated from:\n"
"# define Q_CORE_EXPORT Q_DECL_IMPORT\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)) categoryCompile))
<< QString(); << QString();
QTest::newRow("fatal error") QTest::newRow("fatal error")
@@ -231,7 +231,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("'bits/c++config.h' file not found\n" QLatin1String("'bits/c++config.h' file not found\n"
"#include <bits/c++config.h>\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)) categoryCompile))
<< QString(); << QString();
@@ -246,7 +246,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("?: has lower precedence than +; + will be evaluated first [-Wparentheses]\n" QLatin1String("?: has lower precedence than +; + will be evaluated first [-Wparentheses]\n"
" int x = option->rect.x() + horizontal ? 2 : 6;\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)) categoryCompile))
<< QString(); << QString();
} }

View File

@@ -303,18 +303,18 @@ void IDevice::fromMap(const QVariantMap &map)
d->id = Core::Id(map.value(QLatin1String(IdKey), newId().name()).toByteArray()); d->id = Core::Id(map.value(QLatin1String(IdKey), newId().name()).toByteArray());
d->origin = static_cast<Origin>(map.value(QLatin1String(OriginKey), ManuallyAdded).toInt()); d->origin = static_cast<Origin>(map.value(QLatin1String(OriginKey), ManuallyAdded).toInt());
d->sshParameters.host = map.value(HostKey).toString(); d->sshParameters.host = map.value(QLatin1String(HostKey)).toString();
d->sshParameters.port = map.value(SshPortKey, 22).toInt(); d->sshParameters.port = map.value(QLatin1String(SshPortKey), 22).toInt();
d->sshParameters.userName = map.value(UserNameKey).toString(); d->sshParameters.userName = map.value(QLatin1String(UserNameKey)).toString();
d->sshParameters.authenticationType d->sshParameters.authenticationType
= static_cast<AuthType>(map.value(AuthKey, DefaultAuthType).toInt()); = static_cast<AuthType>(map.value(QLatin1String(AuthKey), DefaultAuthType).toInt());
d->sshParameters.password = map.value(PasswordKey).toString(); d->sshParameters.password = map.value(QLatin1String(PasswordKey)).toString();
d->sshParameters.privateKeyFile = map.value(KeyFileKey, defaultPrivateKeyFilePath()).toString(); d->sshParameters.privateKeyFile = map.value(QLatin1String(KeyFileKey), defaultPrivateKeyFilePath()).toString();
d->sshParameters.timeout = map.value(TimeoutKey, DefaultTimeout).toInt(); 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()); 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 QVariantMap IDevice::toMap() const
@@ -325,16 +325,16 @@ QVariantMap IDevice::toMap() const
map.insert(QLatin1String(IdKey), d->id.name()); map.insert(QLatin1String(IdKey), d->id.name());
map.insert(QLatin1String(OriginKey), d->origin); map.insert(QLatin1String(OriginKey), d->origin);
map.insert(MachineTypeKey, d->machineType); map.insert(QLatin1String(MachineTypeKey), d->machineType);
map.insert(HostKey, d->sshParameters.host); map.insert(QLatin1String(HostKey), d->sshParameters.host);
map.insert(SshPortKey, d->sshParameters.port); map.insert(QLatin1String(SshPortKey), d->sshParameters.port);
map.insert(UserNameKey, d->sshParameters.userName); map.insert(QLatin1String(UserNameKey), d->sshParameters.userName);
map.insert(AuthKey, d->sshParameters.authenticationType); map.insert(QLatin1String(AuthKey), d->sshParameters.authenticationType);
map.insert(PasswordKey, d->sshParameters.password); map.insert(QLatin1String(PasswordKey), d->sshParameters.password);
map.insert(KeyFileKey, d->sshParameters.privateKeyFile); map.insert(QLatin1String(KeyFileKey), d->sshParameters.privateKeyFile);
map.insert(TimeoutKey, d->sshParameters.timeout); map.insert(QLatin1String(TimeoutKey), d->sshParameters.timeout);
map.insert(PortsSpecKey, d->freePorts.toString()); map.insert(QLatin1String(PortsSpecKey), d->freePorts.toString());
return map; return map;
} }

View File

@@ -172,15 +172,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In function `int main(int, char**)':"), QLatin1String("In function `int main(int, char**)':"),
Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), -1, Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), -1,
categoryCompile) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("`sfasdf' undeclared (first use this function)"), QLatin1String("`sfasdf' undeclared (first use this function)"),
Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), 9, Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 9,
categoryCompile) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("(Each undeclared identifier is reported only once for each function it appears in.)"), QLatin1String("(Each undeclared identifier is reported only once for each function it appears in.)"),
Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), 9, Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 9,
categoryCompile) categoryCompile)
) )
<< QString(); << QString();
@@ -191,7 +191,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("inline function `QDebug qDebug()' used but never defined"), 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)) categoryCompile))
<< QString(); << QString();
QTest::newRow("warning") QTest::newRow("warning")
@@ -200,16 +200,17 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning, << (QList<ProjectExplorer::Task>() << Task(Task::Warning,
QLatin1String("Some warning"), QLatin1String("Some warning"),
Utils::FileName::fromUserInput("main.cpp"), 7, Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 7,
categoryCompile)) categoryCompile))
<< QString(); << QString();
QTest::newRow("GCCE #error") QTest::newRow("GCCE #error")
<< QString::fromLatin1("C:\\temp\\test\\untitled8\\main.cpp:7: #error Symbian error") << QString::fromLatin1("C:\\temp\\test\\untitled8\\main.cpp:7: #error Symbian error")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Error, << (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("#error Symbian error"), QLatin1String("#error Symbian error"),
Utils::FileName::fromUserInput("C:\\temp\\test\\untitled8\\main.cpp"), 7, Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8\\main.cpp")), 7,
categoryCompile)) categoryCompile))
<< QString(); << QString();
// Symbian reports #warning(s) twice (using different syntax). // Symbian reports #warning(s) twice (using different syntax).
@@ -217,18 +218,20 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< QString::fromLatin1("C:\\temp\\test\\untitled8\\main.cpp:8: warning: #warning Symbian warning") << QString::fromLatin1("C:\\temp\\test\\untitled8\\main.cpp:8: warning: #warning Symbian warning")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning, << (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("#warning Symbian warning"), QLatin1String("#warning Symbian warning"),
Utils::FileName::fromUserInput("C:\\temp\\test\\untitled8\\main.cpp"), 8, Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8\\main.cpp")), 8,
categoryCompile)) categoryCompile))
<< QString(); << QString();
QTest::newRow("GCCE #warning2") QTest::newRow("GCCE #warning2")
<< QString::fromLatin1("/temp/test/untitled8/main.cpp:8:2: warning: #warning Symbian warning") << QString::fromLatin1("/temp/test/untitled8/main.cpp:8:2: warning: #warning Symbian warning")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning, << (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("#warning Symbian warning"), QLatin1String("#warning Symbian warning"),
Utils::FileName::fromUserInput("/temp/test/untitled8/main.cpp"), 8, Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 8,
categoryCompile)) categoryCompile))
<< QString(); << QString();
QTest::newRow("Undefined reference (debug)") QTest::newRow("Undefined reference (debug)")
@@ -240,11 +243,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In function `main':"), QLatin1String("In function `main':"),
Utils::FileName::fromUserInput("main.o"), -1, Utils::FileName::fromUserInput(QLatin1String("main.o")), -1,
categoryCompile) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("undefined reference to `MainWindow::doSomething()'"), 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) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("collect2: ld returned 1 exit status"), QLatin1String("collect2: ld returned 1 exit status"),
@@ -261,11 +264,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In function `main':"), QLatin1String("In function `main':"),
Utils::FileName::fromUserInput("main.o"), -1, Utils::FileName::fromUserInput(QLatin1String("main.o")), -1,
categoryCompile) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("undefined reference to `MainWindow::doSomething()'"), 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) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("collect2: ld returned 1 exit status"), QLatin1String("collect2: ld returned 1 exit status"),
@@ -280,7 +283,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("file not recognized: File format not recognized"), 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)) categoryCompile))
<< QString(); << QString();
QTest::newRow("Invalid rpath") QTest::newRow("Invalid rpath")
@@ -303,15 +306,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In member function 'void Debugger::Internal::GdbEngine::handleBreakInsert2(const Debugger::Internal::GdbResponse&)':"), 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) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("unused variable 'index'"), 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) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("unused variable 'handler'"), 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)) categoryCompile))
<< QString(); << QString();
QTest::newRow("gnumakeparser.cpp errors") QTest::newRow("gnumakeparser.cpp errors")
@@ -323,15 +326,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In member function 'void ProjectExplorer::ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()':"), 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) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("expected primary-expression before ':' token"), 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) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("expected ';' before ':' token"), 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)) categoryCompile))
<< QString(); << QString();
QTest::newRow("distcc error(QTCREATORBUG-904)") QTest::newRow("distcc error(QTCREATORBUG-904)")
@@ -375,7 +378,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("initialized from here"), 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)) categoryCompile))
<< QString(); << QString();
QTest::newRow("static member function") QTest::newRow("static member function")
@@ -386,11 +389,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << 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*&)':"), 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) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("suggest explicit braces to avoid ambiguous 'else'"), 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)) categoryCompile))
<< QString(); << QString();
QTest::newRow("rm false positive") QTest::newRow("rm false positive")
@@ -424,15 +427,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In function void foo(i) [with i = double]:"), 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) categoryCompile)
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("instantiated from here"), QLatin1String("instantiated from here"),
Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 22, Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 22,
categoryCompile) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("unused variable c"), QLatin1String("unused variable c"),
Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 8, Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 8,
categoryCompile)) categoryCompile))
<< QString(); << QString();
QTest::newRow("instanciated from here") QTest::newRow("instanciated from here")
@@ -442,7 +445,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("instantiated from here"), QLatin1String("instantiated from here"),
Utils::FileName::fromUserInput("main.cpp"), 10, Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 10,
categoryCompile)) categoryCompile))
<< QString(); << QString();
QTest::newRow("In constructor") QTest::newRow("In constructor")
@@ -452,7 +455,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In constructor 'Find::BaseTextFind::BaseTextFind(QTextEdit*)':"), 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)) categoryCompile))
<< QString(); << QString();
@@ -467,23 +470,23 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("At global scope:"), QLatin1String("At global scope:"),
Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), -1, Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1,
categoryCompile) categoryCompile)
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In instantiation of void bar(i) [with i = double]:"), 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) categoryCompile)
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("instantiated from void foo(i) [with i = double]"), 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) categoryCompile)
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("instantiated from here"), QLatin1String("instantiated from here"),
Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 22, Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 22,
categoryCompile) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("unused parameter v"), QLatin1String("unused parameter v"),
Utils::FileName::fromUserInput("../../scriptbug/main.cpp"), 5, Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 5,
categoryCompile)) categoryCompile))
<< QString(); << QString();
@@ -494,7 +497,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("test.moc: No such file or directory"), 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)) categoryCompile))
<< QString(); << QString();
@@ -508,15 +511,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In function `QPlotAxis':"), QLatin1String("In function `QPlotAxis':"),
Utils::FileName::fromUserInput("debug/qplotaxis.o"), -1, Utils::FileName::fromUserInput(QLatin1String("debug/qplotaxis.o")), -1,
categoryCompile) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("undefined reference to `vtable for QPlotAxis'"), 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) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("undefined reference to `vtable for QPlotAxis'"), 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) categoryCompile)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("collect2: ld returned 1 exit status"), QLatin1String("collect2: ld returned 1 exit status"),
@@ -535,23 +538,23 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << 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>]:"), 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) categoryCompile)
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("instantiated from here"), QLatin1String("instantiated from here"),
Utils::FileName::fromUserInput("../stl/main.cpp"), 38, Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), 38,
categoryCompile) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("returning reference to temporary"), QLatin1String("returning reference to temporary"),
Utils::FileName::fromUserInput("../stl/main.cpp"), 31, Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), 31,
categoryCompile) categoryCompile)
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("At global scope:"), QLatin1String("At global scope:"),
Utils::FileName::fromUserInput("../stl/main.cpp"), -1, Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), -1,
categoryCompile) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("unused parameter index"), QLatin1String("unused parameter index"),
Utils::FileName::fromUserInput("../stl/main.cpp"), 31, Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), 31,
categoryCompile)) categoryCompile))
<< QString(); << QString();
@@ -565,19 +568,19 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In file included from C:/Symbian_SDK/epoc32/include/e32cmn.h:6792,"), 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) categoryCompile)
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("from C:/Symbian_SDK/epoc32/include/e32std.h:25,"), 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) categoryCompile)
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In member function 'SSecureId::operator const TSecureId&() const':"), 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) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("returning reference to temporary"), 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)) categoryCompile))
<< QString(); << QString();
@@ -588,7 +591,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("At top level:"), QLatin1String("At top level:"),
Utils::FileName::fromUserInput("../../../src/XmlUg/targetdelete.c"), -1, Utils::FileName::fromUserInput(QLatin1String("../../../src/XmlUg/targetdelete.c")), -1,
categoryCompile)) categoryCompile))
<< QString(); << QString();
@@ -601,15 +604,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In file included from /Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h:15,"), 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) categoryCompile)
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("from <command line>:26:"), QLatin1String("from <command line>:26:"),
Utils::FileName::fromUserInput("<command line>"), 26, Utils::FileName::fromUserInput(QLatin1String("<command line>")), 26,
categoryCompile) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("no newline at end of file"), 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)) categoryCompile))
<< QString(); << QString();
@@ -620,7 +623,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("undefined reference to `MainWindow::doSomething()'"), QLatin1String("undefined reference to `MainWindow::doSomething()'"),
Utils::FileName::fromUserInput("main.cpp"), -1, Utils::FileName::fromUserInput(QLatin1String("main.cpp")), -1,
categoryCompile)) categoryCompile))
<< QString(); << QString();
@@ -632,11 +635,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In member function 'ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateConditionalFunction(const ProString&, const ProStringList&)':"), 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) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("case value '0' not in enumerated type 'ProFileEvaluator::Private::TestFunc'"), 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)) categoryCompile))
<< QString(); << QString();
@@ -648,11 +651,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In file included from <command-line>:0:0:"), QLatin1String("In file included from <command-line>:0:0:"),
Utils::FileName::fromUserInput("<command-line>"), 0, Utils::FileName::fromUserInput(QLatin1String("<command-line>")), 0,
categoryCompile) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("\"STUPID_DEFINE\" redefined"), QLatin1String("\"STUPID_DEFINE\" redefined"),
Utils::FileName::fromUserInput("./mw.h"), 4, Utils::FileName::fromUserInput(QLatin1String("./mw.h")), 4,
categoryCompile)) categoryCompile))
<< QString(); << QString();
QTest::newRow("instanciation with line:column info") QTest::newRow("instanciation with line:column info")
@@ -664,15 +667,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In function 'void UnitTest::CheckEqual(UnitTest::TestResults&, const Expected&, const Actual&, const UnitTest::TestDetails&) [with Expected = unsigned int, Actual = int]':"), 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) categoryCompile)
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("instantiated from here"), QLatin1String("instantiated from here"),
Utils::FileName::fromUserInput("file.cpp"), 87, Utils::FileName::fromUserInput(QLatin1String("file.cpp")), 87,
categoryCompile) categoryCompile)
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("comparison between signed and unsigned integer expressions [-Wsign-compare]"), QLatin1String("comparison between signed and unsigned integer expressions [-Wsign-compare]"),
Utils::FileName::fromUserInput("file.h"), 21, Utils::FileName::fromUserInput(QLatin1String("file.h")), 21,
categoryCompile)) categoryCompile))
<< QString(); << QString();
QTest::newRow("linker error") // QTCREATORBUG-3107 QTest::newRow("linker error") // QTCREATORBUG-3107
@@ -682,7 +685,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("undefined reference to `CNS5kINSPacket::SOH_BYTE'"), 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)) categoryCompile))
<< QString(); << QString();
@@ -693,7 +696,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("The name 'pushButton' (QPushButton) is already in use, defaulting to 'pushButton1'."), 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)) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
@@ -704,7 +707,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( QList<ProjectExplorer::Task>() << ( QList<ProjectExplorer::Task>()
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("warning: feupdateenv is not implemented and will always fail"), 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)) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
} }

View File

@@ -394,8 +394,8 @@ QByteArray GccToolChain::predefinedMacros(const QStringList &cxxflags) const
ToolChain::CompilerFlags GccToolChain::compilerFlags(const QStringList &cxxflags) const ToolChain::CompilerFlags GccToolChain::compilerFlags(const QStringList &cxxflags) const
{ {
if (cxxflags.contains("-std=c++0x") || cxxflags.contains("-std=gnu++0x") || if (cxxflags.contains(QLatin1String("-std=c++0x")) || cxxflags.contains(QLatin1String("-std=gnu++0x")) ||
cxxflags.contains("-std=c++11") || cxxflags.contains("-std=gnu++11")) cxxflags.contains(QLatin1String("-std=c++11")) || cxxflags.contains(QLatin1String("-std=gnu++11")))
return STD_CXX11; return STD_CXX11;
return NO_FLAGS; return NO_FLAGS;
} }
@@ -621,7 +621,7 @@ ToolChain *Internal::GccToolChainFactory::restore(const QVariantMap &data)
// Updating from 2.5: // Updating from 2.5:
QVariantMap updated = data; QVariantMap updated = data;
QString id = idFromMap(updated); 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(':')))); id = QString::fromLatin1(Constants::GCC_TOOLCHAIN_ID).append(id.mid(id.indexOf(QLatin1Char(':'))));
idToMap(updated, id); idToMap(updated, id);
autoDetectionToMap(updated, false); autoDetectionToMap(updated, false);
@@ -888,7 +888,7 @@ QList<FileName> MingwToolChain::suggestedMkspecList() const
if (Utils::HostOsInfo::isWindowsHost()) if (Utils::HostOsInfo::isWindowsHost())
return QList<FileName>() << FileName::fromString(QLatin1String("win32-g++")); return QList<FileName>() << FileName::fromString(QLatin1String("win32-g++"));
if (Utils::HostOsInfo::isLinuxHost()) { if (Utils::HostOsInfo::isLinuxHost()) {
if (version().startsWith("4.6.")) if (version().startsWith(QLatin1String("4.6.")))
return QList<FileName>() return QList<FileName>()
<< FileName::fromString(QLatin1String("win32-g++-4.6-cross")) << FileName::fromString(QLatin1String("win32-g++-4.6-cross"))
<< FileName::fromString(QLatin1String("unsupported/win32-g++-4.6-cross")); << FileName::fromString(QLatin1String("unsupported/win32-g++-4.6-cross"));

View File

@@ -284,7 +284,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (QList<Task>() << (QList<Task>()
<< Task(Task::Error, << Task(Task::Error,
QString::fromLatin1("missing separator (did you mean TAB instead of 8 spaces?). Stop."), 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))) Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString() << QString()
<< QStringList(); << QStringList();
@@ -417,12 +417,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
<< QStringList() << QStringList()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("unknown filename, no mangling"), QLatin1String("unknown filename, no mangling"),
Utils::FileName::fromUserInput("some/path/unknown.cpp"), Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")),
-1, -1,
Core::Id(Constants::TASK_CATEGORY_COMPILE)) Core::Id(Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("unknown filename, no mangling"), QLatin1String("unknown filename, no mangling"),
Utils::FileName::fromUserInput("some/path/unknown.cpp"), Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")),
-1, -1,
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Core::Id(Constants::TASK_CATEGORY_COMPILE));
QTest::newRow("find file") QTest::newRow("find file")
@@ -430,12 +430,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
<< (QStringList(QLatin1String("test"))) << (QStringList(QLatin1String("test")))
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("mangling"), QLatin1String("mangling"),
Utils::FileName::fromUserInput("file.cpp"), Utils::FileName::fromUserInput(QLatin1String("file.cpp")),
10, 10,
Core::Id(Constants::TASK_CATEGORY_COMPILE)) Core::Id(Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("mangling"), QLatin1String("mangling"),
Utils::FileName::fromUserInput("$TMPDIR/test/file.cpp"), Utils::FileName::fromUserInput(QLatin1String("$TMPDIR/test/file.cpp")),
10, 10,
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Core::Id(Constants::TASK_CATEGORY_COMPILE));
} }

View File

@@ -63,10 +63,10 @@ namespace ProjectExplorer {
static QString cleanName(const QString &name) static QString cleanName(const QString &name)
{ {
QString result = name; QString result = name;
result.replace(QRegExp("\\W"), QLatin1String("_")); result.replace(QRegExp(QLatin1String("\\W")), QLatin1String("_"));
result.replace(QRegExp("_+"), "_"); // compact _ result.replace(QRegExp(QLatin1String("_+")), QLatin1String("_")); // compact _
result.remove(QRegExp("^_*")); // remove leading _ result.remove(QRegExp(QLatin1String("^_*"))); // remove leading _
result.remove(QRegExp("_+$")); // remove trailing _ result.remove(QRegExp(QLatin1String("_+$"))); // remove trailing _
if (result.isEmpty()) if (result.isEmpty())
result = QLatin1String("unknown"); result = QLatin1String("unknown");
return result; return result;

View File

@@ -153,7 +153,7 @@ int KitModel::columnCount(const QModelIndex &parent) const
QVariant KitModel::data(const QModelIndex &index, int role) 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) if (!index.isValid() || index.column() != 0)
return QVariant(); return QVariant();

View File

@@ -55,7 +55,7 @@ namespace ProjectExplorer {
KitOptionsPage::KitOptionsPage() : KitOptionsPage::KitOptionsPage() :
m_model(0), m_selectionModel(0), m_currentWidget(0), m_toShow(0) 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")); setDisplayName(tr("Kits"));
setCategory(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY)); setCategory(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
setDisplayCategory(QCoreApplication::translate("ProjectExplorer", setDisplayCategory(QCoreApplication::translate("ProjectExplorer",

View File

@@ -144,7 +144,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("identifier \"f\" is undefined\nf(0);"), 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))) Core::Id(Constants::TASK_CATEGORY_COMPILE)))
<< QString(); << QString();
@@ -158,7 +158,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("function \"AClass::privatefunc\" (declared at line 4 of \"main.h\") is inaccessible\nb.privatefunc();"), 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))) Core::Id(Constants::TASK_CATEGORY_COMPILE)))
<< QString(); << QString();
@@ -172,7 +172,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("use of \"=\" where \"==\" may have been intended\nwhile (a = true)"), 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))) Core::Id(Constants::TASK_CATEGORY_COMPILE)))
<< QString(); << QString();
} }

View File

@@ -1451,13 +1451,13 @@ void MiniProjectTargetSelector::updateSummary()
.arg(startupProject->displayName()); .arg(startupProject->displayName());
} else { } else {
if (!m_listWidgets[TARGET]->isVisibleTo(this)) if (!m_listWidgets[TARGET]->isVisibleTo(this))
summary.append("<br/>"); summary.append(QLatin1String("<br/>"));
if (!m_listWidgets[BUILD]->isVisibleTo(this)) if (!m_listWidgets[BUILD]->isVisibleTo(this))
summary.append("<br/>"); summary.append(QLatin1String("<br/>"));
if (!m_listWidgets[DEPLOY]->isVisibleTo(this)) if (!m_listWidgets[DEPLOY]->isVisibleTo(this))
summary.append("<br/>"); summary.append(QLatin1String("<br/>"));
if (!m_listWidgets[RUN]->isVisibleTo(this)) if (!m_listWidgets[RUN]->isVisibleTo(this))
summary.append("<br/>"); summary.append(QLatin1String("<br/>"));
} }
} }
m_summaryLabel->setText(summary); m_summaryLabel->setText(summary);

View File

@@ -105,7 +105,7 @@ void MsvcParser::stdOutput(const QString &line)
if (processCompileLine(line)) if (processCompileLine(line))
return; return;
if (line.startsWith("Error:")) { if (line.startsWith(QLatin1String("Error:"))) {
m_lastTask = Task(Task::Error, m_lastTask = Task(Task::Error,
line.mid(6).trimmed(), /* description */ line.mid(6).trimmed(), /* description */
Utils::FileName(), /* fileName */ Utils::FileName(), /* fileName */
@@ -113,7 +113,7 @@ void MsvcParser::stdOutput(const QString &line)
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Core::Id(Constants::TASK_CATEGORY_COMPILE));
return; return;
} }
if (line.startsWith("Warning:")) { if (line.startsWith(QLatin1String("Warning:"))) {
m_lastTask = Task(Task::Warning, m_lastTask = Task(Task::Warning,
line.mid(8).trimmed(), /* description */ line.mid(8).trimmed(), /* description */
Utils::FileName(), /* fileName */ Utils::FileName(), /* fileName */
@@ -203,18 +203,20 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
QTest::newRow("labeled error") QTest::newRow("labeled error")
<< QString::fromLatin1("qmlstandalone\\main.cpp(54) : error C4716: 'findUnresolvedModule' : must return a value") << OutputParserTester::STDOUT << QString::fromLatin1("qmlstandalone\\main.cpp(54) : error C4716: 'findUnresolvedModule' : must return a value") << OutputParserTester::STDOUT
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Error, << (QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("C4716: 'findUnresolvedModule' : must return a value"), QLatin1String("C4716: 'findUnresolvedModule' : must return a value"),
Utils::FileName::fromUserInput("qmlstandalone\\main.cpp"), 54, Utils::FileName::fromUserInput(QLatin1String("qmlstandalone\\main.cpp")), 54,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString(); << QString();
QTest::newRow("labeled warning") QTest::newRow("labeled warning")
<< QString::fromLatin1("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp(69) : warning C4100: 'something' : unreferenced formal parameter") << OutputParserTester::STDOUT << QString::fromLatin1("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp(69) : warning C4100: 'something' : unreferenced formal parameter") << OutputParserTester::STDOUT
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << Task(Task::Warning, << (QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("C4100: 'something' : unreferenced formal parameter"), QLatin1String("C4100: 'something' : unreferenced formal parameter"),
Utils::FileName::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69, Utils::FileName::fromUserInput(QLatin1String("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp")), 69,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString(); << QString();
@@ -226,11 +228,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("C4099: 'TextEditor::CompletionItem' : type name first seen using 'struct' now seen using 'class'"), 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)) Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("see declaration of 'TextEditor::CompletionItem'"), 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))) Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString(); << 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" " _Traits=std::_Tmap_traits<int,double,std::less<int>,std::allocator<std::pair<const int,double>>,false>\n"
"]\n" "]\n"
"No constructor could take the source type, or constructor overload resolution was ambiguous"), "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))) Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString(); << QString();
QTest::newRow("Linker error 1") QTest::newRow("Linker error 1")
@@ -283,7 +285,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("LNK2019: unresolved external symbol \"public: void __thiscall Data::doit(void)\" (?doit@Data@@QAEXXZ) referenced in function _main"), 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))) Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString(); << QString();
QTest::newRow("Linker error 2") QTest::newRow("Linker error 2")
@@ -293,7 +295,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("LNK1120: 1 unresolved externals"), 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))) Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString(); << QString();
QTest::newRow("Linker error 3") QTest::newRow("Linker error 3")
@@ -321,11 +323,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (QList<ProjectExplorer::Task>() << (QList<ProjectExplorer::Task>()
<< Task(Task::Warning, << 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'"), 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)) Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("see declaration of 'std::_Copy_impl'"), 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)) Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("see reference to function template instantiation '_OutIt std::copy<const unsigned char*,unsigned short*>(_InIt,_InIt,_OutIt)' being compiled\n" 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" " _OutIt=unsigned short *,\n"
" _InIt=const unsigned char *\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))) Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)))
<< QString(); << QString();
} }

View File

@@ -528,7 +528,7 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
vcvarsAllbat, QLatin1String("ia64"), true)); vcvarsAllbat, QLatin1String("ia64"), true));
results.append(new MsvcToolChain(generateDisplayName(vsName, MsvcToolChain::VS, MsvcToolChain::x86_ia64), results.append(new MsvcToolChain(generateDisplayName(vsName, MsvcToolChain::VS, MsvcToolChain::x86_ia64),
findAbiOfMsvc(MsvcToolChain::VS, MsvcToolChain::x86_ia64, vsName), findAbiOfMsvc(MsvcToolChain::VS, MsvcToolChain::x86_ia64, vsName),
vcvarsAllbat, QString("x86_ia64"), true)); vcvarsAllbat, QLatin1String("x86_ia64"), true));
} else { } else {
qWarning("Unable to find MSVC setup script %s in version %d", qPrintable(vcvarsAllbat), version); qWarning("Unable to find MSVC setup script %s in version %d", qPrintable(vcvarsAllbat), version);
} }

View File

@@ -1942,7 +1942,7 @@ int ProjectExplorerPlugin::queue(QList<Project *> projects, QList<Core::Id> step
foreach (const Project *p, projects) foreach (const Project *p, projects)
projectNames << p->displayName(); projectNames << p->displayName();
foreach (const Core::Id id, stepIds) foreach (const Core::Id id, stepIds)
stepNames << id.name(); stepNames << id.toString();
qDebug() << "Building" << stepNames << "for projects" << projectNames; qDebug() << "Building" << stepNames << "for projects" << projectNames;
} }

View File

@@ -285,4 +285,4 @@ RESOURCES += projectexplorer.qrc
DEFINES += QTC_CPU=X86Architecture DEFINES += QTC_CPU=X86Architecture
} }
DEFINES += PROJECTEXPLORER_LIBRARY DEFINES += PROJECTEXPLORER_LIBRARY QT_NO_CAST_FROM_ASCII

View File

@@ -14,7 +14,7 @@ QtcPlugin {
Depends { name: "QtcSsh" } Depends { name: "QtcSsh" }
Depends { name: "cpp" } 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([ cpp.includePaths: base.concat([
"customwizard", "customwizard",
"publishing" "publishing"

View File

@@ -266,7 +266,7 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
const QString vcsTopic = node->vcsTopic(); const QString vcsTopic = node->vcsTopic();
if (!vcsTopic.isEmpty()) if (!vcsTopic.isEmpty())
name += " (" + vcsTopic + ")"; name += QLatin1String(" (") + vcsTopic + QLatin1Char(')');
} }
result = name; result = name;

View File

@@ -2364,7 +2364,7 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
tcId.replace(QLatin1String("Qt4ProjectManager.ToolChain.Maemo:"), tcId.replace(QLatin1String("Qt4ProjectManager.ToolChain.Maemo:"),
QLatin1String("ProjectExplorer.ToolChain.Gcc:")); // convert Maemo to GCC QLatin1String("ProjectExplorer.ToolChain.Gcc:")); // convert Maemo to GCC
QString data = tcId.mid(tcId.indexOf(QLatin1Char(':')) + 1); QString data = tcId.mid(tcId.indexOf(QLatin1Char(':')) + 1);
QStringList split = data.split('.', QString::KeepEmptyParts); QStringList split = data.split(QLatin1Char('.'), QString::KeepEmptyParts);
QString compilerPath; QString compilerPath;
QString debuggerPath; QString debuggerPath;
Abi compilerAbi; Abi compilerAbi;
@@ -2423,7 +2423,7 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
int dcPos = deployIt.key(); int dcPos = deployIt.key();
const QVariantMap &dc = deployIt.value(); const QVariantMap &dc = deployIt.value();
// Device // Device
QString devId = dc.value(QLatin1String("Qt4ProjectManager.MaemoRunConfiguration.DeviceId")).toString(); QByteArray devId = dc.value(QLatin1String("Qt4ProjectManager.MaemoRunConfiguration.DeviceId")).toByteArray();
if (devId.isEmpty()) if (devId.isEmpty())
devId = QByteArray("Desktop Device"); devId = QByteArray("Desktop Device");
if (!devId.isEmpty() && !DeviceManager::instance()->find(Core::Id(devId))) // We do not know that device if (!devId.isEmpty() && !DeviceManager::instance()->find(Core::Id(devId))) // We do not know that device

View File

@@ -782,7 +782,7 @@ bool Target::fromMap(const QVariantMap &map)
if (!factory) { if (!factory) {
Core::Id id = idFromMap(valueMap); Core::Id id = idFromMap(valueMap);
qWarning("No factory found to restore deployment configuration of id '%s'!", qWarning("No factory found to restore deployment configuration of id '%s'!",
qPrintable(id.isValid() ? id.toString() : "UNKNOWN")); id.isValid() ? qPrintable(id.toString()) : "UNKNOWN");
continue; continue;
} }
DeployConfiguration *dc = factory->restore(this, valueMap); DeployConfiguration *dc = factory->restore(this, valueMap);

View File

@@ -60,7 +60,7 @@ public:
static QString createId(const QString &id) 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()); newId.append(QLatin1Char(':') + QUuid::createUuid().toString());
return newId; return newId;
} }

View File

@@ -189,7 +189,7 @@ static bool parseSDK(QXmlStreamReader& theReader,
if (theReader.isEndElement()) { if (theReader.isEndElement()) {
// Got to the end element so return... // Got to the end element so return...
if (theReader.name() == "Platform") if (theReader.name() == QLatin1String("Platform"))
return (sdkArch!=Abi::UnknownArchitecture && !sdkName.isEmpty()); return (sdkArch!=Abi::UnknownArchitecture && !sdkName.isEmpty());
} else if (theReader.isStartElement()) { } else if (theReader.isStartElement()) {
const QStringRef elemName = theReader.name(); const QStringRef elemName = theReader.name();