libnm-qt: NetworkManager::Settings should load settings if network-manager service is already running
Christophe Oosterlynck
christophe.oosterlynck at dzine.be
Wed Aug 8 09:39:08 UTC 2012
When the NetworkManager::Settings singleton is loaded, it only connects to
the serviceAppeared() signal from NetworkManager::notifier() to call its
init() method and load the current settings from NetworkManager (load all
the connections etc...). In my case the NetworkManager service is already
running when loading the library => init() is never called and
NetworkManager::Settings doesn't know anything about the connections that
were already available.
Calling the init() method when the NetworkManager service is available at
load time solves my problem and seems like a proper fix.
Btw, is this the best way to report bugs for libnm-qt or should I report
somewhere else?
Best regards,
Christophe
--- a/settings.cpp Tue Aug 07 11:28:23 2012 +0200
+++ b/settings.cpp Tue Aug 07 11:28:29 2012 +0200
@@ -33,6 +33,9 @@
{
connect(NetworkManager::notifier(), SIGNAL(serviceDisappeared()),
this, SLOT(daemonUnregistered()));
connect(NetworkManager::notifier(), SIGNAL(serviceAppeared()), this,
SLOT(init()));
+ if (NetworkManager::status() != NetworkManager::Unknown) {
+ init();
+ }
}
void NetworkManager::Settings::SettingsPrivate::init()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-networkmanager/attachments/20120808/356f8fb7/attachment.html>
More information about the kde-networkmanager
mailing list