1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 21:25:07 +00:00
serenity/Ports/qt6-qtbase/patches/0004-Hack-Force-searching-for-plugins-in-usr-local.patch
Martin Bříza ac762c5520 Ports/qt6: Add a very basic Qt6 Base package
It's necessary to have a working serenity platform plugin for it to work
with GUI applications
2022-01-07 18:38:32 +01:00

32 lines
1.2 KiB
Diff

From c1809bf9fcbf7f4767f750057d08b723d1ad034b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20B=C5=99=C3=ADza?= <m@rtinbriza.cz>
Date: Wed, 15 Dec 2021 21:09:35 +0100
Subject: [PATCH 5/5] Hack: Force searching for plugins in /usr/local
I really don't know how else to do this but I'm sure there is a proper
way to handle this. But this works and doesn't break the system so
whatever for now.
---
src/corelib/kernel/qcoreapplication.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 3bce669b..ca9ca8b9 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -2751,6 +2751,12 @@ QStringList QCoreApplication::libraryPathsLocked()
}
#endif // Q_OS_DARWIN
+#ifdef Q_OS_SERENITY
+ coreappdata()->app_libpaths->append("/usr/local");
+ coreappdata()->app_libpaths->append("/usr/local/lib");
+ coreappdata()->app_libpaths->append("/usr/local/plugins");
+#endif // Q_OS_SERENITY
+
QString installPathPlugins = QLibraryInfo::path(QLibraryInfo::PluginsPath);
if (QFile::exists(installPathPlugins)) {
// Make sure we convert from backslashes to slashes.
--
2.33.1