Fix regression with QSettings patch
The plugin loader is used without QCoreApplication. This fixes 31ef8fa6abc2ea23c6f0a996b36494d88aafb0b5 (cherry picked from commit 988871dabf3c949ffc71d126131281a3ae641ebf)bb10
parent
c0da3003df
commit
42452a32bf
|
|
@ -270,7 +270,16 @@ bool QCoreApplicationPrivate::is_app_closing = false;
|
|||
Q_CORE_EXPORT bool qt_locale_initialized = false;
|
||||
|
||||
|
||||
QSettings *QCoreApplicationPrivate::trolltechConf = 0;
|
||||
/*
|
||||
Create an instance of Trolltech.conf. This ensures that the settings will not
|
||||
be thrown out of QSetting's cache for unused settings.
|
||||
*/
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QSettings, trolltechConf, (QSettings::UserScope, QLatin1String("Trolltech")))
|
||||
|
||||
QSettings *QCoreApplicationPrivate::trolltechConf()
|
||||
{
|
||||
return ::trolltechConf();
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT uint qGlobalPostedEventsCount()
|
||||
{
|
||||
|
|
@ -373,9 +382,6 @@ QCoreApplicationPrivate::~QCoreApplicationPrivate()
|
|||
threadData->postEventList.recursion = 0;
|
||||
threadData->quitNow = false;
|
||||
}
|
||||
|
||||
delete trolltechConf;
|
||||
trolltechConf = 0;
|
||||
}
|
||||
|
||||
void QCoreApplicationPrivate::createEventDispatcher()
|
||||
|
|
@ -697,13 +703,6 @@ void QCoreApplication::init()
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
Create an instance of Trolltech.conf. This ensures that the settings will not
|
||||
be thrown out of QSetting's cache for unused settings.
|
||||
*/
|
||||
d->trolltechConf = new QSettings(QSettings::UserScope, QLatin1String("Trolltech"));
|
||||
|
||||
qt_startup_hook();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public:
|
|||
#if defined(QT3_SUPPORT)
|
||||
static bool useQt3Support;
|
||||
#endif
|
||||
static QSettings *trolltechConf;
|
||||
static QSettings *trolltechConf();
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -706,7 +706,7 @@ bool QLibraryPrivate::isPlugin(QSettings *settings)
|
|||
QStringList reg;
|
||||
#ifndef QT_NO_SETTINGS
|
||||
if (!settings) {
|
||||
settings = QCoreApplicationPrivate::trolltechConf;
|
||||
settings = QCoreApplicationPrivate::trolltechConf();
|
||||
}
|
||||
reg = settings->value(regkey).toStringList();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue