diff --git a/src/sourcetree/items/InboxItem.cpp b/src/sourcetree/items/InboxItem.cpp index 652d5a97f..3e73cf4a6 100644 --- a/src/sourcetree/items/InboxItem.cpp +++ b/src/sourcetree/items/InboxItem.cpp @@ -31,7 +31,10 @@ InboxItem::InboxItem( SourcesModel* model, SourceTreeItem* parent ) : SourceTreeItem( model, parent, SourcesModel::Inbox ) , m_sortValue( -150 ) -{} +{ + m_text = tr( "Inbox" ); + m_icon = ImageRegistry::instance()->icon( RESPATH "images/inbox.svg" ); +} InboxItem::~InboxItem() @@ -41,14 +44,14 @@ InboxItem::~InboxItem() QString InboxItem::text() const { - return tr( "Inbox" ); + return m_text; } QIcon InboxItem::icon() const { - return ImageRegistry::instance()->icon( RESPATH "images/inbox.svg" ); + return m_icon; } diff --git a/src/sourcetree/items/InboxItem.h b/src/sourcetree/items/InboxItem.h index 81efa6e12..39a2782b5 100644 --- a/src/sourcetree/items/InboxItem.h +++ b/src/sourcetree/items/InboxItem.h @@ -41,6 +41,8 @@ public slots: private: int m_sortValue; + QIcon m_icon; + QString m_text; }; #endif // INBOXITEM_H