summaryrefslogtreecommitdiffstats
path: root/framework/src/accounts/accountsmodel.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-16 19:54:22 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-16 20:03:39 +0200
commit39a2a9dab5244bc9114eb006a71d04c43ca4be53 (patch)
treea2ac6ef35dbef68f434d3eb5d11a4d7a25643e21 /framework/src/accounts/accountsmodel.cpp
parente300ef292f3b54de48958ccfef88129f0ae6bf0e (diff)
downloadkube-39a2a9dab5244bc9114eb006a71d04c43ca4be53.tar.gz
kube-39a2a9dab5244bc9114eb006a71d04c43ca4be53.zip
Avoid running queries with empty ids
Diffstat (limited to 'framework/src/accounts/accountsmodel.cpp')
-rw-r--r--framework/src/accounts/accountsmodel.cpp6
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)
85void AccountsModel::setAccountId(const QByteArray &accountId) 85void 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);