diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2012-10-11 18:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2012-10-12 09:50:28 +0200 |
commit | 97cc22d6eee8ba56bc04398a9508ed66c8259c02 (patch) | |
tree | 7ca1619d557246ff573826ecbf4c149483659338 /src/plugins/qtsupport/qtparser.cpp | |
parent | 58f101cb5515aad3b9b6edfb9fffd24b1dac1b73 (diff) |
QtParser handles qdoc errors too (case-insensitive error/warning)
I thought this was already working but it turns out that gccparser
was catching it instead. That probably won't work on Windows.
https://codereview.qt-project.org/#change,35510 - qdoc will output
the text "error:" or "warning:" now so that creator will make proper
"issues" in the issue list.
Change-Id: I9db13062335c1a2325b0937e43041058510d05dd
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/qtsupport/qtparser.cpp')
-rw-r--r-- | src/plugins/qtsupport/qtparser.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/plugins/qtsupport/qtparser.cpp b/src/plugins/qtsupport/qtparser.cpp index 56d03ee5473..975e84407c1 100644 --- a/src/plugins/qtsupport/qtparser.cpp +++ b/src/plugins/qtsupport/qtparser.cpp @@ -41,7 +41,7 @@ using ProjectExplorer::Task; #define FILE_PATTERN "^(([A-Za-z]:)?[^:]+\\.[^:]+)" QtParser::QtParser() : - m_mocRegExp(QLatin1String(FILE_PATTERN"[:\\(](\\d+)\\)?:\\s(Warning|Error):\\s(.+)$")) + m_mocRegExp(QLatin1String(FILE_PATTERN"[:\\(](\\d+)\\)?:\\s([Ww]arning|[Ee]rror):\\s(.+)$")) { setObjectName(QLatin1String("QtParser")); m_mocRegExp.setMinimal(true); @@ -60,7 +60,7 @@ void QtParser::stdError(const QString &line) Utils::FileName::fromUserInput(m_mocRegExp.cap(1)) /* filename */, lineno, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)); - if (m_mocRegExp.cap(4) == QLatin1String("Warning")) + if (m_mocRegExp.cap(4).compare(QLatin1String("Warning"), Qt::CaseInsensitive) == 0) task.type = Task::Warning; emit addTask(task); return; @@ -116,6 +116,15 @@ void QtSupportPlugin::testQtOutputParser_data() "../../scriptbug/main.cpp:22: instantiated from here\n") << QList<ProjectExplorer::Task>() << QString(); + QTest::newRow("qdoc warning") + << QString::fromLatin1("/home/user/dev/qt5/qtscript/src/script/api/qscriptengine.cpp:295: warning: Can't create link to 'Object Trees & Ownership'") + << OutputParserTester::STDERR + << QString() << QString() + << (QList<ProjectExplorer::Task>() << Task(Task::Warning, + QLatin1String("Can't create link to 'Object Trees & Ownership'"), + Utils::FileName::fromUserInput(QLatin1String("/home/user/dev/qt5/qtscript/src/script/api/qscriptengine.cpp")), 295, + Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_COMPILE))) + << QString(); QTest::newRow("moc warning") << QString::fromLatin1("..\\untitled\\errorfile.h:0: Warning: No relevant classes found. No output generated.") << OutputParserTester::STDERR |