Use std::make_unique rather than manually build unique_ptr for oCSettings

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2022-12-15 13:29:51 +01:00 committed by Claudio Cambra
parent f4bca991e1
commit 14bd744df6

View file

@ -177,7 +177,7 @@ bool AccountManager::restoreFromLegacySettings()
qCInfo(lcAccountManager) << "Migrate: checking old config " << configFile;
std::unique_ptr<QSettings> oCSettings(new QSettings(configFile, QSettings::IniFormat));
auto oCSettings = std::make_unique<QSettings>(configFile, QSettings::IniFormat);
if (oCSettings->status() != QSettings::Status::NoError) {
qCInfo(lcAccountManager) << "Error reading legacy configuration file" << oCSettings->status();
}