[Development] QtDus Problem

Sandro Andrade sandroandrade at kde.org
Thu Sep 13 01:40:28 CEST 2012


On Wed, Sep 12, 2012 at 8:24 PM, Kevin Anthony
<kevin.s.anthony at gmail.com> wrote:
> I'm using:
> http://www.developer.nokia.com/Community/Wiki/QtDbus_quick_tutorial
>
> here is my code in my main.c
> QDBusConnection connection = QDBusConnection::sessionBus();
>  if (!connection.registerService("org.mpris.MediaPlayer2.mymediaplayer")){
>    qDebug("Could not register on bus org.mpris.Mediaplayer2.mymediaplayer");
>    return;
>  }
>  RootHandler* dbus_root = new RootHandler;
>  new RootAdapter(dbus_root);
>  if (!connection.registerObject("/org/mpris/MediaPlayer2", dbus_root)){
>    qDebug("Could not register object /org/mpris/MediaPlayer2");
>    return;
>  }
>
> when i execute Quit() from d-feet, my RootAdapter Quit() funciton gets
> called, but i get this error:
> Warning: QMetaObject::invokeMethod: No such method QObject::Quit()

Is the Quit() method a slot or was declared with Q_INVOKABLE ?

Sandro

>
> So i know my 'magic' adpater is working, but it's not calling my handler
> functions.
>
> --
> Thanks
> Kevin Anthony
>
> Do you use Banshee?
> Download the Community Extensions:
> http://banshee.fm/download/extensions/
>
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>



More information about the Development mailing list