diff --git a/kded/service.h b/kded/service.h --- a/kded/service.h +++ b/kded/service.h @@ -44,13 +44,9 @@ Q_SCRIPTABLE void init(); Q_SIGNALS: - Q_SCRIPTABLE void registered(); Q_SCRIPTABLE void secretsError(const QString &connectionPath, const QString &message); -private Q_SLOTS: - void slotRegistered(const QDBusObjectPath &path); - private: NetworkManagementServicePrivate * const d_ptr; }; diff --git a/kded/service.cpp b/kded/service.cpp --- a/kded/service.cpp +++ b/kded/service.cpp @@ -52,7 +52,7 @@ { Q_D(NetworkManagementService); - connect(this, &KDEDModule::moduleRegistered, this, &NetworkManagementService::slotRegistered); + connect(this, &KDEDModule::moduleRegistered, this, &NetworkManagementService::init); d->agent = new SecretAgent(this); connect(d->agent, &SecretAgent::secretsError, this, &NetworkManagementService::secretsError); @@ -80,11 +80,4 @@ } } -void NetworkManagementService::slotRegistered(const QDBusObjectPath &path) -{ - if (path.path() == QLatin1String("/modules/networkmanagement")) { - Q_EMIT registered(); - } -} - #include "service.moc" diff --git a/libs/handler.h b/libs/handler.h --- a/libs/handler.h +++ b/libs/handler.h @@ -125,7 +125,6 @@ void stopHotspot(); private Q_SLOTS: - void initKdedModule(); void secretAgentError(const QString &connectionPath, const QString &message); void replyFinished(QDBusPendingCallWatcher *watcher); void hotspotCreated(QDBusPendingCallWatcher *watcher); diff --git a/libs/handler.cpp b/libs/handler.cpp --- a/libs/handler.cpp +++ b/libs/handler.cpp @@ -72,13 +72,6 @@ , m_tmpWirelessEnabled(NetworkManager::isWirelessEnabled()) , m_tmpWwanEnabled(NetworkManager::isWwanEnabled()) { - initKdedModule(); - QDBusConnection::sessionBus().connect(QStringLiteral(AGENT_SERVICE), - QStringLiteral(AGENT_PATH), - QStringLiteral(AGENT_IFACE), - QStringLiteral("registered"), - this, SLOT(initKdedModule())); - QDBusConnection::sessionBus().connect(QStringLiteral(AGENT_SERVICE), QStringLiteral(AGENT_PATH), QStringLiteral(AGENT_IFACE), @@ -736,15 +729,6 @@ scheduleRequestScan(interface, 2000); } -void Handler::initKdedModule() -{ - QDBusMessage initMsg = QDBusMessage::createMethodCall(QStringLiteral(AGENT_SERVICE), - QStringLiteral(AGENT_PATH), - QStringLiteral(AGENT_IFACE), - QStringLiteral("init")); - QDBusConnection::sessionBus().send(initMsg); -} - void Handler::secretAgentError(const QString &connectionPath, const QString &message) { // If the password was wrong, forget it