Don't use RSS feed URLs as base for file names

RSS feed URLs can be too long and exceed max path limit.
Add RSS feed UIDs and use UIDs as base for file names instead of URLs.
Closes #8399.
This commit is contained in:
Vladimir Golovnev (Glassez)
2018-05-22 10:35:33 +03:00
parent 1b14706b08
commit 200f4d0f07
4 changed files with 111 additions and 53 deletions

View File

@@ -33,6 +33,7 @@
#include <QBasicTimer>
#include <QHash>
#include <QList>
#include <QUuid>
#include "rss_item.h"
@@ -56,7 +57,7 @@ namespace RSS
friend class Session;
Feed(const QString &url, const QString &path, Session *session);
Feed(const QUuid &uid, const QString &url, const QString &path, Session *session);
~Feed() override;
public:
@@ -65,6 +66,7 @@ namespace RSS
void markAsRead() override;
void refresh() override;
QUuid uid() const;
QString url() const;
QString title() const;
QString lastBuildDate() const;
@@ -105,6 +107,7 @@ namespace RSS
Session *m_session;
Private::Parser *m_parser;
const QUuid m_uid;
const QString m_url;
QString m_title;
QString m_lastBuildDate;