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:
Christophe Dumez
2012-08-18 18:06:29 +03:00
parent 820d94e014
commit c50c9239ea
10 changed files with 529 additions and 374 deletions

View File

@@ -48,7 +48,7 @@ public:
RssArticle(RssFeed* parent, const QString &guid);
// Accessors
bool hasAttachment() const;
QString guid() const;
const QString& guid() const;
RssFeed* parent() const;
QString title() const;
QString author() const;
@@ -62,12 +62,8 @@ public:
// Serialization
QVariantHash toHash() const;
friend RssArticlePtr xmlToRssArticle(RssFeed* parent, QXmlStreamReader& xml);
friend RssArticlePtr hashToRssArticle(RssFeed* parent, const QVariantHash &hash);
private:
static QDateTime parseDate(const QString &string);
private:
RssFeed* m_parent;
QString m_guid;