kwindowsystem: update platform plugins path patch
This commit is contained in:
parent
473fb9246a
commit
262f666092
@ -0,0 +1,50 @@
|
|||||||
|
From 291f691400d4e85c57b57ec75482d2c6078ce26e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Tuegel <ttuegel@mailbox.org>
|
||||||
|
Date: Wed, 9 Dec 2020 10:01:59 -0600
|
||||||
|
Subject: [PATCH] platform plugins path
|
||||||
|
|
||||||
|
---
|
||||||
|
src/pluginwrapper.cpp | 27 +++++++++++++--------------
|
||||||
|
1 file changed, 13 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/pluginwrapper.cpp b/src/pluginwrapper.cpp
|
||||||
|
index a255d83..9699b08 100644
|
||||||
|
--- a/src/pluginwrapper.cpp
|
||||||
|
+++ b/src/pluginwrapper.cpp
|
||||||
|
@@ -25,20 +25,19 @@ static QStringList pluginCandidates()
|
||||||
|
{
|
||||||
|
QStringList ret;
|
||||||
|
const auto paths = QCoreApplication::libraryPaths();
|
||||||
|
- for (const QString &path : paths) {
|
||||||
|
- static const QStringList searchFolders {
|
||||||
|
- QStringLiteral("/kf5/org.kde.kwindowsystem.platforms"),
|
||||||
|
- QStringLiteral("/kf5/kwindowsystem"),
|
||||||
|
- };
|
||||||
|
- for (const QString &searchFolder : searchFolders) {
|
||||||
|
- QDir pluginDir(path + searchFolder);
|
||||||
|
- if (!pluginDir.exists()) {
|
||||||
|
- continue;
|
||||||
|
- }
|
||||||
|
- const auto entries = pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot);
|
||||||
|
- for (const QString &entry : entries) {
|
||||||
|
- ret << pluginDir.absoluteFilePath(entry);
|
||||||
|
- }
|
||||||
|
+ const QString path = QStringLiteral(NIXPKGS_QT_PLUGIN_PATH);
|
||||||
|
+ static const QStringList searchFolders {
|
||||||
|
+ QStringLiteral("/kf5/org.kde.kwindowsystem.platforms"),
|
||||||
|
+ QStringLiteral("/kf5/kwindowsystem"),
|
||||||
|
+ };
|
||||||
|
+ for (const QString &searchFolder : searchFolders) {
|
||||||
|
+ QDir pluginDir(path + searchFolder);
|
||||||
|
+ if (!pluginDir.exists()) {
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ const auto entries = pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot);
|
||||||
|
+ for (const QString &entry : entries) {
|
||||||
|
+ ret << pluginDir.absoluteFilePath(entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
@ -15,7 +15,7 @@ mkDerivation {
|
|||||||
buildInputs = [ libpthreadstubs libXdmcp qttools qtx11extras ];
|
buildInputs = [ libpthreadstubs libXdmcp qttools qtx11extras ];
|
||||||
propagatedBuildInputs = [ qtbase ];
|
propagatedBuildInputs = [ qtbase ];
|
||||||
patches = [
|
patches = [
|
||||||
./platform-plugins-path.patch
|
./0001-platform-plugins-path.patch
|
||||||
];
|
];
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PATH=\"''${!outputBin}/$qtPluginPrefix\""
|
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PATH=\"''${!outputBin}/$qtPluginPrefix\""
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
From 5d73d02656298d0af860c8ed7f6be679e3d69e09 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tom Hall <tahall256@protonmail.ch>
|
|
||||||
Date: Tue, 24 Nov 2020 19:31:20 +0000
|
|
||||||
Subject: [PATCH] Fix platform plugins path
|
|
||||||
|
|
||||||
---
|
|
||||||
src/pluginwrapper.cpp | 22 ++++++----------------
|
|
||||||
1 file changed, 6 insertions(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/pluginwrapper.cpp b/src/pluginwrapper.cpp
|
|
||||||
index a255d83..8f4caac 100644
|
|
||||||
--- a/src/pluginwrapper.cpp
|
|
||||||
+++ b/src/pluginwrapper.cpp
|
|
||||||
@@ -24,22 +24,12 @@ Q_GLOBAL_STATIC(KWindowSystemPluginWrapper, s_pluginWrapper)
|
|
||||||
static QStringList pluginCandidates()
|
|
||||||
{
|
|
||||||
QStringList ret;
|
|
||||||
- const auto paths = QCoreApplication::libraryPaths();
|
|
||||||
- for (const QString &path : paths) {
|
|
||||||
- static const QStringList searchFolders {
|
|
||||||
- QStringLiteral("/kf5/org.kde.kwindowsystem.platforms"),
|
|
||||||
- QStringLiteral("/kf5/kwindowsystem"),
|
|
||||||
- };
|
|
||||||
- for (const QString &searchFolder : searchFolders) {
|
|
||||||
- QDir pluginDir(path + searchFolder);
|
|
||||||
- if (!pluginDir.exists()) {
|
|
||||||
- continue;
|
|
||||||
- }
|
|
||||||
- const auto entries = pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot);
|
|
||||||
- for (const QString &entry : entries) {
|
|
||||||
- ret << pluginDir.absoluteFilePath(entry);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ QDir pluginDir(QLatin1String(NIXPKGS_QT_PLUGIN_PATH)
|
|
||||||
+ + QLatin1Literal("/kf5/org.kde.kwindowsystem.platforms")
|
|
||||||
+ + QLatin1Literal("/kf5/kwindowsystem"));
|
|
||||||
+ const auto entries = pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot);
|
|
||||||
+ for (const QString &entry : entries) {
|
|
||||||
+ ret << pluginDir.absoluteFilePath(entry);
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user