aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2018-05-10 11:15:13 +0200
committerAndré Hartmann <aha_1980@gmx.de>2018-05-14 09:57:42 +0000
commit607a3dd678841d9fcb45849d4945724ca13955ca (patch)
tree00e26382471bf872abd6cb2f906496a45709afbe /src
parentae26a16a85d0438369259742b781af15bffa45f4 (diff)
QtOutputFormatter: Handle QML output with braces
For example the function f: function f() { console.assert(false, "console.assert() did not pass"); } gives the following output: console.assert() did not pass f (qrc:/main.qml:19) onClicked (qrc:/main.qml:14) which was not handled correctly previously because of the closing brace. Task-number: QTCREATORBUG-20406 Change-Id: I0d63393027cfdb72629007bd9b273b5bb83d392f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/qtsupport/qtoutputformatter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/qtsupport/qtoutputformatter.cpp b/src/plugins/qtsupport/qtoutputformatter.cpp
index 08a817dadc..67984fce30 100644
--- a/src/plugins/qtsupport/qtoutputformatter.cpp
+++ b/src/plugins/qtsupport/qtoutputformatter.cpp
@@ -57,7 +57,7 @@ public:
: qmlError(QLatin1String("(" QML_URL_REGEXP // url
":\\d+" // colon, line
"(?::\\d+)?)" // colon, column (optional)
- "[: \t]")) // colon, space or tab
+ "[: \t)]")) // colon, space, tab or brace
, qtError(QLatin1String("Object::.*in (.*:\\d+)"))
, qtAssert(QLatin1String("ASSERT: .* in file (.+, line \\d+)"))
, qtAssertX(QLatin1String("ASSERT failure in .*: \".*\", file (.+, line \\d+)"))
@@ -353,6 +353,11 @@ void QtSupportPlugin::testQtOutputFormatter_data()
<< 0 << 18 << QString::fromLatin1("qrc:///main.qml:20")
<< QString::fromLatin1("/main.qml") << 20 << -1;
+ QTest::newRow("onClicked (qrc:/main.qml:20)")
+ << QString::fromLatin1("onClicked (qrc:/main.qml:20)")
+ << 11 << 27 << QString::fromLatin1("qrc:/main.qml:20")
+ << QString::fromLatin1("/main.qml") << 20 << -1;
+
QTest::newRow("file:///main.qml:20")
<< QString::fromLatin1("file:///main.qml:20 Unexpected token `identifier'")
<< 0 << 19 << QString::fromLatin1("file:///main.qml:20")