diff options
author | Topi Reinio <topi.reinio@qt.io> | 2018-03-27 09:30:49 +0200 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2018-03-27 10:13:06 +0000 |
commit | fbcf5ecedd86a0bbe98a8174288db278db0a25cb (patch) | |
tree | ac1b21ccc807b160809abed2f9169958dc85126b /src | |
parent | 7e14432d7cdd42729094c7f1e6901ba3b3b350ca (diff) | |
download | qttools-fbcf5ecedd86a0bbe98a8174288db278db0a25cb.tar.gz |
qdoc: Print absolute path for errors and warnings
QDir::isAbsolutePath() returns true for paths that begin with root dir
or drive letter (on Windows). Since Clang integration, we now see
warnings with paths such as
/path/to/qt5/qtbase/include/QtQuick/../../../qtdeclarative/src/ [...]
Remove the check for isAbsolutePath() and always construct an absolute
path.
Change-Id: Iea1e6f83f452abf0644968e0a5ee725829a8716e
Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qdoc/location.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/qdoc/location.cpp b/src/qdoc/location.cpp index 51fb45b54..cb12e6ea4 100644 --- a/src/qdoc/location.cpp +++ b/src/qdoc/location.cpp @@ -463,11 +463,8 @@ QString Location::toString() const QString Location::top() const { - QString str = filePath(); - if (!QDir::isAbsolutePath(str)) { - QDir path(str); - str = path.absolutePath(); - } + QDir path(filePath()); + QString str = path.absolutePath(); if (lineNo() >= 1) { str += QLatin1Char(':'); str += QString::number(lineNo()); |