250 { |
251 { |
251 QVERIFY(iface); |
252 QVERIFY(iface); |
252 QVERIFY(iface->isValid()); |
253 QVERIFY(iface->isValid()); |
253 } |
254 } |
254 |
255 |
|
256 void tst_QDBusPendingReply::unconnected() |
|
257 { |
|
258 QDBusConnection con("invalid stored connection"); |
|
259 QVERIFY(!con.isConnected()); |
|
260 QDBusInterface iface("doesnt.matter", "/", "doesnt.matter", con); |
|
261 QVERIFY(!iface.isValid()); |
|
262 |
|
263 QDBusPendingReply<> rvoid = iface.asyncCall("ReloadConfig"); |
|
264 QVERIFY(rvoid.isFinished()); |
|
265 QVERIFY(!rvoid.isValid()); |
|
266 QVERIFY(rvoid.isError()); |
|
267 rvoid.waitForFinished(); |
|
268 QVERIFY(!rvoid.isValid()); |
|
269 QVERIFY(rvoid.isError()); |
|
270 |
|
271 QDBusPendingReply<QString> rstring = iface.asyncCall("GetId"); |
|
272 QVERIFY(rstring.isFinished()); |
|
273 QVERIFY(!rstring.isValid()); |
|
274 QVERIFY(rstring.isError()); |
|
275 rstring.waitForFinished(); |
|
276 QVERIFY(!rstring.isValid()); |
|
277 QVERIFY(rstring.isError()); |
|
278 } |
|
279 |
255 void tst_QDBusPendingReply::simpleTypes() |
280 void tst_QDBusPendingReply::simpleTypes() |
256 { |
281 { |
257 QDBusPendingReply<> rvoid = iface->asyncCall("retrieveVoid"); |
282 QDBusPendingReply<> rvoid = iface->asyncCall("retrieveVoid"); |
258 rvoid.waitForFinished(); |
283 rvoid.waitForFinished(); |
259 QVERIFY(rvoid.isFinished()); |
284 QVERIFY(rvoid.isFinished()); |