Skip to content

Commit

Permalink
Improve log output when migrating settings.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila Ayres <hello@camilasan.com>
  • Loading branch information
camilasan committed Jan 29, 2025
1 parent 0e19db7 commit dfac25f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/accountmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void AccountManager::backwardMigrationSettingsKeys(QStringList *deleteKeys, QStr
}
} else {
deleteKeys->append(settings->group());
}
}
}

bool AccountManager::restoreFromLegacySettings()
Expand Down
3 changes: 3 additions & 0 deletions src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,16 @@ bool Application::configVersionMigration()
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
return false;
}
}

if (!deleteKeys.isEmpty()) {
auto settings = ConfigFile::settingsWithGroup("foo");
settings->endGroup();

// Wipe confusing keys from the future, ignore the others
for (const auto &badKey : std::as_const(deleteKeys)) {
settings->remove(badKey);
qCInfo(lcApplication) << "Migration: removed" << badKey << "key from settings.";
}
}

Expand Down

0 comments on commit dfac25f

Please sign in to comment.