From 07b5cdb0fa435211ffd24bb35104452bfb35dcfc Mon Sep 17 00:00:00 2001 From: "craig.p.drummond@gmail.com" Date: Thu, 18 Oct 2012 11:06:36 +0000 Subject: [PATCH] Fix KDE compile. --- devices/mountpoints.cpp | 5 +++-- gui/trayitem.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/devices/mountpoints.cpp b/devices/mountpoints.cpp index 7eccd9b5c..073a74520 100644 --- a/devices/mountpoints.cpp +++ b/devices/mountpoints.cpp @@ -26,7 +26,8 @@ #include #include #ifdef ENABLE_KDE_SUPPORT -K_GLOBAL_STATIC(Covers, instance) +#include +K_GLOBAL_STATIC(MountPoints, instance) #endif MountPoints * MountPoints::self() @@ -66,7 +67,7 @@ void MountPoints::updateMountPoints() foreach (const QString &l, lines) { QStringList parts = l.split(' '); if (parts.size()>=2) { - entries.insert(parts.at(1)); + entries.insert(QString(parts.at(1)).replace("\\040", " ")); } } } diff --git a/gui/trayitem.cpp b/gui/trayitem.cpp index bf80aebcd..99828ef3e 100644 --- a/gui/trayitem.cpp +++ b/gui/trayitem.cpp @@ -23,6 +23,7 @@ #include "trayitem.h" #ifdef ENABLE_KDE_SUPPORT +#include #include #include #else @@ -66,12 +67,12 @@ void TrayItem::setup() trayItem->setIconByName("cantata"); trayItem->setToolTip("cantata", i18n("Cantata"), QString()); - trayItemMenu = new KMenu(this); + trayItemMenu = new KMenu(0); trayItemMenu->addAction(mw->prevTrackAction); trayItemMenu->addAction(mw->playPauseTrackAction); trayItemMenu->addAction(mw->stopTrackAction); trayItemMenu->addAction(mw->nextTrackAction); - trayItem->setContextMenu(mw->trayItemMenu); + trayItem->setContextMenu(trayItemMenu); if (qgetenv("XDG_CURRENT_DESKTOP")=="Unity") { trayItem->setStatus(KStatusNotifierItem::Active); } @@ -158,7 +159,7 @@ void TrayItem::songChanged(const Song &song, bool isPlaying) if (notification) { notification->close(); } - notification = new KNotification("CurrentTrackChanged", this); + notification = new KNotification("CurrentTrackChanged", mw); connect(notification, SIGNAL(closed()), this, SLOT(notificationClosed())); notification->setTitle(i18n("Now playing")); notification->setText(text);