Changeset View
Changeset View
Standalone View
Standalone View
libs/models/kcmidentitymodel.cpp
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Line(s) | 84 | if (role == KcmConnectionIconRole) { | |||
---|---|---|---|---|---|
85 | return iconName; | 85 | return iconName; | ||
86 | } else if (role == KcmConnectionTypeRole) { | 86 | } else if (role == KcmConnectionTypeRole) { | ||
87 | if (type == NetworkManager::ConnectionSettings::Vpn && vpnSetting) { | 87 | if (type == NetworkManager::ConnectionSettings::Vpn && vpnSetting) { | ||
88 | return QString("%1 (%2)").arg(tooltip).arg(vpnSetting->serviceType().section('.', -1)); | 88 | return QString("%1 (%2)").arg(tooltip).arg(vpnSetting->serviceType().section('.', -1)); | ||
89 | } | 89 | } | ||
90 | return tooltip; | 90 | return tooltip; | ||
91 | } else if (role == KcmVpnConnectionExportable) { | 91 | } else if (role == KcmVpnConnectionExportable) { | ||
92 | if (type == NetworkManager::ConnectionSettings::Vpn && vpnSetting) { | 92 | if (type == NetworkManager::ConnectionSettings::Vpn && vpnSetting) { | ||
93 | return (vpnSetting->serviceType().endsWith(QLatin1String("vpnc")) || vpnSetting->serviceType().endsWith(QLatin1String("openvpn"))); | 93 | return (vpnSetting->serviceType().endsWith(QLatin1String("vpnc")) || | ||
94 | vpnSetting->serviceType().endsWith(QLatin1String("openvpn")) || | ||||
95 | vpnSetting->serviceType().endsWith(QLatin1String("wireguard"))); | ||||
94 | } | 96 | } | ||
95 | return false; | 97 | return false; | ||
96 | } else { | 98 | } else { | ||
97 | return sourceModel()->data(index, role); | 99 | return sourceModel()->data(index, role); | ||
98 | } | 100 | } | ||
99 | 101 | | |||
100 | return QVariant(); | 102 | return QVariant(); | ||
101 | } | 103 | } | ||
Show All 16 Lines |