diff --git a/src/services/abstract/rootitem.cpp b/src/services/abstract/rootitem.cpp index 8b4650bc4..88eb8005e 100755 --- a/src/services/abstract/rootitem.cpp +++ b/src/services/abstract/rootitem.cpp @@ -44,7 +44,13 @@ RootItem::~RootItem() { } QString RootItem::hashCode() const { - return QString::number(kind()) + QL1S("-") + QString::number(id()); + ServiceRoot *root = getParentServiceRoot(); + int acc_id = root == NULL ? 0 : root->accountId(); + + return + QString::number(acc_id) + QL1S("-") + + QString::number(kind()) + QL1S("-") + + QString::number(id()); } QList RootItem::contextMenu() { diff --git a/src/services/tt-rss/ttrsscategory.cpp b/src/services/tt-rss/ttrsscategory.cpp index e05953d8d..28be01665 100755 --- a/src/services/tt-rss/ttrsscategory.cpp +++ b/src/services/tt-rss/ttrsscategory.cpp @@ -41,13 +41,6 @@ TtRssCategory::TtRssCategory(const QSqlRecord &record) : Category(NULL) { TtRssCategory::~TtRssCategory() { } -QString TtRssCategory::hashCode() const { - return - QString::number(kind()) + QL1S("-") + - QString::number(getParentServiceRoot()->accountId()) + QL1S("-") + - QString::number(customId()); -} - TtRssServiceRoot *TtRssCategory::serviceRoot() const { return qobject_cast(getParentServiceRoot()); } diff --git a/src/services/tt-rss/ttrsscategory.h b/src/services/tt-rss/ttrsscategory.h index 41096bcb3..db83c3433 100755 --- a/src/services/tt-rss/ttrsscategory.h +++ b/src/services/tt-rss/ttrsscategory.h @@ -33,10 +33,7 @@ class TtRssCategory : public Category { explicit TtRssCategory(const QSqlRecord &record); virtual ~TtRssCategory(); - QString hashCode() const; - TtRssServiceRoot *serviceRoot() const; - bool markAsReadUnread(ReadStatus status); bool cleanMessages(bool clear_only_read); diff --git a/src/services/tt-rss/ttrssfeed.cpp b/src/services/tt-rss/ttrssfeed.cpp index 949d5ab65..665499e53 100755 --- a/src/services/tt-rss/ttrssfeed.cpp +++ b/src/services/tt-rss/ttrssfeed.cpp @@ -50,13 +50,6 @@ TtRssFeed::TtRssFeed(const QSqlRecord &record) : Feed(NULL) { TtRssFeed::~TtRssFeed() { } -QString TtRssFeed::hashCode() const { - return - QString::number(kind()) + QL1S("-") + - QString::number(getParentServiceRoot()->accountId()) + QL1S("-") + - QString::number(customId()); -} - int TtRssFeed::messageForeignKeyId() const { return customId(); } diff --git a/src/services/tt-rss/ttrssfeed.h b/src/services/tt-rss/ttrssfeed.h index 0622d1d86..94ec55edf 100755 --- a/src/services/tt-rss/ttrssfeed.h +++ b/src/services/tt-rss/ttrssfeed.h @@ -33,25 +33,17 @@ class TtRssFeed : public Feed { explicit TtRssFeed(const QSqlRecord &record); virtual ~TtRssFeed(); - QString hashCode() const; - int messageForeignKeyId() const; - TtRssServiceRoot *serviceRoot() const; - QVariant data(int column, int role) const; - void updateCounts(bool including_total_count); - bool canBeEdited() const; bool editViaGui(); - bool canBeDeleted() const; bool deleteViaGui(); int update(); QList undeletedMessages() const; - bool markAsReadUnread(ReadStatus status); bool cleanMessages(bool clear_only_read); bool editItself(TtRssFeed *new_feed_data);