How I can catch error during call method of proxy-class generated via qdusxml2cpp?
Vitaly V. Ch
vitaly.v.ch at gmail.com
Wed Nov 7 05:38:40 PST 2007
Thanks,
\\wbr Vitaly
On Nov 7, 2007 3:33 PM, Thiago Macieira <thiago at kde.org> wrote:
> Em Wednesday 07 November 2007 13:48:47 Vitaly V. Ch escreveu:
> > int main(int argc, char *argv[])
> > {
> > ComI_zumJukeboxSim300Interface
> > controller("com.i_zum.jukebox.sim300", "/",
> > QDBusConnection::sessionBus());
> >
> > QString res, money;
> >
> > res = controller.get_money_atd(money);
> > if(res.isEmpty())
> > qWarning("Get_money_atd: %s\n", money.toLocal8Bit().data());
> > else
> > qWarning("Get_money_atd:FAILURE: %s\n", res.toLocal8Bit().data());
> >
> > return 0;
> > }
> >
> > at now if I run my programm when no service on
> > com.i_zum.jukebox.sim300 is available then qWarning print something
> > not related to exported method get_money_atd (). I want have method to
> > determine service availabity during call
> > controller.get_money_atd(money)
> > and prevent non-sence process 'res' and 'money' if there was not a service.
>
> Read:
> http://doc.trolltech.com/4.3/qdbusreply.html
>
> Your call to get_money_atd returns a QDBusReply<QString>, not QString.
>
> --
>
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>
>
More information about the dbus
mailing list