summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager/qtparser.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2010-09-15 13:55:01 +0200
committerTobias Hunger <tobias.hunger@nokia.com>2010-09-15 14:46:33 +0200
commit0204ef21f57b87b6e1957d5c9babf3779a6eecd3 (patch)
tree8308eedaaa701855d22abee972fcf712feade4f9 /src/plugins/qt4projectmanager/qtparser.cpp
parent49d6fc27ec41d48d601bdff9289353a89cfe4691 (diff)
downloadqt-creator-0204ef21f57b87b6e1957d5c9babf3779a6eecd3.tar.gz
Parser debugging/testing improvements
* Set objectname on all parsers to be able to distinguish between them more easily when debugging * Add some unit tests about pass-through of data we need in the gcc parser to the parsers that enhd up in front of the gcc parser This is to address QTCREATORBUG-1917.
Diffstat (limited to 'src/plugins/qt4projectmanager/qtparser.cpp')
-rw-r--r--src/plugins/qt4projectmanager/qtparser.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/plugins/qt4projectmanager/qtparser.cpp b/src/plugins/qt4projectmanager/qtparser.cpp
index 7c9aa3d28d..581e5f98fa 100644
--- a/src/plugins/qt4projectmanager/qtparser.cpp
+++ b/src/plugins/qt4projectmanager/qtparser.cpp
@@ -45,6 +45,7 @@ namespace {
QtParser::QtParser()
{
+ setObjectName(QLatin1String("QtParser"));
m_mocRegExp.setPattern(QString::fromLatin1(FILE_PATTERN) + "(\\d+):\\s(Warning|Error):\\s(.+)$");
m_mocRegExp.setMinimal(true);
}
@@ -102,7 +103,21 @@ void Qt4ProjectManagerPlugin::testQtOutputParser_data()
<< QString() << QString::fromLatin1("Sometext")
<< QList<ProjectExplorer::Task>()
<< QString();
-
+ QTest::newRow("pass-through gcc infos")
+ << QString::fromLatin1("/temp/test/untitled8/main.cpp: In function `int main(int, char**)':\n"
+ "../../scriptbug/main.cpp: At global scope:\n"
+ "../../scriptbug/main.cpp: In instantiation of void bar(i) [with i = double]:\n"
+ "../../scriptbug/main.cpp:8: instantiated from void foo(i) [with i = double]\n"
+ "../../scriptbug/main.cpp:22: instantiated from here\n")
+ << OutputParserTester::STDERR
+ << QString()
+ << QString::fromLatin1("/temp/test/untitled8/main.cpp: In function `int main(int, char**)':\n"
+ "../../scriptbug/main.cpp: At global scope:\n"
+ "../../scriptbug/main.cpp: In instantiation of void bar(i) [with i = double]:\n"
+ "../../scriptbug/main.cpp:8: instantiated from void foo(i) [with i = double]\n"
+ "../../scriptbug/main.cpp:22: instantiated from here\n")
+ << QList<ProjectExplorer::Task>()
+ << QString();
QTest::newRow("moc warning")
<< QString::fromLatin1("..\\untitled\\errorfile.h:0: Warning: No relevant classes found. No output generated.")
<< OutputParserTester::STDERR