Fix memory leak of QSettings in QLibraryInfo::platformPluginArguments
The code calls QLibraryInfoPrivate::findConfiguration() to get a new QSettings object but was not deleting it. Change-Id: I207a7ff55f87aff91e2898a99e9cac06d57c5f7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
e98b5cddeb
commit
dbd400b937
@ -567,7 +567,8 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
|
||||
QStringList QLibraryInfo::platformPluginArguments(const QString &platformName)
|
||||
{
|
||||
#if !defined(QT_BOOTSTRAPPED) && !defined(QT_NO_SETTINGS)
|
||||
if (const QSettings *settings = QLibraryInfoPrivate::findConfiguration()) {
|
||||
QScopedPointer<const QSettings> settings(QLibraryInfoPrivate::findConfiguration());
|
||||
if (!settings.isNull()) {
|
||||
QString key = QLatin1String(platformsSection);
|
||||
key += QLatin1Char('/');
|
||||
key += platformName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user