aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2019-01-05 17:29:15 +0100
committerAndré Hartmann <aha_1980@gmx.de>2019-01-07 15:48:01 +0000
commit2088121a5f7878e8b86d8044792c2da969747974 (patch)
treed74d562ee5c63a39fff37ef370c0d0fafed9ff9d
parent5ad979e5ee0c2885e4b2c5f4094c3e7f212e0315 (diff)
QtOutputFormatter: Fix handling file:// links with following timestamps
Especially on Windows, where drive letters are involved too. Fixes: QTCREATORBUG-20110 Change-Id: I172c8a39d59ce4c8ffadf210eb4c592ef2609f11 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
-rw-r--r--src/plugins/qtsupport/qtoutputformatter.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/qtsupport/qtoutputformatter.cpp b/src/plugins/qtsupport/qtoutputformatter.cpp
index 58e1104c46..cb5913ad98 100644
--- a/src/plugins/qtsupport/qtoutputformatter.cpp
+++ b/src/plugins/qtsupport/qtoutputformatter.cpp
@@ -65,6 +65,7 @@ public:
, qtTestFailWin(QLatin1String("^(.*\\(\\d+\\)) : failure location\\s*$"))
, project(proj)
{
+ qmlError.setMinimal(true);
}
~QtOutputFormatterPrivate()
@@ -369,6 +370,19 @@ void QtSupportPlugin::testQtOutputFormatter_data()
<< 0 << 19 << QString::fromLatin1("file:///main.qml:20")
<< QString::fromLatin1("/main.qml") << 20 << -1;
+ QTest::newRow("Unix file link with timestamp")
+ << QString::fromLatin1("file:///home/user/main.cpp:157 2018-03-21 10:54:45.706")
+ << 0 << 30 << QString::fromLatin1("file:///home/user/main.cpp:157")
+ << QString::fromLatin1("/home/user/main.cpp") << 157 << -1;
+
+ QTest::newRow("Windows file link with timestamp")
+ << QString::fromLatin1("file:///e:/path/main.cpp:157 2018-03-21 10:54:45.706")
+ << 0 << 28 << QString::fromLatin1("file:///e:/path/main.cpp:157")
+ << (Utils::HostOsInfo::isWindowsHost()
+ ? QString::fromLatin1("e:/path/main.cpp")
+ : QString::fromLatin1("/e:/path/main.cpp"))
+ << 157 << -1;
+
QTest::newRow("Unix failed QTest link")
<< QString::fromLatin1(" Loc: [../TestProject/test.cpp(123)]")
<< 9 << 37 << QString::fromLatin1("../TestProject/test.cpp(123)")