Commit 1dd44cfb authored by Tobias Hunger's avatar Tobias Hunger

Remove some useless Core::Id(...) and ProjectExplorer::

Change-Id: Iebf4302bb5e3f893dc573e504efc214861d80848
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent c821e7c5
...@@ -63,7 +63,7 @@ void ClangParser::stdError(const QString &line) ...@@ -63,7 +63,7 @@ void ClangParser::stdError(const QString &line)
m_commandRegExp.cap(4), m_commandRegExp.cap(4),
Utils::FileName(), /* filename */ Utils::FileName(), /* filename */
-1, /* line */ -1, /* line */
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
if (m_commandRegExp.cap(3) == QLatin1String("warning")) if (m_commandRegExp.cap(3) == QLatin1String("warning"))
task.type = Task::Warning; task.type = Task::Warning;
else if (m_commandRegExp.cap(3) == QLatin1String("note")) else if (m_commandRegExp.cap(3) == QLatin1String("note"))
...@@ -78,7 +78,7 @@ void ClangParser::stdError(const QString &line) ...@@ -78,7 +78,7 @@ void ClangParser::stdError(const QString &line)
lne.trimmed(), lne.trimmed(),
Utils::FileName::fromUserInput(m_inLineRegExp.cap(2)), /* filename */ Utils::FileName::fromUserInput(m_inLineRegExp.cap(2)), /* filename */
m_inLineRegExp.cap(3).toInt(), /* line */ m_inLineRegExp.cap(3).toInt(), /* line */
Core::Id(Constants::TASK_CATEGORY_COMPILE))); Constants::TASK_CATEGORY_COMPILE));
return; return;
} }
...@@ -127,7 +127,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() ...@@ -127,7 +127,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
QTest::addColumn<QString>("outputLines"); QTest::addColumn<QString>("outputLines");
const Core::Id categoryCompile = Core::Id(Constants::TASK_CATEGORY_COMPILE); const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE;
QTest::newRow("pass-through stdout") QTest::newRow("pass-through stdout")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
......
...@@ -170,7 +170,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() ...@@ -170,7 +170,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
QTest::addColumn<QString>("outputLines"); QTest::addColumn<QString>("outputLines");
const Core::Id categoryCompile = Core::Id(Constants::TASK_CATEGORY_COMPILE); const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE;
const QString simplePattern = QLatin1String("^([a-z]+\\.[a-z]+):(\\d+): error: ([^\\s].+)$"); const QString simplePattern = QLatin1String("^([a-z]+\\.[a-z]+):(\\d+): error: ([^\\s].+)$");
const Utils::FileName fileName = Utils::FileName::fromUserInput(QLatin1String("main.c")); const Utils::FileName fileName = Utils::FileName::fromUserInput(QLatin1String("main.c"));
......
...@@ -83,7 +83,7 @@ void GccParser::stdError(const QString &line) ...@@ -83,7 +83,7 @@ void GccParser::stdError(const QString &line)
lne /* description */, lne /* description */,
Utils::FileName() /* filename */, Utils::FileName() /* filename */,
-1 /* linenumber */, -1 /* linenumber */,
Core::Id(Constants::TASK_CATEGORY_COMPILE))); Constants::TASK_CATEGORY_COMPILE));
return; return;
} else if (m_regExpGccNames.indexIn(lne) > -1) { } else if (m_regExpGccNames.indexIn(lne) > -1) {
QString description = lne.mid(m_regExpGccNames.matchedLength()); QString description = lne.mid(m_regExpGccNames.matchedLength());
...@@ -91,7 +91,7 @@ void GccParser::stdError(const QString &line) ...@@ -91,7 +91,7 @@ void GccParser::stdError(const QString &line)
description, description,
Utils::FileName(), /* filename */ Utils::FileName(), /* filename */
-1, /* line */ -1, /* line */
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
if (description.startsWith(QLatin1String("warning: "))) { if (description.startsWith(QLatin1String("warning: "))) {
task.type = Task::Warning; task.type = Task::Warning;
task.description = description.mid(9); task.description = description.mid(9);
...@@ -106,7 +106,7 @@ void GccParser::stdError(const QString &line) ...@@ -106,7 +106,7 @@ void GccParser::stdError(const QString &line)
Task task(Task::Unknown, Task task(Task::Unknown,
m_regExp.cap(8) /* description */, m_regExp.cap(8) /* description */,
filename, lineno, filename, lineno,
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
if (m_regExp.cap(7) == QLatin1String("warning")) if (m_regExp.cap(7) == QLatin1String("warning"))
task.type = Task::Warning; task.type = Task::Warning;
else if (m_regExp.cap(7) == QLatin1String("error") || else if (m_regExp.cap(7) == QLatin1String("error") ||
...@@ -126,7 +126,7 @@ void GccParser::stdError(const QString &line) ...@@ -126,7 +126,7 @@ void GccParser::stdError(const QString &line)
lne.trimmed() /* description */, lne.trimmed() /* description */,
Utils::FileName::fromUserInput(m_regExpIncluded.cap(1)) /* filename */, Utils::FileName::fromUserInput(m_regExpIncluded.cap(1)) /* filename */,
m_regExpIncluded.cap(3).toInt() /* linenumber */, m_regExpIncluded.cap(3).toInt() /* linenumber */,
Core::Id(Constants::TASK_CATEGORY_COMPILE))); Constants::TASK_CATEGORY_COMPILE));
return; return;
} else if (lne.startsWith(QLatin1Char(' '))) { } else if (lne.startsWith(QLatin1Char(' '))) {
amendDescription(lne, true); amendDescription(lne, true);
...@@ -194,7 +194,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() ...@@ -194,7 +194,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
QTest::addColumn<QString>("outputLines"); QTest::addColumn<QString>("outputLines");
const Core::Id categoryCompile = Core::Id(Constants::TASK_CATEGORY_COMPILE); const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE;
QTest::newRow("pass-through stdout") QTest::newRow("pass-through stdout")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
......
...@@ -429,12 +429,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data() ...@@ -429,12 +429,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
QLatin1String("no filename, no mangling"), QLatin1String("no filename, no mangling"),
Utils::FileName(), Utils::FileName(),
-1, -1,
Core::Id(Constants::TASK_CATEGORY_COMPILE)) Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("no filename, no mangling"), QLatin1String("no filename, no mangling"),
Utils::FileName(), Utils::FileName(),
-1, -1,
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
QTest::newRow("no mangling") QTest::newRow("no mangling")
<< QStringList() << QStringList()
<< QStringList() << QStringList()
...@@ -442,12 +442,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data() ...@@ -442,12 +442,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
QLatin1String("unknown filename, no mangling"), QLatin1String("unknown filename, no mangling"),
Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")), Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")),
-1, -1,
Core::Id(Constants::TASK_CATEGORY_COMPILE)) Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("unknown filename, no mangling"), QLatin1String("unknown filename, no mangling"),
Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")), Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")),
-1, -1,
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
QTest::newRow("find file") QTest::newRow("find file")
<< (QStringList(QLatin1String("test/file.cpp"))) << (QStringList(QLatin1String("test/file.cpp")))
<< (QStringList(QLatin1String("test"))) << (QStringList(QLatin1String("test")))
...@@ -455,12 +455,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data() ...@@ -455,12 +455,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
QLatin1String("mangling"), QLatin1String("mangling"),
Utils::FileName::fromUserInput(QLatin1String("file.cpp")), Utils::FileName::fromUserInput(QLatin1String("file.cpp")),
10, 10,
Core::Id(Constants::TASK_CATEGORY_COMPILE)) Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("mangling"), QLatin1String("mangling"),
Utils::FileName::fromUserInput(QLatin1String("$TMPDIR/test/file.cpp")), Utils::FileName::fromUserInput(QLatin1String("$TMPDIR/test/file.cpp")),
10, 10,
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
} }
void ProjectExplorerPlugin::testGnuMakeParserTaskMangling() void ProjectExplorerPlugin::testGnuMakeParserTaskMangling()
......
...@@ -74,7 +74,7 @@ void LdParser::stdError(const QString &line) ...@@ -74,7 +74,7 @@ void LdParser::stdError(const QString &line)
lne /* description */, lne /* description */,
Utils::FileName() /* filename */, Utils::FileName() /* filename */,
-1 /* linenumber */, -1 /* linenumber */,
Core::Id(Constants::TASK_CATEGORY_COMPILE))); Constants::TASK_CATEGORY_COMPILE));
return; return;
} else if (m_regExpGccNames.indexIn(lne) > -1) { } else if (m_regExpGccNames.indexIn(lne) > -1) {
QString description = lne.mid(m_regExpGccNames.matchedLength()); QString description = lne.mid(m_regExpGccNames.matchedLength());
...@@ -82,7 +82,7 @@ void LdParser::stdError(const QString &line) ...@@ -82,7 +82,7 @@ void LdParser::stdError(const QString &line)
description, description,
Utils::FileName(), /* filename */ Utils::FileName(), /* filename */
-1, /* line */ -1, /* line */
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
if (description.startsWith(QLatin1String("warning: "))) { if (description.startsWith(QLatin1String("warning: "))) {
task.type = Task::Warning; task.type = Task::Warning;
task.description = description.mid(9); task.description = description.mid(9);
...@@ -105,7 +105,7 @@ void LdParser::stdError(const QString &line) ...@@ -105,7 +105,7 @@ void LdParser::stdError(const QString &line)
} }
QString description = m_regExpLinker.cap(8).trimmed(); QString description = m_regExpLinker.cap(8).trimmed();
Task task(Task::Error, description, filename, lineno, Task task(Task::Error, description, filename, lineno,
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
if (description.startsWith(QLatin1String("At global scope")) || if (description.startsWith(QLatin1String("At global scope")) ||
description.startsWith(QLatin1String("At top level")) || description.startsWith(QLatin1String("At top level")) ||
description.startsWith(QLatin1String("instantiated from ")) || description.startsWith(QLatin1String("instantiated from ")) ||
......
...@@ -70,7 +70,7 @@ void LinuxIccParser::stdError(const QString &line) ...@@ -70,7 +70,7 @@ void LinuxIccParser::stdError(const QString &line)
m_temporary = ProjectExplorer::Task(Task::Unknown, m_firstLine.cap(6).trimmed(), m_temporary = ProjectExplorer::Task(Task::Unknown, m_firstLine.cap(6).trimmed(),
Utils::FileName::fromUserInput(m_firstLine.cap(1)), Utils::FileName::fromUserInput(m_firstLine.cap(1)),
m_firstLine.cap(2).toInt(), m_firstLine.cap(2).toInt(),
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
QString category = m_firstLine.cap(4); QString category = m_firstLine.cap(4);
if (category == QLatin1String("error")) if (category == QLatin1String("error"))
m_temporary.type = Task::Error; m_temporary.type = Task::Error;
...@@ -152,7 +152,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() ...@@ -152,7 +152,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("identifier \"f\" is undefined\nf(0);"), QLatin1String("identifier \"f\" is undefined\nf(0);"),
Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 13, Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 13,
Core::Id(Constants::TASK_CATEGORY_COMPILE))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
QTest::newRow("private function") QTest::newRow("private function")
...@@ -166,7 +166,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() ...@@ -166,7 +166,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< 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(QLatin1String("main.cpp")), 53, Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 53,
Core::Id(Constants::TASK_CATEGORY_COMPILE))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
QTest::newRow("simple warning") QTest::newRow("simple warning")
...@@ -180,7 +180,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() ...@@ -180,7 +180,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< 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(QLatin1String("main.cpp")), 41, Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 41,
Core::Id(Constants::TASK_CATEGORY_COMPILE))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
} }
......
...@@ -117,7 +117,7 @@ void MsvcParser::stdOutput(const QString &line) ...@@ -117,7 +117,7 @@ void MsvcParser::stdOutput(const QString &line)
line.mid(6).trimmed(), /* description */ line.mid(6).trimmed(), /* description */
Utils::FileName(), /* fileName */ Utils::FileName(), /* fileName */
-1, /* linenumber */ -1, /* linenumber */
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
return; return;
} }
if (line.startsWith(QLatin1String("Warning:"))) { if (line.startsWith(QLatin1String("Warning:"))) {
...@@ -125,7 +125,7 @@ void MsvcParser::stdOutput(const QString &line) ...@@ -125,7 +125,7 @@ void MsvcParser::stdOutput(const QString &line)
line.mid(8).trimmed(), /* description */ line.mid(8).trimmed(), /* description */
Utils::FileName(), /* fileName */ Utils::FileName(), /* fileName */
-1, /* linenumber */ -1, /* linenumber */
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
return; return;
} }
if (infoPos > -1) { if (infoPos > -1) {
...@@ -133,7 +133,7 @@ void MsvcParser::stdOutput(const QString &line) ...@@ -133,7 +133,7 @@ void MsvcParser::stdOutput(const QString &line)
m_additionalInfoRegExp.cap(3).trimmed(), /* description */ m_additionalInfoRegExp.cap(3).trimmed(), /* description */
Utils::FileName::fromUserInput(m_additionalInfoRegExp.cap(1)), /* fileName */ Utils::FileName::fromUserInput(m_additionalInfoRegExp.cap(1)), /* fileName */
m_additionalInfoRegExp.cap(2).toInt(), /* linenumber */ m_additionalInfoRegExp.cap(2).toInt(), /* linenumber */
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
return; return;
} }
IOutputParser::stdOutput(line); IOutputParser::stdOutput(line);
...@@ -155,7 +155,7 @@ bool MsvcParser::processCompileLine(const QString &line) ...@@ -155,7 +155,7 @@ bool MsvcParser::processCompileLine(const QString &line)
m_lastTask = Task(Task::Unknown, m_lastTask = Task(Task::Unknown,
m_compileRegExp.cap(4).trimmed() /* description */, m_compileRegExp.cap(4).trimmed() /* description */,
position.first, position.second, position.first, position.second,
Core::Id(Constants::TASK_CATEGORY_COMPILE)); Constants::TASK_CATEGORY_COMPILE);
if (m_compileRegExp.cap(3) == QLatin1String("warning")) if (m_compileRegExp.cap(3) == QLatin1String("warning"))
m_lastTask.type = Task::Warning; m_lastTask.type = Task::Warning;
else if (m_compileRegExp.cap(3) == QLatin1String("error")) else if (m_compileRegExp.cap(3) == QLatin1String("error"))
...@@ -186,6 +186,7 @@ void MsvcParser::doFlush() ...@@ -186,6 +186,7 @@ void MsvcParser::doFlush()
# include "projectexplorer/outputparser_test.h" # include "projectexplorer/outputparser_test.h"
using namespace ProjectExplorer::Internal; using namespace ProjectExplorer::Internal;
using namespace ProjectExplorer;
void ProjectExplorerPlugin::testMsvcOutputParsers_data() void ProjectExplorerPlugin::testMsvcOutputParsers_data()
{ {
...@@ -193,39 +194,39 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() ...@@ -193,39 +194,39 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<OutputParserTester::Channel>("inputChannel");
QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdOutLines");
QTest::addColumn<QString>("childStdErrLines"); QTest::addColumn<QString>("childStdErrLines");
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); QTest::addColumn<QList<Task> >("tasks");
QTest::addColumn<QString>("outputLines"); QTest::addColumn<QString>("outputLines");
QTest::newRow("pass-through stdout") QTest::newRow("pass-through stdout")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
<< QString::fromLatin1("Sometext\n") << QString() << QString::fromLatin1("Sometext\n") << QString()
<< QList<ProjectExplorer::Task>() << QList<Task>()
<< QString(); << QString();
QTest::newRow("pass-through stderr") QTest::newRow("pass-through stderr")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString::fromLatin1("Sometext") << OutputParserTester::STDERR
<< QString() << QString::fromLatin1("Sometext\n") << QString() << QString::fromLatin1("Sometext\n")
<< QList<ProjectExplorer::Task>() << QList<Task>()
<< QString(); << QString();
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>() << (QList<Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("C4716: 'findUnresolvedModule' : must return a value"), QLatin1String("C4716: 'findUnresolvedModule' : must return a value"),
Utils::FileName::fromUserInput(QLatin1String("qmlstandalone\\main.cpp")), 54, Utils::FileName::fromUserInput(QLatin1String("qmlstandalone\\main.cpp")), 54,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) 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>() << (QList<Task>()
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("C4100: 'something' : unreferenced formal parameter"), QLatin1String("C4100: 'something' : unreferenced formal parameter"),
Utils::FileName::fromUserInput(QLatin1String("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))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
QTest::newRow("additional information") QTest::newRow("additional information")
...@@ -233,26 +234,26 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() ...@@ -233,26 +234,26 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
" x:\\src\\plugins\\texteditor\\completionsupport.h(39) : see declaration of 'TextEditor::CompletionItem'") " x:\\src\\plugins\\texteditor\\completionsupport.h(39) : see declaration of 'TextEditor::CompletionItem'")
<< OutputParserTester::STDOUT << OutputParserTester::STDOUT
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<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(QLatin1String("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)) 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(QLatin1String("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))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
QTest::newRow("fatal linker error") QTest::newRow("fatal linker error")
<< QString::fromLatin1("LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'") << QString::fromLatin1("LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'")
<< OutputParserTester::STDOUT << OutputParserTester::STDOUT
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("LNK1146: no argument specified with option '/LIBPATH:'"), QLatin1String("LNK1146: no argument specified with option '/LIBPATH:'"),
Utils::FileName(), -1, Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
// This actually comes through stderr! // This actually comes through stderr!
...@@ -260,11 +261,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() ...@@ -260,11 +261,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< QString::fromLatin1("cl : Command line warning D9002 : ignoring unknown option '-fopenmp'") << QString::fromLatin1("cl : Command line warning D9002 : ignoring unknown option '-fopenmp'")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("D9002 : ignoring unknown option '-fopenmp'"), QLatin1String("D9002 : ignoring unknown option '-fopenmp'"),
Utils::FileName(), -1, Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
QTest::newRow("complex error") QTest::newRow("complex error")
<< QString::fromLatin1("..\\untitled\\main.cpp(19) : error C2440: 'initializing' : cannot convert from 'int' to 'std::_Tree<_Traits>::iterator'\n" << QString::fromLatin1("..\\untitled\\main.cpp(19) : error C2440: 'initializing' : cannot convert from 'int' to 'std::_Tree<_Traits>::iterator'\n"
...@@ -275,7 +276,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() ...@@ -275,7 +276,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
" 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")
<< OutputParserTester::STDOUT << OutputParserTester::STDOUT
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("C2440: 'initializing' : cannot convert from 'int' to 'std::_Tree<_Traits>::iterator'\n" QLatin1String("C2440: 'initializing' : cannot convert from 'int' to 'std::_Tree<_Traits>::iterator'\n"
"with\n" "with\n"
...@@ -284,37 +285,37 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() ...@@ -284,37 +285,37 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
"]\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(QLatin1String("..\\untitled\\main.cpp")), 19, Utils::FileName::fromUserInput(QLatin1String("..\\untitled\\main.cpp")), 19,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
QTest::newRow("Linker error 1") QTest::newRow("Linker error 1")
<< QString::fromLatin1("main.obj : error LNK2019: unresolved external symbol \"public: void __thiscall Data::doit(void)\" (?doit@Data@@QAEXXZ) referenced in function _main") << QString::fromLatin1("main.obj : error LNK2019: unresolved external symbol \"public: void __thiscall Data::doit(void)\" (?doit@Data@@QAEXXZ) referenced in function _main")
<< OutputParserTester::STDOUT << OutputParserTester::STDOUT
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<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(QLatin1String("main.obj")), -1, Utils::FileName::fromUserInput(QLatin1String("main.obj")), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
QTest::newRow("Linker error 2") QTest::newRow("Linker error 2")
<< QString::fromLatin1("debug\\Experimentation.exe : fatal error LNK1120: 1 unresolved externals") << QString::fromLatin1("debug\\Experimentation.exe : fatal error LNK1120: 1 unresolved externals")
<< OutputParserTester::STDOUT << OutputParserTester::STDOUT
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("LNK1120: 1 unresolved externals"), QLatin1String("LNK1120: 1 unresolved externals"),
Utils::FileName::fromUserInput(QLatin1String("debug\\Experimentation.exe")), -1, Utils::FileName::fromUserInput(QLatin1String("debug\\Experimentation.exe")), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();
QTest::newRow("Linker error 3") QTest::newRow("Linker error 3")
<< QString::fromLatin1("Error: dependent '..\\..\\..\\..\\creator-2.5\\src\\plugins\\coreplugin\\ifile.h' does not exist.") << QString::fromLatin1("Error: dependent '..\\..\\..\\..\\creator-2.5\\src\\plugins\\coreplugin\\ifile.h' does not exist.")
<< OutputParserTester::STDOUT << OutputParserTester::STDOUT
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("dependent '..\\..\\..\\..\\creator-2.5\\src\\plugins\\coreplugin\\ifile.h' does not exist."), QLatin1String("dependent '..\\..\\..\\..\\creator-2.5\\src\\plugins\\coreplugin\\ifile.h' does not exist."),
Utils::FileName(), -1, Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) Constants::TASK_CATEGORY_COMPILE))
<< QString(); << QString();