mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
- Clean up RSS preferences loading
This commit is contained in:
parent
22ec528cdf
commit
be11f4e039
@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "rss.h"
|
||||
#include "preferences.h"
|
||||
|
||||
#ifdef QT_4_5
|
||||
#include <QHash>
|
||||
@ -286,8 +287,7 @@ void RssFolder::addFile(RssFile * item) {
|
||||
RssManager::RssManager(Bittorrent *BTSession): RssFolder(0, this, BTSession, QString::null) {
|
||||
loadStreamList();
|
||||
connect(&newsRefresher, SIGNAL(timeout()), this, SLOT(refreshAll()));
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
refreshInterval = settings.value(QString::fromUtf8("Preferences/RSS/RSSRefresh"), 5).toInt();
|
||||
refreshInterval = Preferences::getRSSRefreshInterval();
|
||||
newsRefresher.start(refreshInterval*60000);
|
||||
}
|
||||
|
||||
@ -624,8 +624,7 @@ short RssStream::readDoc(const QDomDocument& doc) {
|
||||
}
|
||||
|
||||
void RssStream::resizeList() {
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
unsigned int max_articles = settings.value(QString::fromUtf8("Preferences/RSS/RSSMaxArticlesPerFeed"), 50).toInt();
|
||||
unsigned int max_articles = Preferences::getRSSMaxArticlesPerFeed();
|
||||
unsigned int nb_articles = this->size();
|
||||
if(nb_articles > max_articles) {
|
||||
QList<RssItem*> listItem = RssManager::sortNewsList(this->values());
|
||||
|
Loading…
Reference in New Issue
Block a user