Optimized RSS settings code

This commit is contained in:
Christophe Dumez 2010-11-17 20:21:03 +00:00
parent 29e465d2f6
commit 6629c39f01
7 changed files with 57 additions and 63 deletions

View file

@ -118,9 +118,10 @@ void RSSImp::on_actionManage_cookies_triggered() {
qDebug("RSS Feed hostname is: %s", qPrintable(feed_hostname));
Q_ASSERT(!feed_hostname.isEmpty());
bool ok = false;
QList<QByteArray> raw_cookies = CookiesDlg::askForCookies(this, RssSettings::getHostNameCookies(feed_hostname), &ok);
RssSettings settings;
QList<QByteArray> raw_cookies = CookiesDlg::askForCookies(this, settings.getHostNameCookies(feed_hostname), &ok);
if(ok) {
RssSettings::setHostNameCookies(feed_hostname, raw_cookies);
settings.setHostNameCookies(feed_hostname, raw_cookies);
}
}
@ -643,7 +644,7 @@ RSSImp::~RSSImp(){
void RSSImp::on_settingsButton_clicked() {
RssSettingsDlg dlg(this);
if(dlg.exec())
updateRefreshInterval(RssSettings::getRSSRefreshInterval());
updateRefreshInterval(RssSettings().getRSSRefreshInterval());
}
void RSSImp::on_rssDownloaderBtn_clicked()