From 2215248c450b6bd3f728e813f289f099d4301523 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Thu, 26 Apr 2018 11:57:16 +0300 Subject: Add support for wi-fi networks with hidden SSID Task-number: QTBUG-62661 Change-Id: I894f37d2ac397ca2a10db92b1daec9997a9733bb Reviewed-by: Teemu Holappa --- src/settingsui/network/PassphraseEnter.qml | 34 ++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'src/settingsui/network/PassphraseEnter.qml') diff --git a/src/settingsui/network/PassphraseEnter.qml b/src/settingsui/network/PassphraseEnter.qml index 1881866..1ed8d92 100644 --- a/src/settingsui/network/PassphraseEnter.qml +++ b/src/settingsui/network/PassphraseEnter.qml @@ -38,6 +38,7 @@ Rectangle { color: viewSettings.backgroundColor opacity: 0.9 property string extraInfo: "" + property bool showSsid: false Rectangle { id: frame @@ -53,6 +54,27 @@ Rectangle { anchors.centerIn: parent spacing: viewSettings.spacing + Text { + visible: showSsid + font.pixelSize: pluginMain.subTitleFontSize + font.family: appFont + color: "white" + text: qsTr("Enter SSID") + } + + TextField { + id: ssidField + visible: showSsid + width: root.width * 0.4 + height: root.height * 0.075 + color: "white" + background: Rectangle{ + color: "transparent" + border.color: ssidField.focus ? viewSettings.buttonGreenColor : viewSettings.buttonGrayColor + border.width: ssidField.focus ? width * 0.01 : 2 + } + } + Text { font.pixelSize: pluginMain.subTitleFontSize font.family: appFont @@ -87,7 +109,12 @@ Rectangle { id: setButton text: qsTr("SET") onClicked: { - NetworkSettingsManager.userAgent.setPassphrase(passField.text) + if (showSsid) { + NetworkSettingsManager.connectBySsid(ssidField.text, passField.text) + showSsid = false + } else { + NetworkSettingsManager.userAgent.setPassphrase(passField.text) + } passphrasePopup.visible = false; } } @@ -97,7 +124,10 @@ Rectangle { borderColor: "transparent" fillColor: viewSettings.buttonGrayColor onClicked: { - NetworkSettingsManager.userAgent.cancelInput() + if (!showSsid) { + NetworkSettingsManager.userAgent.cancelInput() + } + showSsid = false passphrasePopup.visible = false; } } -- cgit v1.2.3