D22457: Make it possible to show the QR of a network connection

Jan Grulich noreply at phabricator.kde.org
Mon Jul 15 05:48:20 BST 2019


jgrulich added inline comments.

INLINE COMMENTS

> ConnectionItem.qml:171
> +            text: i18n("Show network's QR code")
> +            visible: ConnectionState !== PlasmaNM.Enums.Deactivated
> +            onClicked: {

I think this should be limited to wireless connections only (Type == PlasmaNM.Enums.Wireless).

> handler.cpp:188
> +
> +    const NetworkManager::WirelessSecurityType securityType = NetworkManager::findBestWirelessSecurity(wifiDev->wirelessCapabilities(), true, (ap->mode() == NetworkManager::AccessPoint::Adhoc), ap->capabilities(), ap->wpaFlags(), ap->rsnFlags());
> +    QString ret = QStringLiteral("WIFI:");

Each item in the model already exposes **SecurityType** so you don't need to search for the AP and find security type it uses.

> handler.cpp:212
> +    NetworkManager::Connection::Ptr connection = NetworkManager::findConnection(connectionPath);
> +    const auto key = QStringLiteral("802-11-wireless-security");
> +    auto reply = connection->secrets(key);

Networks using WPA2-EAP or DynamicWEP don't have secrets stored as **802-11-wireless-security**, these are under **802-1-x**. Anyway, I think we should maybe filter these out, you will most likely won't be sharing them anyway. You can do that in the applet already, check **predictableWirelessPassword** property.

REPOSITORY
  R116 Plasma Network Management Applet

REVISION DETAIL
  https://phabricator.kde.org/D22457

To: apol, #plasma, jgrulich
Cc: ngraham, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190715/748c45f1/attachment-0001.html>


More information about the Plasma-devel mailing list