1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-09 14:27:56 +00:00

Fix feed list refresh issue

This commit is contained in:
Christophe Dumez 2010-11-13 15:18:56 +00:00
parent 5a02c56865
commit 1904bc1abb

View File

@ -53,10 +53,7 @@ AutomatedRssDownloader::AutomatedRssDownloader(QWidget *parent) :
loadSettings(); loadSettings();
connect(ui->listRules, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(updateRuleDefinitionBox(QListWidgetItem*,QListWidgetItem*))); connect(ui->listRules, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(updateRuleDefinitionBox(QListWidgetItem*,QListWidgetItem*)));
connect(ui->listRules, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(updateFeedList(QListWidgetItem*,QListWidgetItem*))); connect(ui->listRules, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(updateFeedList(QListWidgetItem*,QListWidgetItem*)));
if(ui->listRules->count() > 0) updateRuleDefinitionBox();
ui->listRules->setCurrentRow(0);
else
updateRuleDefinitionBox();
} }
AutomatedRssDownloader::~AutomatedRssDownloader() AutomatedRssDownloader::~AutomatedRssDownloader()
@ -112,6 +109,8 @@ void AutomatedRssDownloader::loadFeedList()
item->setData(Qt::UserRole, feed_urls.at(i)); item->setData(Qt::UserRole, feed_urls.at(i));
item->setFlags(item->flags()|Qt::ItemIsUserCheckable); item->setFlags(item->flags()|Qt::ItemIsUserCheckable);
} }
if(ui->listRules->count() > 0 && !ui->listRules->currentItem())
ui->listRules->setCurrentRow(0);
} }
QStringList AutomatedRssDownloader::getSelectedFeeds() const QStringList AutomatedRssDownloader::getSelectedFeeds() const