From 6161a9e43b36e8b54cee8d4379b8b72a41e34f99 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 26 May 2021 10:12:58 +0200 Subject: [PATCH] ICore: Don't "clean" the relative path given to (user)resourcePath It leads to unexpected results especially because any slash at the end is removed, and also behaves differently to the other path methods in ICore. Amends 8e352af0ecd3c330a96f7ca67067f0dfe200a0e4 Change-Id: Iae3417d5a5e57bcef7ce4cdb368567ccd8fdc4c4 Reviewed-by: Qt CI Bot Reviewed-by: hjk --- src/plugins/coreplugin/icore.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index f7b2bb9f767..52695e3cf65 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -407,8 +407,8 @@ static QString pathHelper(const QString &rel) FilePath ICore::resourcePath(const QString &rel) { return FilePath::fromString( - QDir::cleanPath(QCoreApplication::applicationDirPath() + '/' + RELATIVE_DATA_PATH + - pathHelper(rel))); + QDir::cleanPath(QCoreApplication::applicationDirPath() + '/' + RELATIVE_DATA_PATH)) + / rel; } /*! @@ -490,9 +490,9 @@ QString ICore::userPluginPath() */ FilePath ICore::libexecPath(const QString &rel) { - return FilePath::fromString( - QDir::cleanPath(QApplication::applicationDirPath() - + pathHelper(RELATIVE_LIBEXEC_PATH) + pathHelper(rel))); + return FilePath::fromString(QDir::cleanPath(QApplication::applicationDirPath() + + pathHelper(RELATIVE_LIBEXEC_PATH))) + / rel; } FilePath ICore::crashReportsPath()