Importance code refactoring related to the "preferences" code - Greatly improves performance

This commit is contained in:
Christophe Dumez 2010-11-16 20:34:31 +00:00
parent a640b08414
commit e5032a52c4
26 changed files with 976 additions and 1142 deletions

View file

@ -220,7 +220,7 @@ RssDownloadRule AutomatedRssDownloader::getCurrentRule() const
void AutomatedRssDownloader::initLabelCombobox()
{
// Load custom labels
const QStringList customLabels = Preferences::getTorrentLabels();
const QStringList customLabels = Preferences().getTorrentLabels();
foreach(const QString& label, customLabels) {
ui->comboLabel->addItem(label);
}
@ -252,7 +252,7 @@ void AutomatedRssDownloader::saveEditedRule()
rule.setLabel(ui->comboLabel->currentText());
// Save new label
if(!rule.label().isEmpty())
Preferences::addTorrentLabel(rule.label());
Preferences().addTorrentLabel(rule.label());
//rule.setRssFeeds(getSelectedFeeds());
// Save it
m_ruleList->saveRule(rule);