It's useful to be able to share a network connection by showing its QR
on the device so others can take a picture of it.
It shows a maximised window that will disappear when we click on it.
Details
- Reviewers
jgrulich ngraham - Group Reviewers
Plasma - Commits
- R116:8df1dcefa0a3: Make it possible to show the QR of a network connection
Looked at my wifi's QR
Diff Detail
- Repository
- R116 Plasma Network Management Applet
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 13994 Build 14012: arc lint + arc unit
The more things we put into the context menu, the more important I think it becomes to port the delegates to use a Krigami basiclistitem and make the items in the context menu show up on hover, with some of the more esoteric ones being in an overflow menu. We should probably also first extend it to support actions that show their text, so the connext/disconnect action has the most visual prominence.
Anyway, enough rambling, that would be material for another patch anyway, I just wanted to mention it.
applet/contents/ui/ConnectionItem.qml | ||
---|---|---|
170 | "Show network's QR code" | |
applet/contents/ui/ShowQR.qml | ||
46 | I don't think you need to use a ColumnLayout if it'll have only one item in it. You can just add margins to the Prison item itself. | |
kded/networkmanagement.notifyrc | ||
817 ↗ | (On Diff #61752) | "Show network's QR code" |
applet/contents/ui/ShowQR.qml | ||
---|---|---|
46 | Yes, good catch. I had something there and ended up removing it. |
applet/contents/ui/ShowQR.qml | ||
---|---|---|
54 | These won't do anything because it's not in a Layout anymore |
One thing I noticed when trying this out is that when the full-screen window showing the QR code appears, plasma-nm's system tray popup doesn't close, and the QR code window is drawn underneath it. On my 16x9 screen, the system tray popup just barely doesn't overlap the QR code, but I bet it would on a 4:3 screen, or a screen in portrait orientation.
Also maybe the menu item could have the icon view-barcode. It's not idea but maybe it's better than nothing?
Weird, for me the window stays on top. Maybe it's a X11 vs Wayland thing?
Also maybe the menu item could have the icon view-barcode. It's not idea but maybe it's better than nothing?
Added the icon.
applet/contents/ui/ConnectionItem.qml | ||
---|---|---|
171 | I think this should be limited to wireless connections only (Type == PlasmaNM.Enums.Wireless). | |
libs/handler.cpp | ||
188 | Each item in the model already exposes SecurityType so you don't need to search for the AP and find security type it uses. | |
212 | 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. |
libs/handler.cpp | ||
---|---|---|
170 | I actually thought that instead of all this logic, where you search for wireless device, AP and then to get the security type, you will pass those information from the applet, instead of the specificObject. Even ssid is exposed from the model so you can just pass ssid as an argument and security type as another one and almost all this code below can go away. |