Changeset View
Changeset View
Standalone View
Standalone View
libs/editor/settings/connectionwidget.cpp
Show All 23 Lines | |||||
24 | 24 | | |||
25 | #include <NetworkManagerQt/Settings> | 25 | #include <NetworkManagerQt/Settings> | ||
26 | #include <NetworkManagerQt/Connection> | 26 | #include <NetworkManagerQt/Connection> | ||
27 | #include <NetworkManagerQt/ConnectionSettings> | 27 | #include <NetworkManagerQt/ConnectionSettings> | ||
28 | 28 | | |||
29 | #include <QDialog> | 29 | #include <QDialog> | ||
30 | #include <QVBoxLayout> | 30 | #include <QVBoxLayout> | ||
31 | #include <QDialogButtonBox> | 31 | #include <QDialogButtonBox> | ||
32 | | ||||
33 | #include <KUser> | 32 | #include <KUser> | ||
34 | #include <KAcceleratorManager> | 33 | #include <KAcceleratorManager> | ||
35 | #include <KLocalizedString> | 34 | #include <KLocalizedString> | ||
36 | 35 | | |||
37 | ConnectionWidget::ConnectionWidget(const NetworkManager::ConnectionSettings::Ptr &settings, QWidget* parent, Qt::WindowFlags f): | 36 | ConnectionWidget::ConnectionWidget(const NetworkManager::ConnectionSettings::Ptr &settings, QWidget* parent, Qt::WindowFlags f): | ||
38 | QWidget(parent, f), | 37 | QWidget(parent, f), | ||
39 | m_widget(new Ui::ConnectionWidget), | 38 | m_widget(new Ui::ConnectionWidget), | ||
40 | m_type(settings->connectionType()), | 39 | m_type(settings->connectionType()), | ||
▲ Show 20 Lines • Show All 133 Lines • ▼ Show 20 Line(s) | |||||
174 | 173 | | |||
175 | NMStringMap ConnectionWidget::vpnConnections() const | 174 | NMStringMap ConnectionWidget::vpnConnections() const | ||
176 | { | 175 | { | ||
177 | NetworkManager::Connection::List list = NetworkManager::listConnections(); | 176 | NetworkManager::Connection::List list = NetworkManager::listConnections(); | ||
178 | NMStringMap result; | 177 | NMStringMap result; | ||
179 | 178 | | |||
180 | for (const NetworkManager::Connection::Ptr &conn : list) { | 179 | for (const NetworkManager::Connection::Ptr &conn : list) { | ||
181 | NetworkManager::ConnectionSettings::Ptr conSet = conn->settings(); | 180 | NetworkManager::ConnectionSettings::Ptr conSet = conn->settings(); | ||
182 | if (conSet->connectionType() == NetworkManager::ConnectionSettings::Vpn) { | 181 | if (conSet->connectionType() == NetworkManager::ConnectionSettings::Vpn | ||
182 | || conSet->connectionType() == NetworkManager::ConnectionSettings::WireGuard) { | ||||
183 | // qCDebug(PLASMA_NM) << "Found VPN" << conSet->id() << conSet->uuid(); | 183 | // qCDebug(PLASMA_NM) << "Found VPN" << conSet->id() << conSet->uuid(); | ||
184 | result.insert(conSet->uuid(), conSet->id()); | 184 | result.insert(conSet->uuid(), conSet->id()); | ||
185 | } | 185 | } | ||
186 | } | 186 | } | ||
187 | 187 | | |||
188 | return result; | 188 | return result; | ||
189 | } | 189 | } | ||
190 | 190 | | |||
Show All 20 Lines |