mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Move RSS parsing to another thread to avoid freezing the UI
RSS items are now displayed as soon as they have been parsed instead of displaying all of them in one batch once the whole feed is parsed. First step to address issue #34.
This commit is contained in:
@@ -35,10 +35,13 @@
|
||||
#include "rssfeed.h"
|
||||
#include "rssarticle.h"
|
||||
#include "rssdownloadrulelist.h"
|
||||
#include "rssparser.h"
|
||||
#include "downloadthread.h"
|
||||
|
||||
RssManager::RssManager():
|
||||
m_rssDownloader(new DownloadThread(this)), m_downloadRules(new RssDownloadRuleList)
|
||||
m_rssDownloader(new DownloadThread(this)),
|
||||
m_downloadRules(new RssDownloadRuleList),
|
||||
m_rssParser(new RssParser(this))
|
||||
{
|
||||
connect(&m_refreshTimer, SIGNAL(timeout()), this, SLOT(refresh()));
|
||||
m_refreshInterval = RssSettings().getRSSRefreshInterval();
|
||||
@@ -48,16 +51,22 @@ RssManager::RssManager():
|
||||
RssManager::~RssManager() {
|
||||
qDebug("Deleting RSSManager...");
|
||||
delete m_downloadRules;
|
||||
delete m_rssParser;
|
||||
saveItemsToDisk();
|
||||
saveStreamList();
|
||||
qDebug("RSSManager deleted");
|
||||
}
|
||||
|
||||
DownloadThread *RssManager::rssDownloader() const
|
||||
DownloadThread* RssManager::rssDownloader() const
|
||||
{
|
||||
return m_rssDownloader;
|
||||
}
|
||||
|
||||
RssParser* RssManager::rssParser() const
|
||||
{
|
||||
return m_rssParser;
|
||||
}
|
||||
|
||||
void RssManager::updateRefreshInterval(uint val) {
|
||||
if (m_refreshInterval != val) {
|
||||
m_refreshInterval = val;
|
||||
|
||||
Reference in New Issue
Block a user