From 824eae53c83f3e7eb13c589571d493675d6d0594 Mon Sep 17 00:00:00 2001 From: Levon Sargsyan Date: Mon, 9 Dec 2019 18:28:20 +0100 Subject: Fix wrong filename issue under windwows in webxml/index generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Topi Reiniƶ --- src/qdoc/location.cpp | 4 ++-- 1 file 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(); } -- cgit v1.2.1