mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 19:45:31 +01:00
Fix mpris
This commit is contained in:
parent
0beb12fc14
commit
f929a88473
@ -19,10 +19,6 @@
|
|||||||
#include "mpris1.h"
|
#include "mpris1.h"
|
||||||
#include "mpris2.h"
|
#include "mpris2.h"
|
||||||
|
|
||||||
#include <QFuture>
|
|
||||||
#include <QFutureWatcher>
|
|
||||||
#include <QtConcurrentRun>
|
|
||||||
|
|
||||||
namespace mpris {
|
namespace mpris {
|
||||||
|
|
||||||
Mpris::Mpris(Player* player, ArtLoader* art_loader, QObject* parent)
|
Mpris::Mpris(Player* player, ArtLoader* art_loader, QObject* parent)
|
||||||
|
@ -129,8 +129,6 @@ class OSD : public QObject {
|
|||||||
#endif // Q_OS_DARWIN
|
#endif // Q_OS_DARWIN
|
||||||
|
|
||||||
#ifdef HAVE_DBUS
|
#ifdef HAVE_DBUS
|
||||||
void DoInit();
|
|
||||||
|
|
||||||
boost::scoped_ptr<OrgFreedesktopNotificationsInterface> interface_;
|
boost::scoped_ptr<OrgFreedesktopNotificationsInterface> interface_;
|
||||||
uint notification_id_;
|
uint notification_id_;
|
||||||
QDateTime last_notification_time_;
|
QDateTime last_notification_time_;
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "dbus/notification.h"
|
#include "dbus/notification.h"
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
#include <QtConcurrentRun>
|
|
||||||
|
|
||||||
using boost::scoped_ptr;
|
using boost::scoped_ptr;
|
||||||
|
|
||||||
@ -61,10 +60,6 @@ const QDBusArgument& operator>> (const QDBusArgument& arg, QImage& image) {
|
|||||||
void OSD::Init() {
|
void OSD::Init() {
|
||||||
notification_id_ = 0;
|
notification_id_ = 0;
|
||||||
|
|
||||||
QtConcurrent::run(this, &OSD::DoInit);
|
|
||||||
}
|
|
||||||
|
|
||||||
void OSD::DoInit() {
|
|
||||||
#ifdef HAVE_DBUS
|
#ifdef HAVE_DBUS
|
||||||
interface_.reset(new OrgFreedesktopNotificationsInterface(
|
interface_.reset(new OrgFreedesktopNotificationsInterface(
|
||||||
OrgFreedesktopNotificationsInterface::staticInterfaceName(),
|
OrgFreedesktopNotificationsInterface::staticInterfaceName(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user