1 From a3aaebda6d4b302cd202c21e306c55d3715e9b0d Mon Sep 17 00:00:00 2001
2 From: Thomas Tuegel <ttuegel@mailbox.org>
3 Date: Tue, 17 Sep 2019 05:36:41 -0500
4 Subject: [PATCH 10/12] qtbase-qtpluginpath
7 src/corelib/kernel/qcoreapplication.cpp | 9 +++++++++
8 1 file changed, 9 insertions(+)
10 diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
11 index db6546028a..cc97c46004 100644
12 --- a/src/corelib/kernel/qcoreapplication.cpp
13 +++ b/src/corelib/kernel/qcoreapplication.cpp
14 @@ -2694,6 +2694,15 @@ QStringList QCoreApplication::libraryPaths()
15 QStringList *app_libpaths = new QStringList;
16 coreappdata()->app_libpaths.reset(app_libpaths);
18 + // Add library paths derived from PATH
19 + const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
20 + const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX);
21 + for (const QString &path: paths) {
22 + if (!path.isEmpty()) {
23 + app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir));
27 QString libPathEnv = qEnvironmentVariable("QT_PLUGIN_PATH");
28 if (!libPathEnv.isEmpty()) {
29 QStringList paths = libPathEnv.split(QDir::listSeparator(), QString::SkipEmptyParts);