diff options
Diffstat (limited to 'framework/src/accounts/accountsmodel.cpp')
-rw-r--r-- | framework/src/accounts/accountsmodel.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/framework/src/accounts/accountsmodel.cpp b/framework/src/accounts/accountsmodel.cpp index f98e8ca3..8b46f4d3 100644 --- a/framework/src/accounts/accountsmodel.cpp +++ b/framework/src/accounts/accountsmodel.cpp | |||
@@ -85,7 +85,11 @@ void AccountsModel::runQuery(const Sink::Query &query) | |||
85 | void AccountsModel::setAccountId(const QByteArray &accountId) | 85 | void AccountsModel::setAccountId(const QByteArray &accountId) |
86 | { | 86 | { |
87 | qWarning() << "Setting account id" << accountId; | 87 | qWarning() << "Setting account id" << accountId; |
88 | //Get all folders of an account | 88 | if (accountId.isEmpty()) { |
89 | setSourceModel(nullptr); | ||
90 | mModel.clear(); | ||
91 | return; | ||
92 | } | ||
89 | Sink::Query query; | 93 | Sink::Query query; |
90 | query.filter(accountId); | 94 | query.filter(accountId); |
91 | query.setFlags(Query::LiveQuery); | 95 | query.setFlags(Query::LiveQuery); |