mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 08:04:14 +00:00
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From 9fc6efaf774a8716932c98c0b0ea6408ed2614c2 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
|
|
Date: Sun, 10 May 2020 12:47:28 +0200
|
|
Subject: [PATCH 09/11] qtbase-qtpluginpath
|
|
|
|
---
|
|
src/corelib/kernel/qcoreapplication.cpp | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
|
|
index 5fdcc9b914..1a126ef359 100644
|
|
--- a/src/corelib/kernel/qcoreapplication.cpp
|
|
+++ b/src/corelib/kernel/qcoreapplication.cpp
|
|
@@ -2691,6 +2691,16 @@ QStringList QCoreApplication::libraryPathsLocked()
|
|
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));
|
|
+ }
|
|
+ }
|
|
+
|
|
+
|
|
auto setPathsFromEnv = [&](QString libPathEnv) {
|
|
if (!libPathEnv.isEmpty()) {
|
|
QStringList paths = libPathEnv.split(QDir::listSeparator(), Qt::SkipEmptyParts);
|
|
--
|
|
2.25.4
|
|
|