summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlibraryinfo.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-03-09 17:42:19 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-03-10 11:56:53 +0000
commit1fc6056ff5526e61419262931de79137bf7c1b4d (patch)
tree964a97ba972a881c07148b212a90a16bb8ec9fb8 /src/corelib/global/qlibraryinfo.cpp
parentd96c29a5d14d142e81e5a2fd1b838a85a0fca187 (diff)
Detect qt.conf in bundle on OSX without QCoreApplication
On OSX we don't need the applicationDirPath to find a qt.conf located in the application bundle. Let's take advantage of this and allow findConfiguration to use it. Task-number: QTBUG-24541 Change-Id: I38c349a3bcd140fcf91352c88c24ca662e6e6f2e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/global/qlibraryinfo.cpp')
-rw-r--r--src/corelib/global/qlibraryinfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 24afe719c1..484c7869a6 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -162,7 +162,7 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
if(!QFile::exists(qtconfig))
qtconfig = qmake_libraryInfoFile();
#else
- if (!QFile::exists(qtconfig) && QCoreApplication::instance()) {
+ if (!QFile::exists(qtconfig)) {
#ifdef Q_OS_MAC
CFBundleRef bundleRef = CFBundleGetMainBundle();
if (bundleRef) {
@@ -177,10 +177,12 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
}
if (qtconfig.isEmpty())
#endif
- {
+ {
+ if (QCoreApplication::instance()) {
QDir pwd(QCoreApplication::applicationDirPath());
qtconfig = pwd.filePath(QLatin1String("qt.conf"));
}
+ }
}
#endif
if (QFile::exists(qtconfig))