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 8e352af0ec

Change-Id: Iae3417d5a5e57bcef7ce4cdb368567ccd8fdc4c4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2021-05-26 10:12:58 +02:00
parent a84ca65995
commit 6161a9e43b

View File

@@ -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()