mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Optimized RSS settings code
This commit is contained in:
parent
29e465d2f6
commit
6629c39f01
7 changed files with 57 additions and 63 deletions
|
@ -83,14 +83,14 @@ void AutomatedRssDownloader::loadSettings()
|
|||
// load dialog geometry
|
||||
QIniSettings settings("qBittorrent", "qBittorrent");
|
||||
restoreGeometry(settings.value("RssFeedDownloader/geometry").toByteArray());
|
||||
ui->checkEnableDownloader->setChecked(RssSettings::isRssDownloadingEnabled());
|
||||
ui->checkEnableDownloader->setChecked(RssSettings().isRssDownloadingEnabled());
|
||||
// Display download rules
|
||||
loadRulesList();
|
||||
}
|
||||
|
||||
void AutomatedRssDownloader::saveSettings()
|
||||
{
|
||||
RssSettings::setRssDownloadingEnabled(ui->checkEnableDownloader->isChecked());
|
||||
RssSettings().setRssDownloadingEnabled(ui->checkEnableDownloader->isChecked());
|
||||
// Save dialog geometry
|
||||
QIniSettings settings("qBittorrent", "qBittorrent");
|
||||
settings.setValue("RssFeedDownloader/geometry", saveGeometry());
|
||||
|
@ -117,8 +117,9 @@ void AutomatedRssDownloader::loadRulesList()
|
|||
|
||||
void AutomatedRssDownloader::loadFeedList()
|
||||
{
|
||||
const QStringList feed_aliases = RssSettings::getRssFeedsAliases();
|
||||
const QStringList feed_urls = RssSettings::getRssFeedsUrls();
|
||||
const RssSettings settings;
|
||||
const QStringList feed_aliases = settings.getRssFeedsAliases();
|
||||
const QStringList feed_urls = settings.getRssFeedsUrls();
|
||||
for(int i=0; i<feed_aliases.size(); ++i) {
|
||||
QListWidgetItem *item = new QListWidgetItem(feed_aliases.at(i), ui->listFeeds);
|
||||
item->setData(Qt::UserRole, feed_urls.at(i));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue