nixpkgs/pkgs/development/libraries/kde-frameworks/kwindowsystem/platform-plugins-path.patch
2019-09-18 13:26:14 -05:00

24 lines
1005 B
Diff

diff --git a/src/pluginwrapper.cpp b/src/pluginwrapper.cpp
index 8e6298a..210989a 100644
--- a/src/pluginwrapper.cpp
+++ b/src/pluginwrapper.cpp
@@ -37,14 +37,10 @@ Q_GLOBAL_STATIC(KWindowSystemPluginWrapper, s_pluginWrapper)
static QStringList pluginCandidates()
{
QStringList ret;
- foreach (const QString &path, QCoreApplication::libraryPaths()) {
- QDir pluginDir(path + QLatin1String("/kf5/org.kde.kwindowsystem.platforms"));
- if (!pluginDir.exists()) {
- continue;
- }
- foreach (const QString &entry, pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot)) {
- ret << pluginDir.absoluteFilePath(entry);
- }
+ QDir pluginDir(QLatin1String(NIXPKGS_QT_PLUGIN_PATH) + QLatin1Literal("/kf5/org.kde.kwindowsystem.platforms"));
+ const auto entries = pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot);
+ for (const QString &entry : entries) {
+ ret << pluginDir.absoluteFilePath(entry);
}
return ret;
}