diff options
Diffstat (limited to 'tests/teststore.cpp')
-rw-r--r-- | tests/teststore.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/teststore.cpp b/tests/teststore.cpp index 817101be..294aca8f 100644 --- a/tests/teststore.cpp +++ b/tests/teststore.cpp | |||
@@ -172,3 +172,16 @@ QVariant TestStore::load(const QByteArray &type, const QVariantMap &filter) | |||
172 | Q_ASSERT(false); | 172 | Q_ASSERT(false); |
173 | return {}; | 173 | return {}; |
174 | } | 174 | } |
175 | |||
176 | QVariantMap TestStore::read(const QVariant &object) | ||
177 | { | ||
178 | using namespace Sink::ApplicationDomain; | ||
179 | QVariantMap map; | ||
180 | if (auto mail = object.value<Mail::Ptr>()) { | ||
181 | map.insert("subject", mail->getSubject()); | ||
182 | map.insert("draft", mail->getDraft()); | ||
183 | return map; | ||
184 | } | ||
185 | Q_ASSERT(false); | ||
186 | return {}; | ||
187 | } | ||