summaryrefslogtreecommitdiffstats
path: root/tests/mailquerybenchmark.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-12-08 13:18:19 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-12-08 13:18:19 +0100
commitae4b64b198a143240aa5dd1e202e5016abfdae71 (patch)
tree5d9d58a512ebc60c44637d11c9424f67a02887e8 /tests/mailquerybenchmark.cpp
parentf425c2070131161dc11bcf70e35f8d1848cadb65 (diff)
downloadsink-ae4b64b198a143240aa5dd1e202e5016abfdae71.tar.gz
sink-ae4b64b198a143240aa5dd1e202e5016abfdae71.zip
Wrap references in a Reerence type.
This allows us to make sure that references are not taken out of context (the resource). Because we need to use the type-specific accessors more we also ran into a problem that we cannot "downcast" a reference with the change recording still working, for that we have the cast<T>() operator now.
Diffstat (limited to 'tests/mailquerybenchmark.cpp')
-rw-r--r--tests/mailquerybenchmark.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/mailquerybenchmark.cpp b/tests/mailquerybenchmark.cpp
index 702239d..0e2f6fa 100644
--- a/tests/mailquerybenchmark.cpp
+++ b/tests/mailquerybenchmark.cpp
@@ -69,11 +69,11 @@ class MailQueryBenchmark : public QObject
69 const auto date = QDateTime::currentDateTimeUtc(); 69 const auto date = QDateTime::currentDateTimeUtc();
70 for (int i = 0; i < count; i++) { 70 for (int i = 0; i < count; i++) {
71 auto domainObject = Mail::Ptr::create(); 71 auto domainObject = Mail::Ptr::create();
72 domainObject->setProperty("uid", "uid"); 72 domainObject->setUid("uid");
73 domainObject->setProperty("subject", QString("subject%1").arg(i)); 73 domainObject->setExtractedSubject(QString("subject%1").arg(i));
74 domainObject->setProperty("date", date.addSecs(count)); 74 domainObject->setExtractedDate(date.addSecs(count));
75 domainObject->setProperty("folder", "folder1"); 75 domainObject->setFolder("folder1");
76 // domainObject->setProperty("attachment", attachment); 76 // domainObject->setAttachment(attachment);
77 const auto command = createCommand<Mail>(*domainObject, *domainTypeAdaptorFactory); 77 const auto command = createCommand<Mail>(*domainObject, *domainTypeAdaptorFactory);
78 pipeline->newEntity(command.data(), command.size()); 78 pipeline->newEntity(command.data(), command.size());
79 } 79 }