Merge pull request #292237 from NickCao/qt6-path
qt6.qtbase: search PATH for plugins after search QT_PLUGIN_PATH
This commit is contained in:
commit
219c7a812b
1 changed files with 11 additions and 12 deletions
|
@ -1,19 +1,19 @@
|
|||
From f0c4d3860b75cb064d066045907622d536044096 Mon Sep 17 00:00:00 2001
|
||||
From 6f0e6fe1e13ca5844a93d3b97111b7ece7e60f0f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
|
||||
Date: Sun, 10 May 2020 12:47:28 +0200
|
||||
Subject: [PATCH 11/11] qtbase: derive plugin load path from PATH
|
||||
|
||||
---
|
||||
src/corelib/kernel/qcoreapplication.cpp | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
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 a80efbb5622..8cf9e85da43 100644
|
||||
index a80efbb5622..0d41dabeed3 100644
|
||||
--- a/src/corelib/kernel/qcoreapplication.cpp
|
||||
+++ b/src/corelib/kernel/qcoreapplication.cpp
|
||||
@@ -2991,6 +2991,16 @@ QStringList QCoreApplication::libraryPathsLocked()
|
||||
QStringList *app_libpaths = new QStringList;
|
||||
coreappdata()->app_libpaths.reset(app_libpaths);
|
||||
@@ -3032,6 +3032,15 @@ QStringList QCoreApplication::libraryPathsLocked()
|
||||
app_libpaths->append(installPathPlugins);
|
||||
}
|
||||
|
||||
+ // Add library paths derived from PATH
|
||||
+ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(QStringLiteral(":"));
|
||||
|
@ -24,10 +24,9 @@ index a80efbb5622..8cf9e85da43 100644
|
|||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
auto setPathsFromEnv = [&](QString libPathEnv) {
|
||||
if (!libPathEnv.isEmpty()) {
|
||||
QStringList paths = libPathEnv.split(QDir::listSeparator(), Qt::SkipEmptyParts);
|
||||
// If QCoreApplication is not yet instantiated,
|
||||
// make sure we add the application path when we construct the QCoreApplication
|
||||
if (self) self->d_func()->appendApplicationPathToLibraryPaths();
|
||||
--
|
||||
2.42.0
|
||||
2.43.1
|
||||
|
||||
|
|
Loading…
Reference in a new issue