Merge pull request #7240 from glassez/fix-7226

Remove legacy RSS settings after converting. Closes #7226
This commit is contained in:
Vladimir Golovnev 2017-08-11 13:08:28 +04:00 committed by GitHub
commit 9417105990

View File

@ -295,6 +295,20 @@ void Session::loadFolder(const QJsonObject &jsonObj, Folder *folder)
void Session::loadLegacy()
{
struct LegacySettingsDeleter
{
~LegacySettingsDeleter()
{
auto settingsStorage = SettingsStorage::instance();
settingsStorage->removeValue("Rss/streamList");
settingsStorage->removeValue("Rss/streamAlias");
settingsStorage->removeValue("Rss/open_folders");
settingsStorage->removeValue("Rss/qt5/splitter_h");
settingsStorage->removeValue("Rss/qt5/splitterMain");
settingsStorage->removeValue("Rss/hosts_cookies");
}
} legacySettingsDeleter;
const QStringList legacyFeedPaths = SettingsStorage::instance()->loadValue("Rss/streamList").toStringList();
const QStringList feedAliases = SettingsStorage::instance()->loadValue("Rss/streamAlias").toStringList();
if (legacyFeedPaths.size() != feedAliases.size()) {