Make sure we show correct icon when a VPN connection with type of generic gets default route

Review Request #126714 - Created Jan. 11, 2016 and submitted

Jan Grulich

Reproducible with l2tp connections (you can use In case you activate it, NM creates automaticaly ppp0 connection which gets the default route, but this connection is type of generic, thus getting device for it in setIcons() leads to setDisconnectedIcon() because we care only about certain devices. What we actually have to do is to go through all active connections and find the one with hightest probability of being the main one (e.g. a wired connection is probably used as the main one than some wireless connection), also if there is an active VPN connection then it's probably the one for which NM created a ppp0 connection and it's the one we are interested about.

Tested with L2TP.

Lamarque Souza
Jan Grulich
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 87c78dd5e8176b3ab79b1660396dcfb3c114fb80 by Jan Grulich to branch Plasma/5.5.