From a3aaebda6d4b302cd202c21e306c55d3715e9b0d Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 17 Sep 2019 05:36:41 -0500 Subject: [PATCH 10/12] 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 db6546028a..cc97c46004 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2694,6 +2694,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.23.GIT