avante-nvim: 0.0.12 -> 0.0.13 (#365261)
[NixPkgs.git] / pkgs / development / libraries / qt-5 / 5.15 / qtbase.patch.d / 0009-qtbase-qtpluginpath.patch
blob28013ec10482977fb8912433f536657152cc276e
1 From 9fc6efaf774a8716932c98c0b0ea6408ed2614c2 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
3 Date: Sun, 10 May 2020 12:47:28 +0200
4 Subject: [PATCH 09/11] qtbase-qtpluginpath
6 ---
7 src/corelib/kernel/qcoreapplication.cpp | 10 ++++++++++
8 1 file changed, 10 insertions(+)
10 diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
11 index 5fdcc9b914..1a126ef359 100644
12 --- a/src/corelib/kernel/qcoreapplication.cpp
13 +++ b/src/corelib/kernel/qcoreapplication.cpp
14 @@ -2691,6 +2691,16 @@ QStringList QCoreApplication::libraryPathsLocked()
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));
24 + }
25 + }
28 auto setPathsFromEnv = [&](QString libPathEnv) {
29 if (!libPathEnv.isEmpty()) {
30 QStringList paths = libPathEnv.split(QDir::listSeparator(), Qt::SkipEmptyParts);
31 --
32 2.25.4