qt55.qtbase: disable plugin path debugging

This commit is contained in:
Thomas Tuegel 2016-04-15 07:06:16 -05:00
parent 35f9c58206
commit 51fe07711f
3 changed files with 6 additions and 13 deletions

View File

@ -2,24 +2,18 @@ Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplica
=================================================================== ===================================================================
--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/corelib/kernel/qcoreapplication.cpp --- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/corelib/kernel/qcoreapplication.cpp
+++ qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp +++ qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp
@@ -2498,6 +2498,22 @@ QStringList QCoreApplication::libraryPat @@ -2498,6 +2498,16 @@ QStringList QCoreApplication::libraryPat
} }
} }
} }
+ qunsetenv("QT_PLUGIN_PATH"); // do not propagate to child processes + qunsetenv("QT_PLUGIN_PATH"); // do not propagate to child processes
+ +
+ // Add library paths derived from NIX_PROFILES. + // Add library paths derived from NIX_PROFILES.
+ const QByteArray nixProfilesEnv = qgetenv("NIX_PROFILES"); + const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
+ if (!nixProfilesEnv.isEmpty()) { + const QString plugindir = QString::fromLatin1("/lib/qt5/plugins");
+ QLatin1Char pathSep(' '); + Q_FOREACH (const QByteArray &profile, profiles) {
+ QStringList paths = QFile::decodeName(nixProfilesEnv).split(pathSep, QString::SkipEmptyParts); + if (!profile.isEmpty()) {
+ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) { + app_libpaths->append(QFile::decodeName(profile) + plugindir);
+ it->append("/lib/qt5/plugins");
+ QString canonicalPath = QDir(*it).canonicalPath();
+ if (!canonicalPath.isEmpty()
+ && !app_libpaths->contains(canonicalPath)) {
+ app_libpaths->append(canonicalPath);
+ }
+ } + }
+ } + }
} }

View File

@ -7,4 +7,3 @@ xdg-config-dirs.patch
nix-profiles-library-paths.patch nix-profiles-library-paths.patch
compose-search-path.patch compose-search-path.patch
libressl.patch libressl.patch
debug-nix-profiles-paths.patch