mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -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:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <QHash>
|
||||
#include <QSharedPointer>
|
||||
#include <QVariantHash>
|
||||
#include <QXmlStreamReader>
|
||||
|
||||
#include "rssfile.h"
|
||||
@@ -76,13 +77,12 @@ public:
|
||||
private slots:
|
||||
void handleFinishedDownload(const QString& url, const QString &file_path);
|
||||
void handleDownloadFailure(const QString &url, const QString& error);
|
||||
void handleFeedTitle(const QString& feedUrl, const QString& title);
|
||||
void handleNewArticle(const QString& feedUrl, const QVariantHash& article);
|
||||
void handleFeedParsingFinished(const QString& feedUrl, const QString& error);
|
||||
|
||||
private:
|
||||
bool parseRSS(QIODevice* device);
|
||||
void parseRSSChannel(QXmlStreamReader& xml);
|
||||
void removeOldArticles();
|
||||
bool parseXmlFile(const QString &file_path);
|
||||
void downloadMatchingArticleTorrents();
|
||||
QString iconUrl() const;
|
||||
void loadItemsFromDisk();
|
||||
|
||||
@@ -97,7 +97,7 @@ private:
|
||||
QString m_iconUrl;
|
||||
bool m_read;
|
||||
bool m_refreshed;
|
||||
bool m_downloadFailure;
|
||||
bool m_inErrorState;
|
||||
bool m_loading;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user