File 0001-If-present-load-qt5.conf-otherwise-load-qt.conf.patch of Package mingw64-libqt5-qtbase
From 5386a61a8f1610f267ac6688f270029c97f61178 Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Mon, 10 Jul 2017 18:28:29 +0200
Subject: [PATCH] If present load qt5.conf otherwise load qt.conf
To avoid a name clash between Qt4 and Qt5 loading the
same qt.conf with different settings this patch lets
Qt5 search for a configuration file named qt5.conf
first and only uses the default configuration file
if the Qt5 specific configuration file is not present.
Change-Id: Ie5c4a09c4f307f1b28cd7daded80314f6f1cdb37
---
src/corelib/global/qlibraryinfo.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 8bcacca13f..b07efbd9a5 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -182,6 +182,9 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
#endif
if (QCoreApplication::instance()) {
QDir pwd(QCoreApplication::applicationDirPath());
+ qtconfig = pwd.filePath(QLatin1String("qt5.conf"));
+ if (QFile::exists(qtconfig))
+ return new QSettings(qtconfig, QSettings::IniFormat);
qtconfig = pwd.filePath(QLatin1String("qt.conf"));
if (QFile::exists(qtconfig))
return new QSettings(qtconfig, QSettings::IniFormat);
--
2.12.3