forked from mirrors/nixpkgs
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
|
From 40616bf4afacadca360083d7d365914f8f8573e5 Mon Sep 17 00:00:00 2001
|
||
|
From: Thomas Tuegel <ttuegel@mailbox.org>
|
||
|
Date: Tue, 17 Sep 2019 05:36:41 -0500
|
||
|
Subject: [PATCH 09/10] qtbase-qtpluginpath
|
||
|
|
||
|
---
|
||
|
src/corelib/kernel/qcoreapplication.cpp | 9 +++++++++
|
||
|
1 file changed, 9 insertions(+)
|
||
|
|
||
|
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
|
||
|
index 8652c456..74562272 100644
|
||
|
--- a/src/corelib/kernel/qcoreapplication.cpp
|
||
|
+++ b/src/corelib/kernel/qcoreapplication.cpp
|
||
|
@@ -2690,6 +2690,15 @@ QStringList QCoreApplication::libraryPaths()
|
||
|
QStringList *app_libpaths = new QStringList;
|
||
|
coreappdata()->app_libpaths.reset(app_libpaths);
|
||
|
|
||
|
+ // Add library paths derived from PATH
|
||
|
+ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
|
||
|
+ 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));
|
||
|
+ }
|
||
|
+ }
|
||
|
+
|
||
|
QString libPathEnv = qEnvironmentVariable("QT_PLUGIN_PATH");
|
||
|
if (!libPathEnv.isEmpty()) {
|
||
|
QStringList paths = libPathEnv.split(QDir::listSeparator(), QString::SkipEmptyParts);
|
||
|
--
|
||
|
2.22.1
|
||
|
|