summaryrefslogtreecommitdiffstats
path: root/examples/client/main.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-11-28 16:07:15 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-11-28 16:07:15 +0100
commit4926e7f613ea3e03a2865eec66c6a8c1ec0b6516 (patch)
treeda2c7bc3f0243bf065f21b6c272f17b1ea899bce /examples/client/main.cpp
parent088d8a40c195ce6dcb91556a17f69d26e5586a3e (diff)
downloadsink-4926e7f613ea3e03a2865eec66c6a8c1ec0b6516.tar.gz
sink-4926e7f613ea3e03a2865eec66c6a8c1ec0b6516.zip
Cleanup
Diffstat (limited to 'examples/client/main.cpp')
-rw-r--r--examples/client/main.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/client/main.cpp b/examples/client/main.cpp
index c75b3ce..3fa5a4e 100644
--- a/examples/client/main.cpp
+++ b/examples/client/main.cpp
@@ -77,7 +77,6 @@ public:
77 topLayout->addWidget(titleLabel); 77 topLayout->addWidget(titleLabel);
78 topLayout->addWidget(syncButton); 78 topLayout->addWidget(syncButton);
79 topLayout->addWidget(modelView, 10); 79 topLayout->addWidget(modelView, 10);
80 model->fetchMore(QModelIndex());
81 80
82 show(); 81 show();
83 } 82 }
@@ -127,6 +126,7 @@ int main(int argc, char *argv[])
127 query.syncOnDemand = false; 126 query.syncOnDemand = false;
128 query.processAll = false; 127 query.processAll = false;
129 query.requestedProperties << "name"; 128 query.requestedProperties << "name";
129 query.liveQuery = true;
130 130
131 auto model = Akonadi2::Store::loadModel<Akonadi2::ApplicationDomain::Folder>(query); 131 auto model = Akonadi2::Store::loadModel<Akonadi2::ApplicationDomain::Folder>(query);
132 if (cliOptions.isSet("list")) { 132 if (cliOptions.isSet("list")) {
@@ -137,11 +137,9 @@ int main(int argc, char *argv[])
137 qDebug() << model->data(model->index(i, 0, index)).toString(); 137 qDebug() << model->data(model->index(i, 0, index)).toString();
138 } 138 }
139 }); 139 });
140 model->fetchMore(QModelIndex());
141 return app.exec(); 140 return app.exec();
142 } else if (cliOptions.isSet("count")) { 141 } else if (cliOptions.isSet("count")) {
143 query.liveQuery = false; 142 query.liveQuery = false;
144 model->fetchMore(QModelIndex());
145 qDebug() << "Counted results " << model->rowCount(QModelIndex()); 143 qDebug() << "Counted results " << model->rowCount(QModelIndex());
146 } else { 144 } else {
147 query.liveQuery = true; 145 query.liveQuery = true;