Skip to content
Permalink
Browse files

Fix memory leak

  • Loading branch information
nyalldawson committed Aug 31, 2017
1 parent 75c65c5 commit e84543d0fc1f002332a4d7f5911241221fdc7bd3
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/core/qgsuserprofilemanager.cpp
  2. +2 −2 src/core/qgsuserprofilemanager.h
@@ -71,7 +71,7 @@ void QgsUserProfileManager::setRootLocation( QString rootProfileLocation )
{
mWatcher->addPath( mRootProfilePath );
}
mSettings = new QSettings( settingsFile(), QSettings::IniFormat );
mSettings.reset( new QSettings( settingsFile(), QSettings::IniFormat ) );
}

bool QgsUserProfileManager::rootLocationIsSet() const
@@ -172,7 +172,7 @@ QgsError QgsUserProfileManager::deleteProfile( const QString name )
return error;
}

QString QgsUserProfileManager::settingsFile()
QString QgsUserProfileManager::settingsFile() const
{
return mRootProfilePath + QDir::separator() + "profiles.ini";
}
@@ -179,9 +179,9 @@ class CORE_EXPORT QgsUserProfileManager : public QObject

std::unique_ptr<QgsUserProfile> mUserProfile;

QString settingsFile();
QString settingsFile() const;

QSettings *mSettings = nullptr;
std::unique_ptr< QSettings > mSettings;
};

#endif // QGSUSERPROFILEMANAGER_H

0 comments on commit e84543d

Please sign in to comment.
You can’t perform that action at this time.