aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qtsupport/qtoutputformatter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qtsupport/qtoutputformatter.cpp')
-rw-r--r--src/plugins/qtsupport/qtoutputformatter.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/plugins/qtsupport/qtoutputformatter.cpp b/src/plugins/qtsupport/qtoutputformatter.cpp
index 8fba279776..c5a4d7a427 100644
--- a/src/plugins/qtsupport/qtoutputformatter.cpp
+++ b/src/plugins/qtsupport/qtoutputformatter.cpp
@@ -53,7 +53,7 @@ public:
: qmlError("(" QT_QML_URL_REGEXP // url
":\\d+" // colon, line
"(?::\\d+)?)" // colon, column (optional)
- "[: \t)]") // colon, space, tab or brace
+ "\\b") // word boundary
, qtError("Object::.*in (.*:\\d+)")
, qtAssert(QT_ASSERT_REGEXP)
, qtAssertX(QT_ASSERT_X_REGEXP)
@@ -364,6 +364,26 @@ void QtSupportPlugin::testQtOutputFormatter_data()
<< 0 << 19 << "file:///main.qml:20"
<< "/main.qml" << 20 << -1;
+ QTest::newRow("File link without further text")
+ << "file:///home/user/main.cpp:157"
+ << 0 << 30 << "file:///home/user/main.cpp:157"
+ << "/home/user/main.cpp" << 157 << -1;
+
+ QTest::newRow("File link with text before")
+ << "Text before: file:///home/user/main.cpp:157"
+ << 13 << 43 << "file:///home/user/main.cpp:157"
+ << "/home/user/main.cpp" << 157 << -1;
+
+ QTest::newRow("File link with text afterwards")
+ << "file:///home/user/main.cpp:157: Text afterwards"
+ << 0 << 30 << "file:///home/user/main.cpp:157"
+ << "/home/user/main.cpp" << 157 << -1;
+
+ QTest::newRow("File link with text before and afterwards")
+ << "Text before file:///home/user/main.cpp:157 and text afterwards"
+ << 12 << 42 << "file:///home/user/main.cpp:157"
+ << "/home/user/main.cpp" << 157 << -1;
+
QTest::newRow("Unix file link with timestamp")
<< "file:///home/user/main.cpp:157 2018-03-21 10:54:45.706"
<< 0 << 30 << "file:///home/user/main.cpp:157"