diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-08 13:18:19 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-08 13:18:19 +0100 |
commit | ae4b64b198a143240aa5dd1e202e5016abfdae71 (patch) | |
tree | 5d9d58a512ebc60c44637d11c9424f67a02887e8 /tests/pipelinebenchmark.cpp | |
parent | f425c2070131161dc11bcf70e35f8d1848cadb65 (diff) | |
download | sink-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/pipelinebenchmark.cpp')
-rw-r--r-- | tests/pipelinebenchmark.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/pipelinebenchmark.cpp b/tests/pipelinebenchmark.cpp index 2e614ef..341c733 100644 --- a/tests/pipelinebenchmark.cpp +++ b/tests/pipelinebenchmark.cpp | |||
@@ -73,10 +73,10 @@ class PipelineBenchmark : public QObject | |||
73 | const auto date = QDateTime::currentDateTimeUtc(); | 73 | const auto date = QDateTime::currentDateTimeUtc(); |
74 | for (int i = 0; i < count; i++) { | 74 | for (int i = 0; i < count; i++) { |
75 | auto domainObject = Sink::ApplicationDomain::Mail::Ptr::create(); | 75 | auto domainObject = Sink::ApplicationDomain::Mail::Ptr::create(); |
76 | domainObject->setProperty("uid", "uid"); | 76 | domainObject->setUid("uid"); |
77 | domainObject->setProperty("subject", QString("subject%1").arg(i)); | 77 | domainObject->setExtractedSubject(QString("subject%1").arg(i)); |
78 | domainObject->setProperty("date", date.addSecs(count)); | 78 | domainObject->setExtractedDate(date.addSecs(count)); |
79 | domainObject->setProperty("folder", "folder1"); | 79 | domainObject->setFolder("folder1"); |
80 | // domainObject->setProperty("attachment", attachment); | 80 | // domainObject->setProperty("attachment", attachment); |
81 | const auto command = createCommand<Sink::ApplicationDomain::Mail>(*domainObject, *domainTypeAdaptorFactory); | 81 | const auto command = createCommand<Sink::ApplicationDomain::Mail>(*domainObject, *domainTypeAdaptorFactory); |
82 | pipeline->newEntity(command.data(), command.size()); | 82 | pipeline->newEntity(command.data(), command.size()); |