3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0009-qtbase-qtpluginpath.patch
Milan Pässler d4c607aa71 qt5: 5.12.7 -> 5.14.2
This includes contributions by @ttuegel and @DizFer. Thanks!
2020-07-31 18:50:58 +02:00

20 lines
982 B
Diff

--- qtbase-everywhere-src-5.14.2/src/corelib/kernel/qcoreapplication.cpp 2020-03-27 10:49:31.000000000 +0100
+++ qtbase-everywhere-src-5.14.2/src/corelib/kernel/qcoreapplication.cpp.patched 2020-05-09 15:03:03.968084088 +0200
@@ -2691,6 +2691,16 @@
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(), QString::SkipEmptyParts);