From 67cc84bdd339f12e1390a8ecdd2142602c9fdf8e Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 7 May 2011 19:23:40 +0000 Subject: fixed broken mpris2 (Closes issue 466) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2177 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/mpris/mpris.cpp | 9 ++++----- src/plugins/General/mpris/mpris2/player2object.cpp | 7 ++++--- src/plugins/General/mpris/mpris2/player2object.h | 4 ++-- src/plugins/General/mpris/mpris2/root2object.cpp | 4 ++-- src/plugins/General/mpris/mpris2/root2object.h | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src/plugins') 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 #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 +#include #include #include #include @@ -35,7 +35,7 @@ class PlayListItem; /** @author Ilya Kotov */ -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 #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 +#include #include /** @author Ilya Kotov */ -class Root2Object : public QObject +class Root2Object : public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.mpris.MediaPlayer2") -- cgit v1.2.3-13-gbd6f