Browse Source

Remove legacy RSS settings after converting

Closes #7226.
adaptive-webui-19844
Vladimir Golovnev (qlassez) 7 years ago
parent
commit
7380bfa9e4
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 14
      src/base/rss/rss_session.cpp

14
src/base/rss/rss_session.cpp

@ -295,6 +295,20 @@ void Session::loadFolder(const QJsonObject &jsonObj, Folder *folder) @@ -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()) {

Loading…
Cancel
Save