summaryrefslogtreecommitdiffstats
path: root/tests/querytest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/querytest.cpp')
-rw-r--r--tests/querytest.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/querytest.cpp b/tests/querytest.cpp
index 50fc67f..f147c58 100644
--- a/tests/querytest.cpp
+++ b/tests/querytest.cpp
@@ -69,7 +69,6 @@ private Q_SLOTS:
69 69
70 //We fetch before the data is available and rely on the live query mechanism to deliver the actual data 70 //We fetch before the data is available and rely on the live query mechanism to deliver the actual data
71 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Mail>(query); 71 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Mail>(query);
72 model->fetchMore(QModelIndex());
73 QTRY_COMPARE(model->rowCount(), 1); 72 QTRY_COMPARE(model->rowCount(), 1);
74 } 73 }
75 74
@@ -92,7 +91,6 @@ private Q_SLOTS:
92 //We fetch after the data is available and don't rely on the live query mechanism to deliver the actual data 91 //We fetch after the data is available and don't rely on the live query mechanism to deliver the actual data
93 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Mail>(query); 92 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Mail>(query);
94 93
95 model->fetchMore(QModelIndex());
96 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); 94 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool());
97 QCOMPARE(model->rowCount(), 1); 95 QCOMPARE(model->rowCount(), 1);
98 } 96 }
@@ -114,7 +112,6 @@ private Q_SLOTS:
114 112
115 //We fetch before the data is available and rely on the live query mechanism to deliver the actual data 113 //We fetch before the data is available and rely on the live query mechanism to deliver the actual data
116 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Mail>(query); 114 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Mail>(query);
117 model->fetchMore(QModelIndex());
118 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); 115 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool());
119 QVERIFY(model->rowCount() >= 1); 116 QVERIFY(model->rowCount() >= 1);
120 id = model->index(0, 0).data(Sink::Store::DomainObjectRole).value<Sink::ApplicationDomain::Mail::Ptr>()->identifier(); 117 id = model->index(0, 0).data(Sink::Store::DomainObjectRole).value<Sink::ApplicationDomain::Mail::Ptr>()->identifier();
@@ -125,7 +122,6 @@ private Q_SLOTS:
125 query.resources << "org.kde.dummy.instance1"; 122 query.resources << "org.kde.dummy.instance1";
126 query.ids << id; 123 query.ids << id;
127 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Mail>(query); 124 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Mail>(query);
128 model->fetchMore(QModelIndex());
129 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); 125 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool());
130 QCOMPARE(model->rowCount(), 1); 126 QCOMPARE(model->rowCount(), 1);
131 } 127 }
@@ -145,7 +141,6 @@ private Q_SLOTS:
145 141
146 //We fetch before the data is available and rely on the live query mechanism to deliver the actual data 142 //We fetch before the data is available and rely on the live query mechanism to deliver the actual data
147 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); 143 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query);
148 model->fetchMore(QModelIndex());
149 QTRY_COMPARE(model->rowCount(), 1); 144 QTRY_COMPARE(model->rowCount(), 1);
150 auto folderEntity = model->index(0, 0).data(Sink::Store::DomainObjectRole).value<Sink::ApplicationDomain::Folder::Ptr>(); 145 auto folderEntity = model->index(0, 0).data(Sink::Store::DomainObjectRole).value<Sink::ApplicationDomain::Folder::Ptr>();
151 QVERIFY(!folderEntity->identifier().isEmpty()); 146 QVERIFY(!folderEntity->identifier().isEmpty());
@@ -186,7 +181,6 @@ private Q_SLOTS:
186 181
187 //We fetch after the data is available and don't rely on the live query mechanism to deliver the actual data 182 //We fetch after the data is available and don't rely on the live query mechanism to deliver the actual data
188 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); 183 auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query);
189 model->fetchMore(QModelIndex());
190 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); 184 QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool());
191 QCOMPARE(model->rowCount(), 1); 185 QCOMPARE(model->rowCount(), 1);
192 model->fetchMore(model->index(0, 0)); 186 model->fetchMore(model->index(0, 0));