Properly set RSS settings via API

Closes #8925.
This commit is contained in:
Vladimir Golovnev (Glassez) 2018-05-15 15:59:28 +03:00 committed by sledgehammer999
parent 5c3d9ffb46
commit e486bb4c29
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -494,10 +494,15 @@ void AppController::setPreferencesAction()
// Save preferences
pref->apply();
RSS::Session::instance()->setRefreshInterval(m["RSSRefreshInterval"].toUInt());
RSS::Session::instance()->setMaxArticlesPerFeed(m["RSSMaxArticlesPerFeed"].toInt());
RSS::Session::instance()->setProcessingEnabled(m["RSSProcessingEnabled"].toBool());
RSS::AutoDownloader::instance()->setProcessingEnabled(m["RSSAutoDownloadingEnabled"].toBool());
QVariantMap::ConstIterator it;
if ((it = m.find(QLatin1String("RSSRefreshInterval"))) != m.constEnd())
RSS::Session::instance()->setRefreshInterval(it.value().toUInt());
if ((it = m.find(QLatin1String("RSSMaxArticlesPerFeed"))) != m.constEnd())
RSS::Session::instance()->setMaxArticlesPerFeed(it.value().toInt());
if ((it = m.find(QLatin1String("RSSProcessingEnabled"))) != m.constEnd())
RSS::Session::instance()->setProcessingEnabled(it.value().toBool());
if ((it = m.find(QLatin1String("RSSAutoDownloadingEnabled"))) != m.constEnd())
RSS::AutoDownloader::instance()->setProcessingEnabled(it.value().toBool());
}
void AppController::defaultSavePathAction()