https://bugs.kde.org/show_bug.cgi?id=363634
Bug ID: 363634
Summary: KF5 fails to load Windows executables located in the
application bin directory
Product: frameworks-kinit
Version: unspecified
Platform: MS Windows
OS: MS Windows
Status: UNCONFIRMED
Severity: major
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
When using emerge under Windows, it bundles all the executables & DLLs of the
application and its dependencies in the bin directory of the application. When
using emerge --package application, the same image is bundled using the NSIS
installer.
In several places (for example in kdeinitinterface.cpp, part of KDBusAddons),
we have this:
QString srv = QStandardPaths::findExecutable(QStringLiteral("kdeinit5"));
However, under Windows, Qt only searches the executable in the system $PATH,
and not the path from which the application is running. Even though
kdeinit5.exe is located in the same bin directory as the running application,
the above return an empty string because the current application bin directory
is not part of the system path.
A solution to this issue is simply to search first in the current path, so the
code becomes:
QString srv;
#ifdef Q_OS_WIN
srv = QStandardPaths::findExecutable(QStringLiteral("kdeinit5"), QStringList()
<< QCoreApplication::applicationDirPath());
#endif
if (srv.isEmpty())
srv = QStandardPaths::findExecutable(QStringLiteral("kdeinit5"));
But this code only solves the problem for this instance, there are other places
in the KDE frameworks that need to address this issue of finding and locating
executable files under Windows.
Reproducible: Always
Steps to Reproduce:
1. See details
2.
3.
Actual Results:
See Details
Expected Results:
See Details
--
You are receiving this mail because:
You are watching all bug changes.