2024-02-29 20:09:43 +00:00
|
|
|
From 6f0e6fe1e13ca5844a93d3b97111b7ece7e60f0f Mon Sep 17 00:00:00 2001
|
2024-01-02 11:29:13 +00:00
|
|
|
From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
|
|
|
|
Date: Sun, 10 May 2020 12:47:28 +0200
|
|
|
|
Subject: [PATCH 11/11] qtbase: derive plugin load path from PATH
|
|
|
|
|
|
|
|
---
|
2024-02-29 20:09:43 +00:00
|
|
|
src/corelib/kernel/qcoreapplication.cpp | 9 +++++++++
|
|
|
|
1 file changed, 9 insertions(+)
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
|
2024-02-29 20:09:43 +00:00
|
|
|
index a80efbb5622..0d41dabeed3 100644
|
2024-01-02 11:29:13 +00:00
|
|
|
--- a/src/corelib/kernel/qcoreapplication.cpp
|
|
|
|
+++ b/src/corelib/kernel/qcoreapplication.cpp
|
2024-02-29 20:09:43 +00:00
|
|
|
@@ -3032,6 +3032,15 @@ QStringList QCoreApplication::libraryPathsLocked()
|
|
|
|
app_libpaths->append(installPathPlugins);
|
|
|
|
}
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
+ // Add library paths derived from PATH
|
|
|
|
+ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(QStringLiteral(":"));
|
|
|
|
+ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX);
|
|
|
|
+ for (const QString &path: paths) {
|
|
|
|
+ if (!path.isEmpty()) {
|
|
|
|
+ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
2024-02-29 20:09:43 +00:00
|
|
|
// If QCoreApplication is not yet instantiated,
|
|
|
|
// make sure we add the application path when we construct the QCoreApplication
|
|
|
|
if (self) self->d_func()->appendApplicationPathToLibraryPaths();
|
2024-01-02 11:29:13 +00:00
|
|
|
--
|
2024-02-29 20:09:43 +00:00
|
|
|
2.43.1
|
2024-01-02 11:29:13 +00:00
|
|
|
|