diff options
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/General/mpris/mpris.cpp | 9 | ||||
| -rw-r--r-- | src/plugins/General/mpris/mpris2/player2object.cpp | 7 | ||||
| -rw-r--r-- | src/plugins/General/mpris/mpris2/player2object.h | 4 | ||||
| -rw-r--r-- | src/plugins/General/mpris/mpris2/root2object.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/General/mpris/mpris2/root2object.h | 6 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/plugins/General/mpris/mpris.cpp b/src/plugins/General/mpris/mpris.cpp index 6e53d11d9..61caaae64 100644 --- a/src/plugins/General/mpris/mpris.cpp +++ b/src/plugins/General/mpris/mpris.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2010 by Ilya Kotov * + * Copyright (C) 2008-2011 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -34,10 +34,9 @@ MPRIS::MPRIS(QObject *parent) : General(parent) connection.registerObject("/Player", new PlayerObject(this), QDBusConnection::ExportAllContents); connection.registerObject("/", new RootObject(this), QDBusConnection::ExportAllContents); //MPRISv2.0 - connection.registerObject("/org/mpris/MediaPlayer2", new Root2Object(this), - QDBusConnection::ExportAllContents); - connection.registerObject("/org/mpris/MediaPlayer2/Player", new Player2Object(this), - QDBusConnection::ExportAllContents); + new Root2Object(this); + new Player2Object(this); + connection.registerObject("/org/mpris/MediaPlayer2", this); connection.registerService("org.mpris.qmmp"); connection.registerService("org.mpris.MediaPlayer2.qmmp"); } diff --git a/src/plugins/General/mpris/mpris2/player2object.cpp b/src/plugins/General/mpris/mpris2/player2object.cpp index 161153c68..979b33282 100644 --- a/src/plugins/General/mpris/mpris2/player2object.cpp +++ b/src/plugins/General/mpris/mpris2/player2object.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010 by Ilya Kotov * + * Copyright (C) 2010-2011 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -29,7 +29,7 @@ #include <qmmpui/playlistmanager.h> #include "player2object.h" -Player2Object::Player2Object(QObject *parent) : QObject(parent) +Player2Object::Player2Object(QObject *parent) : QDBusAbstractAdaptor(parent) { m_prev_item = 0; m_previous_pos = 0; @@ -348,7 +348,8 @@ void Player2Object::playItem(PlayListItem *item) void Player2Object::disconnectPl() { - disconnect(sender(), SIGNAL(itemAddded(itemAdded(PlayListItem*))), this, SLOT(playItem(PlayListItem*))); + disconnect(sender(), SIGNAL(itemAddded(itemAdded(PlayListItem*))), + this, SLOT(playItem(PlayListItem*))); } void Player2Object::syncProperties() diff --git a/src/plugins/General/mpris/mpris2/player2object.h b/src/plugins/General/mpris/mpris2/player2object.h index a3addf2f2..8a0763487 100644 --- a/src/plugins/General/mpris/mpris2/player2object.h +++ b/src/plugins/General/mpris/mpris2/player2object.h @@ -20,7 +20,7 @@ #ifndef PLAYER2OBJECT_H #define PLAYER2OBJECT_H -#include <QObject> +#include <QDBusAbstractAdaptor> #include <QVariantMap> #include <QDBusObjectPath> #include <QMap> @@ -35,7 +35,7 @@ class PlayListItem; /** @author Ilya Kotov <forkotov02@hotmail.ru> */ -class Player2Object : public QObject +class Player2Object : public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.mpris.MediaPlayer2.Player") diff --git a/src/plugins/General/mpris/mpris2/root2object.cpp b/src/plugins/General/mpris/mpris2/root2object.cpp index c0eca65fb..1f964272e 100644 --- a/src/plugins/General/mpris/mpris2/root2object.cpp +++ b/src/plugins/General/mpris/mpris2/root2object.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010 by Ilya Kotov * + * Copyright (C) 2010-2011 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -29,7 +29,7 @@ #include <qmmp/metadatamanager.h> #include "root2object.h" -Root2Object::Root2Object(QObject *parent) : QObject(parent) +Root2Object::Root2Object(QObject *parent) : QDBusAbstractAdaptor(parent) {} diff --git a/src/plugins/General/mpris/mpris2/root2object.h b/src/plugins/General/mpris/mpris2/root2object.h index f661df200..9da148a97 100644 --- a/src/plugins/General/mpris/mpris2/root2object.h +++ b/src/plugins/General/mpris/mpris2/root2object.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010 by Ilya Kotov * + * Copyright (C) 2010-2011 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -20,13 +20,13 @@ #ifndef ROOT2OBJECT_H #define ROOT2OBJECT_H -#include <QObject> +#include <QDBusAbstractAdaptor> #include <QStringList> /** @author Ilya Kotov <forkotov02@hotmail.ru> */ -class Root2Object : public QObject +class Root2Object : public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.mpris.MediaPlayer2") |
