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>bb10
parent
d96c29a5d1
commit
1fc6056ff5
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue