diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-07-24 19:17:50 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-07-27 23:22:10 +0200 |
commit | 863989ff330d5d791ec5da7636a4792ba8248c6f (patch) | |
tree | 2ad9526273377d0e978d95cf68955563572c474b /examples/client/main.cpp | |
parent | 9c686cda11c8d11b3c3d90a6a7be3e0188e1e7b6 (diff) | |
download | sink-863989ff330d5d791ec5da7636a4792ba8248c6f.tar.gz sink-863989ff330d5d791ec5da7636a4792ba8248c6f.zip |
Less hardcoded names
Diffstat (limited to 'examples/client/main.cpp')
-rw-r--r-- | examples/client/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/client/main.cpp b/examples/client/main.cpp index 127bc08..0637491 100644 --- a/examples/client/main.cpp +++ b/examples/client/main.cpp | |||
@@ -141,18 +141,18 @@ int main(int argc, char *argv[]) | |||
141 | return 0; | 141 | return 0; |
142 | } | 142 | } |
143 | 143 | ||
144 | //FIXME move to clientapi | ||
145 | Akonadi2::ResourceFactory::load("org.kde.dummy"); | ||
146 | |||
147 | //Ensure resource is ready | 144 | //Ensure resource is ready |
148 | ResourceConfig::addResource("org.kde.dummy.instance1", "org.kde.dummy"); | 145 | for (const auto &resource : resources) { |
146 | ResourceConfig::addResource(resource.toLatin1(), Akonadi2::Store::resourceName(resource.toLatin1())); | ||
147 | } | ||
149 | 148 | ||
150 | Akonadi2::Query query; | 149 | Akonadi2::Query query; |
151 | query.resources << "org.kde.dummy.instance1"; | 150 | for (const auto &res : resources) { |
151 | query.resources << res.toLatin1(); | ||
152 | } | ||
152 | query.syncOnDemand = false; | 153 | query.syncOnDemand = false; |
153 | query.processAll = false; | 154 | query.processAll = false; |
154 | query.liveQuery = true; | 155 | query.liveQuery = true; |
155 | // query.propertyFilter.insert("uid", "testuid"); | ||
156 | 156 | ||
157 | auto model = QSharedPointer<AkonadiListModel<Akonadi2::ApplicationDomain::Event::Ptr> >::create(Akonadi2::Store::load<Akonadi2::ApplicationDomain::Event>(query), "summary"); | 157 | auto model = QSharedPointer<AkonadiListModel<Akonadi2::ApplicationDomain::Event::Ptr> >::create(Akonadi2::Store::load<Akonadi2::ApplicationDomain::Event>(query), "summary"); |
158 | auto view = QSharedPointer<View>::create(model.data()); | 158 | auto view = QSharedPointer<View>::create(model.data()); |