summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2018-02-26 14:52:44 +0100
committerMinijackson <minijackson@riseup.net>2018-02-26 14:52:44 +0100
commit431d47701f26c1c2978ebc1cf70f4b1f8f4fef3b (patch)
treef595f5d923120b430f9b09e3768ef759991bfe31
parent1a41e605cb9030a8fd6f93399bc7dd6a6804f2df (diff)
downloadkube-log-improv.tar.gz
kube-log-improv.zip
clang-format formatslog-improv
-rw-r--r--tests/teststore.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/teststore.cpp b/tests/teststore.cpp
index 24067f4f..9d56dd33 100644
--- a/tests/teststore.cpp
+++ b/tests/teststore.cpp
@@ -160,14 +160,14 @@ QVariant TestStore::load(const QByteArray &type, const QVariantMap &filter)
160 using namespace Sink::ApplicationDomain; 160 using namespace Sink::ApplicationDomain;
161 const auto list = loadList(type, filter); 161 const auto list = loadList(type, filter);
162 if (!list.isEmpty()) { 162 if (!list.isEmpty()) {
163 if(list.size() > 1) { 163 if (list.size() > 1) {
164 qWarning() << "While loading" << type << "with filter" << filter << "; got multiple elements, but returning the first one."; 164 qWarning() << "While loading" << type << "with filter" << filter
165 << "; got multiple elements, but returning the first one.";
165 } 166 }
166 return list.first(); 167 return list.first();
167 } 168 }
168 return {}; 169 return {};
169} 170}
170
171template <typename T> 171template <typename T>
172QVariantList toVariantList(const QList<T> &list) 172QVariantList toVariantList(const QList<T> &list)
173{ 173{
@@ -187,12 +187,12 @@ QVariantList TestStore::loadList(const QByteArray &type, const QVariantMap &filt
187 query.resourceFilter(filter.value("resource").toByteArray()); 187 query.resourceFilter(filter.value("resource").toByteArray());
188 } 188 }
189 189
190 for(QVariantMap::const_iterator it = filter.begin(); it != filter.end(); ++it) { 190 for (QVariantMap::const_iterator it = filter.begin(); it != filter.end(); ++it) {
191 if(it.key() == "messageId") { 191 if (it.key() == "messageId") {
192 query.filter<Mail::MessageId>(it.value()); 192 query.filter<Mail::MessageId>(it.value());
193 } else if(it.key() == "draft") { 193 } else if (it.key() == "draft") {
194 query.filter<Mail::Draft>(it.value()); 194 query.filter<Mail::Draft>(it.value());
195 } else if(it.key() == "subject") { 195 } else if (it.key() == "subject") {
196 query.filter<Mail::Subject>(it.value()); 196 query.filter<Mail::Subject>(it.value());
197 } 197 }
198 } 198 }