From 545d52a2d4951596afac59e7ed064c1fc3b697a7 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 15 Nov 2009 11:46:30 +0000 Subject: fixed kde notification with Qt 4.6 (Artur Guzik) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1374 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/kdenotify/kdenotify.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/General/kdenotify/kdenotify.cpp b/src/plugins/General/kdenotify/kdenotify.cpp index 2dafa5df1..5c67107e1 100644 --- a/src/plugins/General/kdenotify/kdenotify.cpp +++ b/src/plugins/General/kdenotify/kdenotify.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include "kdenotify.h" @@ -35,11 +36,13 @@ KdeNotify::KdeNotify(QObject *parent) : General(parent) { notifier = new QDBusInterface("org.kde.VisualNotifications", "/VisualNotifications", "org.kde.VisualNotifications"); - if(notifier->isValid()) + if(notifier->lastError().type() != QDBusError::NoError) { - qWarning("KdeNotify: unable to create dbus interface"); + qWarning() << "KdeNotify: unable to create dbus interface(" + + notifier->lastError().message() + ")"; return; } + QSettings settings(Qmmp::configFile(),QSettings::IniFormat); settings.beginGroup("Kde_Notifier"); m_NotifyDelay = settings.value("notify_delay",10000).toInt(); -- cgit v1.2.3-13-gbd6f