Commit 32af19f9 authored by Kevin Whitaker's avatar Kevin Whitaker

Seems requires dbus objects to be wrapped in a qobject.

parent 82d6f18b
......@@ -26,10 +26,9 @@ SimpleCastEngine::SimpleCastEngine(QObject *parent, const QVariantList &args)
{
Q_UNUSED(args)
rootInt = new MPRISInterface(this);
playerInt = new MPRISPlayerInterface(player,this);
QDBusConnection::sessionBus().registerObject("/org/mpris/MediaPlayer2","org.mpris.MediaPlayer2",rootInt);
QDBusConnection::sessionBus().registerObject("/org/mpris/MediaPlayer2","org.mpris.MediaPlayer2.Player",playerInt);
rootInt = new MPRISInterface(&mprisHolder);
playerInt = new MPRISPlayerInterface(player,&mprisHolder);
QDBusConnection::sessionBus().registerObject("/org/mpris/MediaPlayer2",&mprisHolder);
QDBusConnection::sessionBus().registerService("org.mpris.MediaPlayer2.Player.simplecast");
tcpService = new SimpleCastTcpService(player,this);
......
......@@ -50,6 +50,7 @@ protected:
SimpleCastTcpService *tcpService;
MPRISInterface *rootInt;
MPRISPlayerInterface *playerInt;
QObject mprisHolder;
MiniMediaPlayer *player;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment