wireguard: Trim IP list before submitting to NM
The SimpleIpListValidator validates each trimmed item in a comma-separated
list, but WireGuardPeerWidget sets peerData without trimming each item.
Untrimmed items are not accepted by NetworkManager, so the user might see NM
rejecting values that are valid in the peer settings dialog.
Fix this discrepancy by trimming each item before setting peerData.
- Type a comma-separated list of IP addresses, with spaces around comma, into
the "Allowed IPs" field of the WireGuard peer settings dialog.
- Save the connection. No error should be reported by NM.
Reviewed By: jgrulich
Subscribers: usta, plasma-devel
Differential Revision: https://phabricator.kde.org/D27661