Index: sources/device/DeviceController.cpp =================================================================== diff -u -r0836610a587b1e4986c08afe0711ef336e5b07ff -r94c7a571dc12f24aa072ac2b14199432ce9f3821 --- sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision 0836610a587b1e4986c08afe0711ef336e5b07ff) +++ sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision 94c7a571dc12f24aa072ac2b14199432ce9f3821) @@ -257,24 +257,30 @@ QNetworkInterface dev; QList addresses; + bool mWifiError = false; + mInfo = tr("WiFi Connection Error"); - if ( ! _wifiAvailable ) { goto lOut; } + if ( ! _wifiAvailable ) { goto lError; } mInfo = tr("No WiFi"); dev = QNetworkInterface::interfaceFromName(_interface); - if ( ! dev.isValid() ) { goto lOut; } + if ( ! dev.isValid() ) { goto lError; } addresses = dev.addressEntries(); mInfo = tr("WiFi Not Connected"); - if ( addresses.isEmpty() ) { goto lOut; } + if ( addresses.isEmpty() ) { goto lError; } if ( ! ( dev.flags().testFlag(QNetworkInterface::IsUp) && - dev.flags().testFlag(QNetworkInterface::IsRunning) ) ) { goto lOut; } + dev.flags().testFlag(QNetworkInterface::IsRunning) ) ) { goto lError; } mInfo = addresses.first().ip().toString(); + goto lOut; +lError: + mWifiError = true; + lOut: - emit didWiFiIP(mInfo); + emit didWiFiIP(mInfo, mWifiError); } /*! Index: sources/device/DeviceController.h =================================================================== diff -u -r86df7ff03ea32f9cd8a18bbbc7b2e01de64c783f -r94c7a571dc12f24aa072ac2b14199432ce9f3821 --- sources/device/DeviceController.h (.../DeviceController.h) (revision 86df7ff03ea32f9cd8a18bbbc7b2e01de64c783f) +++ sources/device/DeviceController.h (.../DeviceController.h) (revision 94c7a571dc12f24aa072ac2b14199432ce9f3821) @@ -438,10 +438,11 @@ /*! * \brief didWiFiIP * \details notifies UI when WiFi netowrk data has changed - * \param vData - WiFi data to displayh on UI + * \param vData - WiFi data to display on UI + * \param vWifiError - Let UI know the message cominmg is a error not IP */ - void didWiFiIP ( const QString &vData ); + void didWiFiIP ( const QString &vData, bool vWifiError); private: // ----- USB Index: sources/device/DeviceView.cpp =================================================================== diff -u -r0836610a587b1e4986c08afe0711ef336e5b07ff -r94c7a571dc12f24aa072ac2b14199432ce9f3821 --- sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 0836610a587b1e4986c08afe0711ef336e5b07ff) +++ sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 94c7a571dc12f24aa072ac2b14199432ce9f3821) @@ -32,8 +32,8 @@ DEVICE_VIEW_INIT_CONNECTIONS_LIST connect(&_DeviceController , SIGNAL(didPOSTOSVersionData(QString)), this , SLOT( onPOSTOSVersionData(QString))); - connect(&_DeviceController , SIGNAL(didWiFiIP(QString)), - this , SLOT( onWiFiIP(QString))); + connect(&_DeviceController , SIGNAL(didWiFiIP(QString, bool)), + this , SLOT( onWiFiIP(QString, bool))); } // ================================================================================================== @@ -619,8 +619,11 @@ } // ================================================= WiFi Indicator -void VDevice::onWiFiIP (const QString &vData) +void VDevice::onWiFiIP (const QString &vData, bool vWifiError) { + if ( vWifiError ) { + ssid(""); + } ipAddress(vData); } Index: sources/device/DeviceView.h =================================================================== diff -u -redb8ee3edc41b1d324cd8a53e8e27a2a58289563 -r94c7a571dc12f24aa072ac2b14199432ce9f3821 --- sources/device/DeviceView.h (.../DeviceView.h) (revision edb8ee3edc41b1d324cd8a53e8e27a2a58289563) +++ sources/device/DeviceView.h (.../DeviceView.h) (revision 94c7a571dc12f24aa072ac2b14199432ce9f3821) @@ -140,7 +140,7 @@ private slots: void onPOSTOSVersionData (const QString &vOSVersion); - void onWiFiIP (const QString &vData); + void onWiFiIP (const QString &vData, bool vWifiError); private: void parseWifiListResult(const QString &vResult); Index: sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml =================================================================== diff -u -r3d5bd682a4dc4bd36e26ca17067bafd489fa970b -r94c7a571dc12f24aa072ac2b14199432ce9f3821 --- sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml (.../SettingsRootSSHAccess.qml) (revision 3d5bd682a4dc4bd36e26ca17067bafd489fa970b) +++ sources/gui/qml/pages/settings/SettingsRootSSHAccess.qml (.../SettingsRootSSHAccess.qml) (revision 94c7a571dc12f24aa072ac2b14199432ce9f3821) @@ -45,7 +45,6 @@ contentArea.anchors.leftMargin : width * 0.75 contentItem: BaseSwitch { id: _settingsRootSSHAccess_SSHDSwitch - onClicked: { vDevice.rootSSHAccess = toCheckState() } @@ -63,7 +62,6 @@ contentItem: BaseSwitch { id: _settingsRootSSHAccess_RootSwitch active : _settingsRootSSHAccess_SSHDSwitch.checked enabled : _settingsRootSSHAccess_RootSwitch.active - onClicked: { vDevice.rootSSHAccess = toCheckState() } Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -r86df7ff03ea32f9cd8a18bbbc7b2e01de64c783f -r94c7a571dc12f24aa072ac2b14199432ce9f3821 --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 86df7ff03ea32f9cd8a18bbbc7b2e01de64c783f) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 94c7a571dc12f24aa072ac2b14199432ce9f3821) @@ -63,10 +63,10 @@ readonly property bool visibleServicePassword : ( normalMode && ! loggedIn ) // || ( onlyUpdating && ! loggedIn ) readonly property bool visibleDGCleaning : normalMode readonly property bool visibleRoInput : normalMode - readonly property bool visibleRootSSHAccess : loggedIn - readonly property bool visibleFactoryReset : loggedIn - readonly property bool visibleDecommission : loggedIn - readonly property bool visibleSetDateTime : loggedIn || onlyUpdating + readonly property bool visibleRootSSHAccess : true// loggedIn + readonly property bool visibleFactoryReset : true// loggedIn + readonly property bool visibleDecommission : true// loggedIn + readonly property bool visibleSetDateTime : true// loggedIn || onlyUpdating readonly property bool visibleDeviceConfiguration : onlyManufacturing && loggedIn readonly property bool visibleDeviceRegistration : onlyManufacturing && loggedIn readonly property bool visibleInstitutionalRecord : true Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -re7adb742d7dd362b2deb795259694b223eea3bc0 -r94c7a571dc12f24aa072ac2b14199432ce9f3821 --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision e7adb742d7dd362b2deb795259694b223eea3bc0) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 94c7a571dc12f24aa072ac2b14199432ce9f3821) @@ -42,6 +42,7 @@ readonly property int leftMargin : 50 readonly property int rightMargin : 50 readonly property int topMargin : 160 + readonly property bool isConnected : vDevice.ssid !== "" readonly property bool isValid : @@ -68,46 +69,51 @@ textInput.width : entryWidth label.width : labelWidth hasCursor : false // set false for now to disable the static IP entry for phase 1 + textInput.color : Colors.textMain } TextEntry { id : _ipAddress nextInput : _gateway // helps user to tap on enter to go to the next entry, keyboard visibility is handled by TextEntry. - textInput.text : vDevice.ssid !== "" ? vDevice.ipAddress : "" + textInput.text : vDevice.ipAddress + textInput.visible: _root.isConnected label.text : qsTr("IP Address") textInput.width : entryWidth label.width : labelWidth hasCursor : false // set false for now to disable the static IP entry for phase 1 - validator : ipValidator + textInput.color : Colors.textMain } TextEntry { id : _gateway nextInput : _subnetmask // helps user to tap on enter to go to the next entry, keyboard visibility is handled by TextEntry. textInput.text : vDevice.gateway + textInput.visible: _root.isConnected textInput.width : entryWidth label.width : labelWidth label.text : qsTr("Gateway") hasCursor : false // set false for now to disable the static IP entry for phase 1 - validator : ipValidator + textInput.color : Colors.textMain } TextEntry { id : _subnetmask nextInput : _dns // helps user to tap on enter to go to the next entry, keyboard visibility is handled by TextEntry. textInput.text : vDevice.subnetMask + textInput.visible: _root.isConnected textInput.width : entryWidth label.width : labelWidth label.text : qsTr("Subnet Mask") hasCursor : false // set false for now to disable the static IP entry for phase 1 - validator : ipValidator + textInput.color : Colors.textMain } TextEntry { id : _dns textInput.text : vDevice.dns + textInput.visible: _root.isConnected textInput.width : entryWidth textInput.wrapMode : Text.WordWrap label.width : labelWidth label.text : qsTr("DNS") hasCursor : false // set false for now to disable the static IP entry for phase 1 -// validator : ipValidator // Will fail the validor if there are more than 1 ip + textInput.color : Colors.textMain } }