diff -r 56cd8111b7f7 -r 41300fa6a67c tests/auto/qdbusreply/tst_qdbusreply.cpp --- a/tests/auto/qdbusreply/tst_qdbusreply.cpp Tue Jan 26 12:42:25 2010 +0200 +++ b/tests/auto/qdbusreply/tst_qdbusreply.cpp Tue Feb 02 00:43:10 2010 +0200 @@ -93,6 +93,7 @@ } void init(); + void unconnected(); void simpleTypes(); void complexTypes(); void wrongTypes(); @@ -236,6 +237,21 @@ QVERIFY(iface->isValid()); } +void tst_QDBusReply::unconnected() +{ + QDBusConnection con("invalid stored connection"); + QVERIFY(!con.isConnected()); + QDBusInterface iface("doesnt.matter", "/", "doesnt.matter", con); + QVERIFY(!iface.isValid()); + + QDBusReply rvoid = iface.asyncCall("ReloadConfig"); + QVERIFY(!rvoid.isValid()); + + QDBusReply rstring = iface.asyncCall("GetId"); + QVERIFY(!rstring.isValid()); + QVERIFY(rstring.value().isEmpty()); +} + void tst_QDBusReply::simpleTypes() { QDBusReply rbool = iface->call(QDBus::BlockWithGui, "retrieveBool");