summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamarque V. Souza <lamarque@kde.org>2011-12-29 21:34:14 (GMT)
committerSebastian Trueg <trueg@kde.org>2012-01-27 13:18:02 (GMT)
commite95f3be9062f98263e35329ec2ed87b27933d2e9 (patch)
treeedf22280e904cb3d61e563eaa8b6c173515d9383
parent2162be574ec3e0116927052638c56b276aa4d065 (diff)
Re-establishes connection with networkstatus module when kded restarts.
The OrgKdeSolidNetworkingClientInterface object becomes invalid when kded exits and should be recreated on every kded restart. CCBUG: 262732
-rw-r--r--solid/solid/networking.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/solid/solid/networking.cpp b/solid/solid/networking.cpp
index 02c7714..a838b98 100644
--- a/solid/solid/networking.cpp
+++ b/solid/solid/networking.cpp
@@ -33,13 +33,8 @@ Solid::NetworkingPrivate::NetworkingPrivate()
: netStatus(Solid::Networking::Unknown),
connectPolicy(Solid::Networking::Managed),
disconnectPolicy(Solid::Networking::Managed),
- iface(new OrgKdeSolidNetworkingClientInterface( "org.kde.kded",
- "/modules/networkstatus",
- QDBusConnection::sessionBus(),
- this))
+ iface(0)
{
- //connect( iface, SIGNAL( statusChanged( uint ) ), globalNetworkManager, SIGNAL( statusChanged( Networking::Status ) ) );
- connect(iface, SIGNAL(statusChanged(uint)), this, SLOT(serviceStatusChanged(uint)));
QDBusServiceWatcher *watcher = new QDBusServiceWatcher("org.kde.kded", QDBusConnection::sessionBus(),
QDBusServiceWatcher::WatchForOwnerChange, this);
connect(watcher, SIGNAL(serviceOwnerChanged(QString,QString,QString)),
@@ -58,8 +53,16 @@ Solid::Networking::Notifier::Notifier()
void Solid::NetworkingPrivate::initialize()
{
- QDBusPendingReply<uint> reply = iface->status();
- reply.waitForFinished();
+ delete iface;
+ iface = new OrgKdeSolidNetworkingClientInterface( "org.kde.kded",
+ "/modules/networkstatus",
+ QDBusConnection::sessionBus(),
+ this);
+
+ //connect( iface, SIGNAL( statusChanged( uint ) ), globalNetworkManager, SIGNAL( statusChanged( Networking::Status ) ) );
+ connect(iface, SIGNAL(statusChanged(uint)), this, SLOT(serviceStatusChanged(uint)));
+
+ QDBusReply<uint> reply = iface->status();
if (reply.isValid()) {
netStatus = ( Solid::Networking::Status )reply.value();
} else {