diff options
Diffstat (limited to 'framework/domain/outboxmodel.cpp')
-rw-r--r-- | framework/domain/outboxmodel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/framework/domain/outboxmodel.cpp b/framework/domain/outboxmodel.cpp index b82c1c6b..68a0e8be 100644 --- a/framework/domain/outboxmodel.cpp +++ b/framework/domain/outboxmodel.cpp | |||
@@ -40,6 +40,8 @@ OutboxModel::OutboxModel(QObject *parent) | |||
40 | query.request<Mail::Date>(); | 40 | query.request<Mail::Date>(); |
41 | query.request<Mail::Folder>(); | 41 | query.request<Mail::Folder>(); |
42 | runQuery(query); | 42 | runQuery(query); |
43 | connect(this, &QAbstractItemModel::rowsInserted, this, &OutboxModel::countChanged); | ||
44 | connect(this, &QAbstractItemModel::rowsRemoved, this, &OutboxModel::countChanged); | ||
43 | } | 45 | } |
44 | 46 | ||
45 | OutboxModel::~OutboxModel() | 47 | OutboxModel::~OutboxModel() |
@@ -96,3 +98,7 @@ void OutboxModel::runQuery(const Sink::Query &query) | |||
96 | setSourceModel(m_model.data()); | 98 | setSourceModel(m_model.data()); |
97 | } | 99 | } |
98 | 100 | ||
101 | int OutboxModel::count() const | ||
102 | { | ||
103 | return rowCount(); | ||
104 | } | ||