diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2013-04-25 16:48:15 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2013-05-02 16:00:48 +0200 |
commit | c76c8df101758698b6cab0cda3ee974755d58f87 (patch) | |
tree | da3a6c9e16f62d9858de99ab44585c5832bf9eec /src/plugins/projectexplorer/gccparser.cpp | |
parent | d47aed5201f12348927f3eff3edeab2641555de3 (diff) |
GccParser: Fix parsing of header files without extension
Change-Id: I4f0cc028814c0abf2ecae62aee6b38cc3e75f895
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/projectexplorer/gccparser.cpp')
-rw-r--r-- | src/plugins/projectexplorer/gccparser.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index d1238f6a34..c31f93e0e4 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -35,7 +35,7 @@ using namespace ProjectExplorer; // opt. drive letter + filename: (2 brackets) -static const char FILE_PATTERN[] = "(<command[ -]line>|([A-Za-z]:)?[^:]+\\.[^:]+):"; +static const char FILE_PATTERN[] = "(<command[ -]line>|([A-Za-z]:)?[^:]+):"; static const char COMMAND_PATTERN[] = "^(.*[\\\\/])?([a-z0-9]+-[a-z0-9]+-[a-z0-9]+-)?(gcc|g\\+\\+)(-[0-9\\.]+)?(\\.exe)?: "; GccParser::GccParser() @@ -784,6 +784,37 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() categoryCompile)) << QString(); + QTest::newRow("qtcreatorbug-9195") + << QString::fromLatin1("In file included from /usr/include/qt4/QtCore/QString:1:0,\n" + " from main.cpp:3:\n" + "/usr/include/qt4/QtCore/qstring.h: In function 'void foo()':\n" + "/usr/include/qt4/QtCore/qstring.h:597:5: error: 'QString::QString(const char*)' is private\n" + "main.cpp:7:22: error: within this context") + << OutputParserTester::STDERR + << QString() << QString() + << ( QList<ProjectExplorer::Task>() + << Task(Task::Unknown, + QLatin1String("In file included from /usr/include/qt4/QtCore/QString:1:0,"), + Utils::FileName::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/QString")), 1, + categoryCompile) + << Task(Task::Unknown, + QLatin1String("from main.cpp:3:"), + Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 3, + categoryCompile) + << Task(Task::Unknown, + QLatin1String("In function 'void foo()':"), + Utils::FileName::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/qstring.h")), -1, + categoryCompile) + << Task(Task::Error, + QLatin1String("'QString::QString(const char*)' is private"), + Utils::FileName::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/qstring.h")), 597, + categoryCompile) + << Task(Task::Error, + QLatin1String("within this context"), + Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 7, + categoryCompile)) + << QString(); + } void ProjectExplorerPlugin::testGccOutputParsers() |