Hi again,

> Upstream said they fixed the problem:
> <https://bugs.kde.org/show_bug.cgi?id=338513>

I can confirm this fix: After applying attached patch, the issue is solved.

The patch contains the following git commits:
81839a1566d0c0209a308d71b03837f996a19c96
c48c8321bca526787959c6ca5cb6d92c8b42882e
fd26f6e00b115912b8355f292f15eb197420fb6d

Viele Grüße,
Ralf
diff --git a/kded/service.cpp b/kded/service.cpp
index ec21b45..3d30e1f 100644
--- a/kded/service.cpp
+++ b/kded/service.cpp
@@ -57,19 +57,13 @@ NetworkManagementService::NetworkManagementService(QObject * parent, const QVari
 {
     Q_D(NetworkManagementService);
 
-    QDBusReply<bool> notificationsReply = QDBusConnection::sessionBus().interface()->isServiceRegistered("org.freedesktop.Notifications");
-    if (notificationsReply.value()) {
-        initializeNotifications();
-    } else {
-        QDBusServiceWatcher * watcher = new QDBusServiceWatcher("org.freedesktop.Notifications", QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
-        connect(watcher, SIGNAL(serviceRegistered()), this, SLOT(doInitializeNotifications()));
-    }
+    d->agent = 0;
+    d->notification = 0;
 
 #if WITH_MODEMMANAGER_SUPPORT
-    d->modemMonitor = new ModemMonitor(this);
+    d->modemMonitor = 0;
 #endif
-    d->bluetoothMonitor = new BluetoothMonitor(this);
-    d->agent = new SecretAgent(this);
+    d->bluetoothMonitor = 0;
 }
 
 NetworkManagementService::~NetworkManagementService()
@@ -77,17 +71,25 @@ NetworkManagementService::~NetworkManagementService()
     delete d_ptr;
 }
 
-void NetworkManagementService::doInitializeNotifications()
+void NetworkManagementService::init()
 {
-    QDBusServiceWatcher * watcher = static_cast<QDBusServiceWatcher*>(sender());
-    watcher->deleteLater();
+    Q_D(NetworkManagementService);
 
-    initializeNotifications();
-}
+    if (!d->agent) {
+        d->agent = new SecretAgent(this);
+    }
 
-void NetworkManagementService::initializeNotifications()
-{
-    Q_D(NetworkManagementService);
+    if (!d->notification) {
+        d->notification = new Notification(this);
+    }
+
+#if WITH_MODEMMANAGER_SUPPORT
+    if (!d->modemMonitor) {
+        d->modemMonitor = new ModemMonitor(this);
+    }
+#endif
 
-    d->notification = new Notification(this);
+    if (!d->bluetoothMonitor) {
+        d->bluetoothMonitor = new BluetoothMonitor(this);
+    }
 }
diff --git a/kded/service.h b/kded/service.h
index ef626eb..08d90fd 100644
--- a/kded/service.h
+++ b/kded/service.h
@@ -35,18 +35,18 @@ class NetworkManagementServicePrivate;
 
 class PLASMA_NM_EXPORT NetworkManagementService : public KDEDModule
 {
+    Q_CLASSINFO("D-Bus Interface", "org.kde.plasmanetworkmanagement")
     Q_OBJECT
     Q_DECLARE_PRIVATE(NetworkManagementService)
 public:
     NetworkManagementService(QObject * parent, const QVariantList&);
     virtual ~NetworkManagementService();
+
 public Q_SLOTS:
-    void doInitializeNotifications();
+    Q_SCRIPTABLE void init();
 
 private:
     NetworkManagementServicePrivate * d_ptr;
-
-    void initializeNotifications();
 };
 
 #endif // PLASMANM_KDED_SERVICE_H
diff --git a/libs/handler.cpp b/libs/handler.cpp
index 875ef03..7a31787 100644
--- a/libs/handler.cpp
+++ b/libs/handler.cpp
@@ -53,7 +53,10 @@ Handler::Handler(QObject* parent)
     , m_tmpWimaxEnabled(NetworkManager::isWimaxEnabled())
     , m_tmpWirelessEnabled(NetworkManager::isWirelessEnabled())
     , m_tmpWwanEnabled(NetworkManager::isWwanEnabled())
+    , m_agentIface(QLatin1String("org.kde.kded"), QLatin1String("/modules/networkmanagement"),
+                   QLatin1String("org.kde.plasmanetworkmanagement"))
 {
+    m_agentIface.call(QLatin1String("init"));
 }
 
 Handler::~Handler()
diff --git a/libs/handler.h b/libs/handler.h
index 23a4628..d614e82 100644
--- a/libs/handler.h
+++ b/libs/handler.h
@@ -21,6 +21,8 @@
 #ifndef PLASMA_NM_HANDLER_H
 #define PLASMA_NM_HANDLER_H
 
+#include <QDBusInterface>
+
 #include <NetworkManagerQt/Connection>
 
 #include "plasmanm_export.h"
@@ -109,6 +111,7 @@ private:
     QString m_tmpSpecificPath;
 
     bool isBtEnabled();
+    QDBusInterface m_agentIface;
 };
 
 #endif // PLASMA_NM_HANDLER_H
_______________________________________________
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-kde-extras

Reply via email to