1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00
nixpkgs/pkgs/desktops/plasma-5/libkscreen/libkscreen-backends-path.patch
Yaroslav Bolyukin b236ccbfad
libkscreen: upgrade patch
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
2021-02-26 05:50:00 +03:00

25 lines
1.2 KiB
Diff

Index: libkscreen-5.9.4/src/backendmanager.cpp
===================================================================
--- libkscreen-5.9.4.orig/src/backendmanager.cpp
+++ libkscreen-5.9.4/src/backendmanager.cpp
@@ -172,14 +172,11 @@ QFileInfo BackendManager::preferredBackend(const QString &backend)
QFileInfoList BackendManager::listBackends()
{
// Compile a list of installed backends first
- const QString backendFilter = QStringLiteral("KSC_*");
- const QStringList paths = QCoreApplication::libraryPaths();
- QFileInfoList finfos;
- for (const QString &path : paths) {
- const QDir dir(path + QLatin1String("/kf5/kscreen/"), backendFilter, QDir::SortFlags(QDir::QDir::Name), QDir::NoDotAndDotDot | QDir::Files);
- finfos.append(dir.entryInfoList());
- }
- return finfos;
+ const QDir dir(QLatin1String(NIXPKGS_LIBKSCREEN_BACKENDS),
+ QStringLiteral("KSC_*"),
+ QDir::SortFlags(QDir::QDir::Name),
+ QDir::NoDotAndDotDot | QDir::Files);
+ return dir.entryInfoList();
}
KScreen::AbstractBackend *BackendManager::loadBackendPlugin(QPluginLoader *loader, const QString &name, const QVariantMap &arguments)