AW: network manager qt - how to get the passwords
Boettger, Heiko
Heiko.Boettger at karlstorz.com
Fri Aug 28 06:49:01 UTC 2015
Perfect, thanks Jan, that's exactly what I needed to know.
Von: Kde-frameworks-devel [mailto:kde-frameworks-devel-bounces at kde.org] Im Auftrag von Jan Grulich
Gesendet: Donnerstag, 27. August 2015 20:28
An: kde-frameworks-devel at kde.org
Betreff: Re: network manager qt - how to get the passwords
Hi,
On Thursday 27 of August 2015 09:43:54 Boettger, Heiko wrote:
> Hi,
>
> I am currently developing a gui for our products to edit the network
> settings. One thing which I cannot figure out is how to get the passwords.
> Simply calling NetworkManager::Security8021xSetting::password() or any of
> the other password-methods doesn't seem to work.
>
Unfortunately it doesn't work that way, you need to call NetworkManager::Connection::secrets() for the connection you want secrets for and pass the setting type as a parameter (in your case it would be "NetworkManager::Setting::Security8021x" enum). This would return you a QDBusPendingReply so you need to wait for the reply to finish or connect to a signal finished() and do whatever you want to do with the secrets. Using NetworkManager::Security8021xSetting::password() would work only in case you
already have secrets as a part of the setting.
> Is there somewhere a good documentation or example showing how it works?
>
You can check how everything work in plasma-nm [1]. If you want to check how to get secrets go to libs/editor/connectiondetailseditor.cpp. You can also ping me anytime on IRC on #solid channel.
[1] - https://quickgit.kde.org/?p=plasma-nm.git
> Thanks
> Heiko
Regards,
Jan
--
Jan Grulich <jgrulich at redhat.com<mailto:jgrulich at redhat.com>>
Software Engineer, Desktop team
Red Hat Czech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150828/3e1c2745/attachment.html>
More information about the Kde-frameworks-devel
mailing list