linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / qt-5 / 5.14 / qtbase.patch.d / 0009-qtbase-qtpluginpath.patch
blob009fe14838e7ccc491442fc5a4bf50f79c1cd5b9
1 --- qtbase-everywhere-src-5.14.2/src/corelib/kernel/qcoreapplication.cpp 2020-03-27 10:49:31.000000000 +0100
2 +++ qtbase-everywhere-src-5.14.2/src/corelib/kernel/qcoreapplication.cpp.patched 2020-05-09 15:03:03.968084088 +0200
3 @@ -2691,6 +2691,16 @@
4 QStringList *app_libpaths = new QStringList;
5 coreappdata()->app_libpaths.reset(app_libpaths);
7 + // Add library paths derived from PATH
8 + const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
9 + const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX);
10 + for (const QString &path: paths) {
11 + if (!path.isEmpty()) {
12 + app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir));
13 + }
14 + }
17 auto setPathsFromEnv = [&](QString libPathEnv) {
18 if (!libPathEnv.isEmpty()) {
19 QStringList paths = libPathEnv.split(QDir::listSeparator(), QString::SkipEmptyParts);