summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2018-03-27 09:30:49 +0200
committerTopi Reiniƶ <topi.reinio@qt.io>2018-03-27 10:13:06 +0000
commitfbcf5ecedd86a0bbe98a8174288db278db0a25cb (patch)
treeac1b21ccc807b160809abed2f9169958dc85126b
parent7e14432d7cdd42729094c7f1e6901ba3b3b350ca (diff)
downloadqttools-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>
-rw-r--r--src/qdoc/location.cpp7
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());