Merge lp:~pete-woods/indicator-network/wapi-lp1597681 into lp:indicator-network

Proposed by Pete Woods
Status: Approved
Approved by: Pete Woods
Approved revision: 609
Proposed branch: lp:~pete-woods/indicator-network/wapi-lp1597681
Merge into: lp:indicator-network
Diff against target: 531 lines (+187/-139)
12 files modified
po/indicator-network.pot (+126/-122)
src/agent/SecretAgent.h (+1/-0)
src/agent/SecretRequest.cpp (+5/-2)
src/indicator/menuitems/access-point-item.cpp (+1/-1)
src/indicator/nmofono/wifi/access-point-impl.cpp (+18/-2)
src/indicator/nmofono/wifi/access-point-impl.h (+1/-1)
src/indicator/nmofono/wifi/access-point.h (+10/-1)
src/indicator/nmofono/wifi/grouped-access-point.cpp (+3/-3)
src/indicator/nmofono/wifi/grouped-access-point.h (+1/-1)
src/indicator/nmofono/wifi/wifi-link-impl.cpp (+18/-4)
tests/integration/test-indicator.cpp (+1/-1)
tests/unit/indicator/menuitems/test-access-point-item.cpp (+2/-1)
To merge this branch: bzr merge lp:~pete-woods/indicator-network/wapi-lp1597681
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+299577@code.launchpad.net

Commit message

Add support for new WAPI settings keys

Description of the change

Add support for new WAPI settings keys

To post a comment you must log in.
610. By Pete Woods

Log which URLs are dispatched to USS

Unmerged revisions

610. By Pete Woods

Log which URLs are dispatched to USS

609. By Pete Woods

Add support for new WAPI settings keys

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'po/indicator-network.pot'
--- po/indicator-network.pot 2016-04-29 14:08:19 +0000
+++ po/indicator-network.pot 2016-07-14 10:02:10 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2016-04-29 12:38+0300\n"11"POT-Creation-Date: 2016-07-11 09:50+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -30,72 +30,63 @@
30msgid "WEP"30msgid "WEP"
31msgstr ""31msgstr ""
3232
33#: ../src/agent/SecretRequest.cpp:7433#: ../src/agent/SecretRequest.cpp:70
34msgid "WAPI"
35msgstr ""
36
37#: ../src/agent/SecretRequest.cpp:76
34msgid "Connect"38msgid "Connect"
35msgstr ""39msgstr ""
3640
37#: ../src/agent/SecretRequest.cpp:7541#: ../src/agent/SecretRequest.cpp:77
38msgid "Cancel"42msgid "Cancel"
39msgstr ""43msgstr ""
4044
41#: ../src/indicator/menuitems/wifi-link-item.cpp:10945#: ../src/indicator/vpn-status-notifier.cpp:48
42msgid "Other network…"46msgid "The VPN connection '%1' failed."
43msgstr ""47msgstr ""
4448
45#: ../src/indicator/menuitems/wwan-link-item.cpp:9049#: ../src/indicator/vpn-status-notifier.cpp:50
46msgid "No SIM"50msgid ""
47msgstr ""51"The VPN connection '%1' failed because the network connection was "
4852"interrupted."
49#: ../src/indicator/menuitems/wwan-link-item.cpp:9753msgstr ""
50msgid "SIM Error"54
51msgstr ""55#: ../src/indicator/vpn-status-notifier.cpp:51
5256msgid ""
53#: ../src/indicator/menuitems/wwan-link-item.cpp:10557"The VPN connection '%1' failed because the VPN service stopped unexpectedly."
54msgid "SIM Locked"58msgstr ""
55msgstr ""59
5660#: ../src/indicator/vpn-status-notifier.cpp:52
57#: ../src/indicator/menuitems/wwan-link-item.cpp:11861msgid ""
58msgid "Unregistered"62"The VPN connection '%1' failed because the VPN service returned invalid "
59msgstr ""63"configuration."
6064msgstr ""
61#: ../src/indicator/menuitems/wwan-link-item.cpp:12365
62msgid "Unknown"66#: ../src/indicator/vpn-status-notifier.cpp:53
63msgstr ""67msgid ""
6468"The VPN connection '%1' failed because the connection attempt timed out."
65#: ../src/indicator/menuitems/wwan-link-item.cpp:12869msgstr ""
66msgid "Denied"70
67msgstr ""71#: ../src/indicator/vpn-status-notifier.cpp:54
6872msgid ""
69#: ../src/indicator/menuitems/wwan-link-item.cpp:13373"The VPN connection '%1' failed because the VPN service did not start in time."
70msgid "Searching"74msgstr ""
71msgstr ""75
7276#: ../src/indicator/vpn-status-notifier.cpp:55
73#: ../src/indicator/menuitems/wwan-link-item.cpp:14577msgid "The VPN connection '%1' failed because the VPN service failed to start."
74msgid "No Signal"78msgstr ""
75msgstr ""79
7680#: ../src/indicator/vpn-status-notifier.cpp:56
77#: ../src/indicator/menuitems/wwan-link-item.cpp:15781msgid "The VPN connection '%1' failed because there were no valid VPN secrets."
78#: ../src/indicator/menuitems/wwan-link-item.cpp:16482msgstr ""
79msgid "Offline"83
80msgstr ""84#: ../src/indicator/vpn-status-notifier.cpp:57
8185msgid "The VPN connection '%1' failed because of invalid VPN secrets."
82#. TODO Move this into a new class86msgstr ""
83#: ../src/indicator/factory.cpp:18787
84msgid "Wi-Fi"88#: ../src/indicator/vpn-status-notifier.cpp:68
85msgstr ""89msgid "VPN Connection Failed"
86
87#. TODO Move this into a new class
88#: ../src/indicator/factory.cpp:198
89msgid "Flight Mode"
90msgstr ""
91
92#: ../src/indicator/factory.cpp:208
93msgid "Cellular data"
94msgstr ""
95
96#. TODO Move this into a new class
97#: ../src/indicator/factory.cpp:219
98msgid "Hotspot"
99msgstr ""90msgstr ""
10091
101#: ../src/indicator/sim-unlock-dialog.cpp:14492#: ../src/indicator/sim-unlock-dialog.cpp:144
@@ -186,70 +177,83 @@
186msgid "PIN codes did not match."177msgid "PIN codes did not match."
187msgstr ""178msgstr ""
188179
189#: ../src/indicator/vpn-status-notifier.cpp:48180#: ../src/indicator/nmofono/vpn/vpn-manager.cpp:81
190msgid "The VPN connection '%1' failed."181msgid "VPN connection %1"
191msgstr ""182msgstr ""
192183
193#: ../src/indicator/vpn-status-notifier.cpp:50184#: ../src/indicator/menuitems/wifi-link-item.cpp:109
194msgid ""185msgid "Other network…"
195"The VPN connection '%1' failed because the network connection was "186msgstr ""
196"interrupted."187
197msgstr ""188#: ../src/indicator/menuitems/wwan-link-item.cpp:90
198189msgid "No SIM"
199#: ../src/indicator/vpn-status-notifier.cpp:51190msgstr ""
200msgid ""191
201"The VPN connection '%1' failed because the VPN service stopped unexpectedly."192#: ../src/indicator/menuitems/wwan-link-item.cpp:97
202msgstr ""193msgid "SIM Error"
203194msgstr ""
204#: ../src/indicator/vpn-status-notifier.cpp:52195
205msgid ""196#: ../src/indicator/menuitems/wwan-link-item.cpp:105
206"The VPN connection '%1' failed because the VPN service returned invalid "197msgid "SIM Locked"
207"configuration."198msgstr ""
208msgstr ""199
209200#: ../src/indicator/menuitems/wwan-link-item.cpp:118
210#: ../src/indicator/vpn-status-notifier.cpp:53201msgid "Unregistered"
211msgid ""202msgstr ""
212"The VPN connection '%1' failed because the connection attempt timed out."203
213msgstr ""204#: ../src/indicator/menuitems/wwan-link-item.cpp:123
214205msgid "Unknown"
215#: ../src/indicator/vpn-status-notifier.cpp:54206msgstr ""
216msgid ""207
217"The VPN connection '%1' failed because the VPN service did not start in time."208#: ../src/indicator/menuitems/wwan-link-item.cpp:128
218msgstr ""209msgid "Denied"
219210msgstr ""
220#: ../src/indicator/vpn-status-notifier.cpp:55211
221msgid "The VPN connection '%1' failed because the VPN service failed to start."212#: ../src/indicator/menuitems/wwan-link-item.cpp:133
222msgstr ""213msgid "Searching"
223214msgstr ""
224#: ../src/indicator/vpn-status-notifier.cpp:56215
225msgid "The VPN connection '%1' failed because there were no valid VPN secrets."216#: ../src/indicator/menuitems/wwan-link-item.cpp:145
226msgstr ""217msgid "No Signal"
227218msgstr ""
228#: ../src/indicator/vpn-status-notifier.cpp:57219
229msgid "The VPN connection '%1' failed because of invalid VPN secrets."220#: ../src/indicator/menuitems/wwan-link-item.cpp:157
230msgstr ""221#: ../src/indicator/menuitems/wwan-link-item.cpp:164
231222msgid "Offline"
232#: ../src/indicator/vpn-status-notifier.cpp:68223msgstr ""
233msgid "VPN Connection Failed"224
234msgstr ""225#. TRANSLATORS: this is the indicator title shown on the top header of the indicator area
235226#: ../src/indicator/root-state.cpp:306
236#: ../src/indicator/sections/wwan-section.cpp:99227msgid "Network"
228msgstr ""
229
230#. TODO Move this into a new class
231#: ../src/indicator/factory.cpp:187
232msgid "Wi-Fi"
233msgstr ""
234
235#. TODO Move this into a new class
236#: ../src/indicator/factory.cpp:198
237msgid "Flight Mode"
238msgstr ""
239
240#: ../src/indicator/factory.cpp:208
241msgid "Cellular data"
242msgstr ""
243
244#. TODO Move this into a new class
245#: ../src/indicator/factory.cpp:221
246msgid "Hotspot"
247msgstr ""
248
249#: ../src/indicator/sections/wwan-section.cpp:102
237msgid "Cellular settings…"250msgid "Cellular settings…"
238msgstr ""251msgstr ""
239252
253#: ../src/indicator/sections/wifi-section.cpp:65
254msgid "Wi-Fi settings…"
255msgstr ""
256
240#: ../src/indicator/sections/vpn-section.cpp:140257#: ../src/indicator/sections/vpn-section.cpp:140
241msgid "VPN settings…"258msgid "VPN settings…"
242msgstr ""259msgstr ""
243
244#: ../src/indicator/sections/wifi-section.cpp:65
245msgid "Wi-Fi settings…"
246msgstr ""
247
248#. TRANSLATORS: this is the indicator title shown on the top header of the indicator area
249#: ../src/indicator/root-state.cpp:306
250msgid "Network"
251msgstr ""
252
253#: ../src/indicator/nmofono/vpn/vpn-manager.cpp:81
254msgid "VPN connection %1"
255msgstr ""
256260
=== modified file 'src/agent/SecretAgent.h'
--- src/agent/SecretAgent.h 2016-02-15 09:31:38 +0000
+++ src/agent/SecretAgent.h 2016-07-14 10:02:10 +0000
@@ -90,6 +90,7 @@
90 static constexpr char const* NM_KEY_MGMT_WPA_NONE = "wpa-none";90 static constexpr char const* NM_KEY_MGMT_WPA_NONE = "wpa-none";
91 static constexpr char const* NM_KEY_MGMT_WPA_PSK = "wpa-psk";91 static constexpr char const* NM_KEY_MGMT_WPA_PSK = "wpa-psk";
92 static constexpr char const* NM_KEY_MGMT_NONE = "none";92 static constexpr char const* NM_KEY_MGMT_NONE = "none";
93 static constexpr char const* NM_KEY_MGMT_WAPI_PSK = "wapi-psk";
9394
94 explicit SecretAgent(std::shared_ptr<notify::NotificationManager> notificationManager,95 explicit SecretAgent(std::shared_ptr<notify::NotificationManager> notificationManager,
95 CredentialStore::SPtr credentialStore,96 CredentialStore::SPtr credentialStore,
9697
=== modified file 'src/agent/SecretRequest.cpp'
--- src/agent/SecretRequest.cpp 2016-02-15 09:31:38 +0000
+++ src/agent/SecretRequest.cpp 2016-07-14 10:02:10 +0000
@@ -66,7 +66,9 @@
66 subject = _("WPA");66 subject = _("WPA");
67 } else if (keyMgmt == SecretAgent::NM_KEY_MGMT_NONE) {67 } else if (keyMgmt == SecretAgent::NM_KEY_MGMT_NONE) {
68 subject = _("WEP");68 subject = _("WEP");
69 }69 } else if (keyMgmt == SecretAgent::NM_KEY_MGMT_WAPI_PSK) {
70 subject = _("WAPI");
71 }
7072
71 m_notification = m_secretAgent.notifications()->notify(73 m_notification = m_secretAgent.notifications()->notify(
72 title.arg(conn[SecretAgent::NM_CONNECTION_ID].toString()), subject,74 title.arg(conn[SecretAgent::NM_CONNECTION_ID].toString()), subject,
@@ -104,7 +106,8 @@
104 wirelessSecurity->value(SecretAgent::NM_WIRELESS_SECURITY_KEY_MGMT).toString());106 wirelessSecurity->value(SecretAgent::NM_WIRELESS_SECURITY_KEY_MGMT).toString());
105107
106 if (keyMgmt == SecretAgent::NM_KEY_MGMT_WPA_NONE108 if (keyMgmt == SecretAgent::NM_KEY_MGMT_WPA_NONE
107 || keyMgmt == SecretAgent::NM_KEY_MGMT_WPA_PSK) {109 || keyMgmt == SecretAgent::NM_KEY_MGMT_WPA_PSK
110 || keyMgmt == SecretAgent::NM_KEY_MGMT_WAPI_PSK) {
108 wirelessSecurity->insert(SecretAgent::NM_WIRELESS_SECURITY_PSK, key);111 wirelessSecurity->insert(SecretAgent::NM_WIRELESS_SECURITY_PSK, key);
109 } else if (keyMgmt == SecretAgent::NM_KEY_MGMT_NONE) {112 } else if (keyMgmt == SecretAgent::NM_KEY_MGMT_NONE) {
110 wirelessSecurity->insert(SecretAgent::NM_WIRELESS_SECURITY_WEP_KEY0, key);113 wirelessSecurity->insert(SecretAgent::NM_WIRELESS_SECURITY_WEP_KEY0, key);
111114
=== modified file 'src/indicator/menuitems/access-point-item.cpp'
--- src/indicator/menuitems/access-point-item.cpp 2015-10-06 10:14:57 +0000
+++ src/indicator/menuitems/access-point-item.cpp 2016-07-14 10:02:10 +0000
@@ -61,7 +61,7 @@
61 m_item->setAttribute("x-canonical-type", TypedVariant<std::string>("unity.widgets.systemsettings.tablet.accesspoint"));61 m_item->setAttribute("x-canonical-type", TypedVariant<std::string>("unity.widgets.systemsettings.tablet.accesspoint"));
62 m_item->setAttribute("x-canonical-wifi-ap-is-adhoc", TypedVariant<bool>(m_accessPoint->adhoc()));62 m_item->setAttribute("x-canonical-wifi-ap-is-adhoc", TypedVariant<bool>(m_accessPoint->adhoc()));
63 m_item->setAttribute("x-canonical-wifi-ap-is-secure", TypedVariant<bool>(m_accessPoint->secured()));63 m_item->setAttribute("x-canonical-wifi-ap-is-secure", TypedVariant<bool>(m_accessPoint->secured()));
64 m_item->setAttribute("x-canonical-wifi-ap-is-enterprise", TypedVariant<bool>(m_accessPoint->enterprise()));64 m_item->setAttribute("x-canonical-wifi-ap-is-enterprise", TypedVariant<bool>(m_accessPoint->keyManagementType() != wifi::AccessPoint::KeyManagementType::psk));
65 m_item->setAttribute("x-canonical-wifi-ap-strength-action", TypedVariant<std::string>(("indicator." + strengthActionId).toStdString()));65 m_item->setAttribute("x-canonical-wifi-ap-strength-action", TypedVariant<std::string>(("indicator." + strengthActionId).toStdString()));
6666
67 m_actionStrength = std::make_shared<Action>(strengthActionId,67 m_actionStrength = std::make_shared<Action>(strengthActionId,
6868
=== modified file 'src/indicator/nmofono/wifi/access-point-impl.cpp'
--- src/indicator/nmofono/wifi/access-point-impl.cpp 2015-07-06 12:59:21 +0000
+++ src/indicator/nmofono/wifi/access-point-impl.cpp 2016-07-14 10:02:10 +0000
@@ -22,6 +22,10 @@
22#include <QTextCodec>22#include <QTextCodec>
23#include <NetworkManager.h>23#include <NetworkManager.h>
2424
25#ifndef NM_802_11_AP_SEC_KEY_MGMT_WAPI_CERT
26#define NM_802_11_AP_SEC_KEY_MGMT_WAPI_CERT 0x00002000
27#endif
28
25namespace nmofono {29namespace nmofono {
26namespace wifi {30namespace wifi {
2731
@@ -116,9 +120,21 @@
116 return m_raw_ssid;120 return m_raw_ssid;
117}121}
118122
119bool AccessPointImpl::enterprise() const123AccessPoint::KeyManagementType AccessPointImpl::keyManagementType() const
120{124{
121 return (m_secflags & NM_802_11_AP_SEC_KEY_MGMT_802_1X) > 0;125 if ((m_secflags & NM_802_11_AP_SEC_KEY_MGMT_802_1X) > 0)
126 {
127 return KeyManagementType::ieee8021x;
128 }
129 else if ((m_secflags & NM_802_11_AP_SEC_KEY_MGMT_802_1X) > 0)
130 {
131 return KeyManagementType::wpa_eap;
132 }
133 else if ((m_secflags & NM_802_11_AP_SEC_KEY_MGMT_WAPI_CERT) > 0)
134 {
135 return KeyManagementType::wapi_cert;
136 }
137 return KeyManagementType::psk;
122}138}
123139
124bool AccessPointImpl::secured() const140bool AccessPointImpl::secured() const
125141
=== modified file 'src/indicator/nmofono/wifi/access-point-impl.h'
--- src/indicator/nmofono/wifi/access-point-impl.h 2015-07-06 12:59:21 +0000
+++ src/indicator/nmofono/wifi/access-point-impl.h 2016-07-14 10:02:10 +0000
@@ -90,7 +90,7 @@
90 std::uint32_t mode() const;90 std::uint32_t mode() const;
9191
92 bool secured() const override;92 bool secured() const override;
93 bool enterprise() const override;93 KeyManagementType keyManagementType() const override;
94 bool adhoc() const override;94 bool adhoc() const override;
9595
96 QDBusObjectPath object_path() const override;96 QDBusObjectPath object_path() const override;
9797
=== modified file 'src/indicator/nmofono/wifi/access-point.h'
--- src/indicator/nmofono/wifi/access-point.h 2015-07-06 12:59:21 +0000
+++ src/indicator/nmofono/wifi/access-point.h 2016-07-14 10:02:10 +0000
@@ -37,8 +37,17 @@
37AccessPoint: public QObject37AccessPoint: public QObject
38{38{
39 Q_OBJECT39 Q_OBJECT
40 Q_ENUMS(EnterpriseType)
4041
41public:42public:
43 enum KeyManagementType
44 {
45 psk,
46 ieee8021x,
47 wpa_eap,
48 wapi_cert
49 };
50
42 typedef std::shared_ptr<AccessPoint> Ptr;51 typedef std::shared_ptr<AccessPoint> Ptr;
43 AccessPoint();52 AccessPoint();
44 virtual ~AccessPoint();53 virtual ~AccessPoint();
@@ -54,7 +63,7 @@
54 virtual QByteArray raw_ssid() const = 0;63 virtual QByteArray raw_ssid() const = 0;
55 virtual QDBusObjectPath object_path() const = 0;64 virtual QDBusObjectPath object_path() const = 0;
56 virtual bool secured() const = 0;65 virtual bool secured() const = 0;
57 virtual bool enterprise() const = 0;66 virtual KeyManagementType keyManagementType() const = 0;
58 virtual bool adhoc() const = 0;67 virtual bool adhoc() const = 0;
5968
60Q_SIGNALS:69Q_SIGNALS:
6170
=== modified file 'src/indicator/nmofono/wifi/grouped-access-point.cpp'
--- src/indicator/nmofono/wifi/grouped-access-point.cpp 2015-07-06 12:59:21 +0000
+++ src/indicator/nmofono/wifi/grouped-access-point.cpp 2016-07-14 10:02:10 +0000
@@ -199,14 +199,14 @@
199 return p->aplist.at(0)->secured();199 return p->aplist.at(0)->secured();
200}200}
201201
202bool GroupedAccessPoint::enterprise() const202AccessPoint::KeyManagementType GroupedAccessPoint::keyManagementType() const
203{203{
204 if (p->aplist.empty())204 if (p->aplist.empty())
205 {205 {
206 return false;206 return KeyManagementType::psk;
207 }207 }
208208
209 return p->aplist.at(0)->enterprise();209 return p->aplist.at(0)->keyManagementType();
210}210}
211211
212bool GroupedAccessPoint::adhoc() const212bool GroupedAccessPoint::adhoc() const
213213
=== modified file 'src/indicator/nmofono/wifi/grouped-access-point.h'
--- src/indicator/nmofono/wifi/grouped-access-point.h 2015-07-06 12:59:21 +0000
+++ src/indicator/nmofono/wifi/grouped-access-point.h 2016-07-14 10:02:10 +0000
@@ -54,7 +54,7 @@
54 QByteArray raw_ssid() const override;54 QByteArray raw_ssid() const override;
5555
56 bool secured() const override;56 bool secured() const override;
57 bool enterprise() const override;57 KeyManagementType keyManagementType() const override;
58 bool adhoc() const override;58 bool adhoc() const override;
5959
60 QDBusObjectPath object_path() const override;60 QDBusObjectPath object_path() const override;
6161
=== modified file 'src/indicator/nmofono/wifi/wifi-link-impl.cpp'
--- src/indicator/nmofono/wifi/wifi-link-impl.cpp 2016-05-26 13:51:39 +0000
+++ src/indicator/nmofono/wifi/wifi-link-impl.cpp 2016-07-14 10:02:10 +0000
@@ -486,17 +486,31 @@
486 QDBusObjectPath(d->m_dev->path()),486 QDBusObjectPath(d->m_dev->path()),
487 accessPoint->object_path());487 accessPoint->object_path());
488 } else {488 } else {
489 if (accessPoint->enterprise()) {489 auto keyManagementType = accessPoint->keyManagementType();
490 if (keyManagementType != AccessPoint::KeyManagementType::psk) {
490 qDebug() << "New connection to enterprise access point";491 qDebug() << "New connection to enterprise access point";
492
493 const static QMap<AccessPoint::KeyManagementType, QString> typeMap {
494 {AccessPoint::KeyManagementType::ieee8021x, "ieee8021x"},
495 {AccessPoint::KeyManagementType::wpa_eap, "wpa-eap"},
496 {AccessPoint::KeyManagementType::wapi_cert, "wapi-cert"},
497 };
498
491 // activate system settings URI499 // activate system settings URI
492 QUrlQuery q;500 QUrlQuery q;
493 q.addQueryItem("ssid", accessPoint->raw_ssid());501 q.addQueryItem("ssid", accessPoint->raw_ssid());
494 q.addQueryItem("bssid", accessPoint->bssid());502 q.addQueryItem("bssid", accessPoint->bssid());
503 q.addQueryItem("key-mgmt", typeMap[keyManagementType]);
495 QString url = "settings:///system/wifi?" + q.query(QUrl::FullyEncoded);504 QString url = "settings:///system/wifi?" + q.query(QUrl::FullyEncoded);
496505
497 UrlDispatcher::send(url.toStdString(), [](string url, bool success) {506 UrlDispatcher::send(url.toStdString(), [](string url, bool success) {
498 if (!success) {507 if (success)
499 cerr << "URL Dispatcher failed on " << url << endl;508 {
509 qDebug() << "Activated URL for USS" << QString::fromStdString(url);
510 }
511 else
512 {
513 qDebug() << "URL Dispatcher failed on" << QString::fromStdString(url);
500 }514 }
501 });515 });
502 } else {516 } else {
@@ -516,7 +530,7 @@
516 }530 }
517 }531 }
518 // For enterprise access points, the system settings app will perform the connection532 // For enterprise access points, the system settings app will perform the connection
519 if (!accessPoint->enterprise()) {533 if (accessPoint->keyManagementType() == AccessPoint::KeyManagementType::psk) {
520 d->updateActiveConnection(ac);534 d->updateActiveConnection(ac);
521 }535 }
522 d->m_connecting = false;536 d->m_connecting = false;
523537
=== modified file 'tests/integration/test-indicator.cpp'
--- tests/integration/test-indicator.cpp 2016-06-13 10:57:46 +0000
+++ tests/integration/test-indicator.cpp 2016-07-14 10:02:10 +0000
@@ -2006,7 +2006,7 @@
2006 << QVariant("DispatchURL")2006 << QVariant("DispatchURL")
2007 << QVariant(2007 << QVariant(
2008 QVariantList()2008 QVariantList()
2009 << QVariant("settings:///system/wifi?ssid=ABC&bssid=11:22:33:44:55:66")2009 << QVariant("settings:///system/wifi?ssid=ABC&bssid=11:22:33:44:55:66&key-mgmt=wpa-eap")
2010 << QVariant("")2010 << QVariant("")
2011 )2011 )
2012 );2012 );
20132013
=== modified file 'tests/unit/indicator/menuitems/test-access-point-item.cpp'
--- tests/unit/indicator/menuitems/test-access-point-item.cpp 2015-10-06 10:14:57 +0000
+++ tests/unit/indicator/menuitems/test-access-point-item.cpp 2016-07-14 10:02:10 +0000
@@ -48,7 +48,7 @@
4848
49 MOCK_CONST_METHOD0(secured, bool());49 MOCK_CONST_METHOD0(secured, bool());
5050
51 MOCK_CONST_METHOD0(enterprise, bool());51 MOCK_CONST_METHOD0(keyManagementType, KeyManagementType());
5252
53 MOCK_CONST_METHOD0(adhoc, bool());53 MOCK_CONST_METHOD0(adhoc, bool());
5454
@@ -68,6 +68,7 @@
68 ON_CALL(*accessPoint, ssid()).WillByDefault(Return(QString("the ssid")));68 ON_CALL(*accessPoint, ssid()).WillByDefault(Return(QString("the ssid")));
69 ON_CALL(*accessPoint, secured()).WillByDefault(Return(true));69 ON_CALL(*accessPoint, secured()).WillByDefault(Return(true));
70 ON_CALL(*accessPoint, adhoc()).WillByDefault(Return(false));70 ON_CALL(*accessPoint, adhoc()).WillByDefault(Return(false));
71 ON_CALL(*accessPoint, keyManagementType()).WillByDefault(Return(wifi::AccessPoint::KeyManagementType::psk));
71 ON_CALL(*accessPoint, strength()).WillByDefault(Return(70.0));72 ON_CALL(*accessPoint, strength()).WillByDefault(Return(70.0));
7273
73 auto accessPointItem = make_shared<AccessPointItem>(accessPoint);74 auto accessPointItem = make_shared<AccessPointItem>(accessPoint);

Subscribers

People subscribed via source and target branches