summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLevon Sargsyan <levon.sargsyan@qt.io>2019-12-09 18:28:20 +0100
committerlevon.sargsyan <levon.sargsyan@qt.io>2019-12-10 10:33:46 +0100
commit824eae53c83f3e7eb13c589571d493675d6d0594 (patch)
treedc37be3420a1df4ed56d0072a8c41b49d68c2be6
parent0a89b6fd703e1b167222575a86301b15530a4704 (diff)
downloadqttools-824eae53c83f3e7eb13c589571d493675d6d0594.tar.gz
Fix wrong filename issue under windwows in webxml/index generation
The filename attribute section in the generated index/webxml has been taking redudant directory name under Windows platform. This patch fixes the issue by removing filename deduction code and replaces it with fileName() from QFileInfo class accordingly. Change-Id: If0ef2e88c94e837099fd5e669d2b7e96e7cd4280 Fixes: QTBUG-80641 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/qdoc/location.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qdoc/location.cpp b/src/qdoc/location.cpp
index f10f53b65..2c088a5b5 100644
--- a/src/qdoc/location.cpp
+++ b/src/qdoc/location.cpp
@@ -215,8 +215,8 @@ void Location::pop()
*/
QString Location::fileName() const
{
- QString fp = filePath();
- return (fp.isEmpty() ? fp : fp.mid(fp.lastIndexOf('/') + 1));
+ QFileInfo fi(filePath());
+ return fi.fileName();
}