Index: sources/gui/qml/pages/settings/SettingsDeviceRegistration.qml =================================================================== diff -u -rd862dfcd402206e33b314c458e41c13b684a4565 -rb12cc2840bb819c5222bfd3bc2cc5ca6eb4c37fd --- sources/gui/qml/pages/settings/SettingsDeviceRegistration.qml (.../SettingsDeviceRegistration.qml) (revision d862dfcd402206e33b314c458e41c13b684a4565) +++ sources/gui/qml/pages/settings/SettingsDeviceRegistration.qml (.../SettingsDeviceRegistration.qml) (revision b12cc2840bb819c5222bfd3bc2cc5ca6eb4c37fd) @@ -14,7 +14,7 @@ */ // Qt -import QtQuick 2.12 +import QtQuick // Project import Gui.Actions 0.1 @@ -39,24 +39,22 @@ readonly property int spacing : 20 readonly property int leftMargin : 100 readonly property int rightMargin : 150 - readonly property int topMargin : topMarginContent + readonly property int topMargin : 200 readonly property int separatorGap : 40 readonly property string separatorText : ":" property alias isRegistered : _checkListView.completeVisible - property var ipValidator : RegExpValidator { - regExp:/^(([01]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))\.){3}([01]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))$/ + property var ipValidator : RegularExpressionValidator { + regularExpression:/^(([01]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))\.){3}([01]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))$/ } onVisibleChanged: { if ( visible ) vAdjustmentVersions .doAdjustment() } - Column { id : _column + contentItem: Column { id : _column spacing : _root.spacing - y : _root.topMargin - anchors.left : parent.left - anchors.leftMargin : _root.leftMargin + anchors.fill: parent TextEntry { id : _version_UI textInput.clip : true @@ -68,6 +66,7 @@ separator.width : _root.separatorGap textInput.width : _root.entryWidth label.width : _root.labelWidth + anchors.horizontalCenter: parent.horizontalCenter } TextEntry { id : _serial_TD @@ -80,6 +79,7 @@ separator.width : _root.separatorGap textInput.width : _root.entryWidth label.width : _root.labelWidth + anchors.horizontalCenter: parent.horizontalCenter } TextEntry { id : _serial_DD @@ -92,6 +92,7 @@ separator.width : _root.separatorGap textInput.width : _root.entryWidth label.width : _root.labelWidth + anchors.horizontalCenter: parent.horizontalCenter } TextEntry { id : _ipAddress_wlan0 @@ -105,6 +106,7 @@ textInput.width : _root.entryWidth label.width : _root.labelWidth validator : _root.ipValidator + anchors.horizontalCenter: parent.horizontalCenter } TextEntry { id : _ipAddress_eth0 @@ -118,6 +120,7 @@ textInput.width : _root.entryWidth label.width : _root.labelWidth validator : _root.ipValidator + anchors.horizontalCenter: parent.horizontalCenter } } @@ -145,16 +148,16 @@ let mHasNetworkConnection = (_ipAddress_eth0.isValid || _ipAddress_wlan0.isValid) if ( ! mHasNetworkConnection) { _root.notificationText = qsTr("No Network Connection"); return } - let mHasSerials = ( _serial_TD != "" && _serial_DD != "") + let mHasSerials = ( _serial_TD !== "" && _serial_DD !== "") if ( ! mHasSerials ) { _root.notificationText = qsTr("No device Serial" ); return } vCloudSync .doRegister () } // start device registration } Connections { target: vCloudSync - function onisRunningEntered ( vValue ) { _checkListView.checkList.setItemExt( 0, true )} - function onisRegisterStartEntered ( vValue ) { _checkListView.checkList.setItemExt( 1, true )} - function onisRegisterDoneEntered ( vValue ) { _checkListView.checkList.setItemExt( 1, vValue )} + function onIsRunningEntered ( vValue ) { _checkListView.checkList.setItemExt( 0, true )} + function onIsRegisterStartEntered ( vValue ) { _checkListView.checkList.setItemExt( 1, true )} + function onIsRegisterDoneEntered ( vValue ) { _checkListView.checkList.setItemExt( 1, vValue )} } notificationText: ""