mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 04:54:18 +00:00
Merge pull request #6183 from magao/issue6163
Save rule on enable/disable even if not selected. Closes #6163.
This commit is contained in:
commit
5df8ad32fe
@ -92,6 +92,8 @@ AutomatedRssDownloader::AutomatedRssDownloader(const QWeakPointer<Rss::Manager>
|
|||||||
Q_ASSERT(ok);
|
Q_ASSERT(ok);
|
||||||
ok = connect(ui->listRules, SIGNAL(itemSelectionChanged()), SLOT(updateFeedList()));
|
ok = connect(ui->listRules, SIGNAL(itemSelectionChanged()), SLOT(updateFeedList()));
|
||||||
Q_ASSERT(ok);
|
Q_ASSERT(ok);
|
||||||
|
ok = connect(ui->listRules, SIGNAL(itemChanged(QListWidgetItem *)), SLOT(handleRuleCheckStateChange(QListWidgetItem *)));
|
||||||
|
Q_ASSERT(ok);
|
||||||
ok = connect(ui->listFeeds, SIGNAL(itemChanged(QListWidgetItem *)), SLOT(handleFeedCheckStateChange(QListWidgetItem *)));
|
ok = connect(ui->listFeeds, SIGNAL(itemChanged(QListWidgetItem *)), SLOT(handleFeedCheckStateChange(QListWidgetItem *)));
|
||||||
Q_ASSERT(ok);
|
Q_ASSERT(ok);
|
||||||
// Update matching articles when necessary
|
// Update matching articles when necessary
|
||||||
@ -489,6 +491,18 @@ void AutomatedRssDownloader::renameSelectedRule()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AutomatedRssDownloader::handleRuleCheckStateChange(QListWidgetItem *rule_item)
|
||||||
|
{
|
||||||
|
if (ui->ruleDefBox->isEnabled())
|
||||||
|
// Make sure the current rule is saved
|
||||||
|
saveEditedRule();
|
||||||
|
|
||||||
|
// Make sure we save the rule that was enabled or disabled - it might not be the current selection.
|
||||||
|
m_editedRule = rule_item;
|
||||||
|
saveEditedRule();
|
||||||
|
m_editedRule = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void AutomatedRssDownloader::handleFeedCheckStateChange(QListWidgetItem *feed_item)
|
void AutomatedRssDownloader::handleFeedCheckStateChange(QListWidgetItem *feed_item)
|
||||||
{
|
{
|
||||||
if (ui->ruleDefBox->isEnabled())
|
if (ui->ruleDefBox->isEnabled())
|
||||||
|
@ -67,6 +67,7 @@ protected slots:
|
|||||||
void loadSettings();
|
void loadSettings();
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
void loadRulesList();
|
void loadRulesList();
|
||||||
|
void handleRuleCheckStateChange(QListWidgetItem *rule_item);
|
||||||
void handleFeedCheckStateChange(QListWidgetItem *feed_item);
|
void handleFeedCheckStateChange(QListWidgetItem *feed_item);
|
||||||
void updateRuleDefinitionBox();
|
void updateRuleDefinitionBox();
|
||||||
void clearRuleDefinitionBox();
|
void clearRuleDefinitionBox();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user