LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File Call-ofono-nm-Registered-delayed-in-constructor-othe.patch of Package libqt5-qtbase (Project home:jmairboeck)

From 8d6341a721d07e3cc30032bcc89f7e25cb00b9eb Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Mon, 16 Feb 2015 22:53:02 +0100
Subject: [PATCH] Call [ofono|nm]Registered delayed in constructor otherwise
 signals will be lost

If we call them just in the constructor all the signals they sent
out can't be connected and will be lost, particularly this means
the QNetworkConfigurationManager doesn't see my ethernet connection
and thus thinks i'm not online

Change-Id: I1480f76338d6ae4fbed676f9fa40ada18ea431ad
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
---
 src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index f52b9d4..0378ac7 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -80,10 +80,10 @@ QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent)
             this, SLOT(ofonoUnRegistered(QString)));
 
     if (QDBusConnection::systemBus().interface()->isServiceRegistered("org.ofono"))
-        ofonoRegistered();
+        QMetaObject::invokeMethod(this, "ofonoRegistered", Qt::QueuedConnection);
 
     if (QDBusConnection::systemBus().interface()->isServiceRegistered(NM_DBUS_SERVICE))
-        nmRegistered();
+        QMetaObject::invokeMethod(this, "nmRegistered", Qt::QueuedConnection);
 }
 
 QNetworkManagerEngine::~QNetworkManagerEngine()
-- 
2.1.4