Parsing QVariantMapMap from Connection::settings()

Lamarque V. Souza lamarque at kde.org
Sat Mar 2 20:20:41 UTC 2013


Em Thursday 19 April 2012, Lamarque V. Souza escreveu:
> Em Thursday 19 April 2012, Christophe Oosterlynck escreveu:
> > Hi,
> 
> 	Hi,
> 
> > the QtNetworkManager seems like a nice Qt wrapper around the
> > NetworkManager DBUS interface. One of the things I want to do, is
> > configuring a wired ipv4 connection. It seems that this is not nicely
> > wrapped yet. I can read out most of the settings using IPv4Config but
> > it is read only.
> > 
> > To actually configure the ipv4 settings, I would have to use the
> > Connection::settings()/update() methods. These methods work with
> > QVariants that still need some manual parsing. I guess I would need to
> > do something similar like in the NetworkManagement repository
> > (networkmanagement/backends/NetworkManager/settings/ipv4dbus).
> > 
> > Are there any plans to provide these settings using a nicer interface
> > using QString, QHostAddress etc. instead of using QVariant? Or is
> > including networkmanager headers directly into my project and parsing
> > the map myself the only option?
> 
> 	DBus and QtDBus mostly use variant/QVariant types, so anything using
> dbus should deal with them. Unfortunately I have not had time to work on
> QtNetworkManager/QtModemManager. For now the options are parsing the
> settings yourself (like Plasma NM does) or porting ipv4dbus to
> QtNetworkManager.

	Well, thinks have changed and the guys from RedHat implemented this for 
libnm-qt (checkout branch called "settings" from libnm-qt repository). Maybe 
it is too late for you to use this in your probject but just to let everybody 
know that this is real now.

-- 
Lamarque V. Souza
KDE's Network Management maintainer
http://planetkde.org/pt-br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-networkmanager/attachments/20130302/56cf7eed/attachment.html>


More information about the kde-networkmanager mailing list