diff --git a/Linphone/view/Control/Display/Meeting/MeetingListView.qml b/Linphone/view/Control/Display/Meeting/MeetingListView.qml index 60090a4e..37537e7d 100644 --- a/Linphone/view/Control/Display/Meeting/MeetingListView.qml +++ b/Linphone/view/Control/Display/Meeting/MeetingListView.qml @@ -65,7 +65,7 @@ ListView { height: 63 * DefaultStyle.dp + topOffset width: mainItem.width property var previousItem : mainItem.model.count > 0 && index > 0 ? mainItem.model.getAt(index-1) : null - property var dateTime: $modelData && $modelData.core.haveModel ? $modelData.core.dateTime : UtilsCpp.getCurrentDateTime() + property var dateTime: !!$modelData && $modelData.core.haveModel ? $modelData.core.dateTime : UtilsCpp.getCurrentDateTime() property string day : UtilsCpp.toDateDayNameString(dateTime) property string dateString: UtilsCpp.toDateString(dateTime) property string previousDateString: previousItem ? UtilsCpp.toDateString(previousItem.core ? previousItem.core.dateTimeUtc : UtilsCpp.getCurrentDateTimeUtc()) : '' diff --git a/Linphone/view/Control/Input/DecoratedTextField.qml b/Linphone/view/Control/Input/DecoratedTextField.qml index 90bf4607..3d9c7622 100644 --- a/Linphone/view/Control/Input/DecoratedTextField.qml +++ b/Linphone/view/Control/Input/DecoratedTextField.qml @@ -16,6 +16,7 @@ FormItemLayout { property var placeHolder property bool useTitleAsPlaceHolder: true property bool canBeEmpty: true + property bool toValidate: false property alias hidden: textField.hidden property alias validator: textField.validator @@ -33,6 +34,7 @@ FormItemLayout { propertyOwner: mainItem.propertyOwner canBeEmpty: mainItem.canBeEmpty isValid: mainItem.isValid + toValidate: mainItem.toValidate onValidationChecked: (isValid) => { if (isValid) return if (!canBeEmpty && empty) { diff --git a/Linphone/view/Control/Input/TextField.qml b/Linphone/view/Control/Input/TextField.qml index 895f8d80..05725ca9 100644 --- a/Linphone/view/Control/Input/TextField.qml +++ b/Linphone/view/Control/Input/TextField.qml @@ -41,6 +41,7 @@ Control.TextField { property var isValid: function(text) { return true } + property bool toValidate: false property int idleTimeOut: 200 property bool empty: mainItem.propertyOwner!= undefined && mainItem.propertyOwner[mainItem.propertyName]?.length == 0 property bool canBeEmpty: true @@ -150,7 +151,10 @@ Control.TextField { updateText() } onTextChanged: { - idleTimer.restart() + if(mainItem.toValidate) { + // Restarting + idleTimer.restart() + } // updateText() } function updateText() { diff --git a/Linphone/view/Page/Form/Contact/ContactEdition.qml b/Linphone/view/Page/Form/Contact/ContactEdition.qml index a9b73f78..79513670 100644 --- a/Linphone/view/Page/Form/Contact/ContactEdition.qml +++ b/Linphone/view/Page/Form/Contact/ContactEdition.qml @@ -154,7 +154,7 @@ MainRightPanel { initialText: contact.core.givenName onTextEdited: contact.core.givenName = text backgroundColor: DefaultStyle.grey_0 - backgroundBorderColor: givenName.errorTextItem.opacity != 0 ? DefaultStyle.danger_500main : DefaultStyle.grey_200 + backgroundBorderColor: givenName.errorTextVisible ? DefaultStyle.danger_500main : DefaultStyle.grey_200 KeyNavigation.up: editButton.visible ? editButton : addPictureButton KeyNavigation.down: nameTextField } diff --git a/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml b/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml index 3b31b721..ac7053a8 100644 --- a/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml @@ -154,6 +154,7 @@ AbstractSettingsLayout { onEditingFinished: { if (text.length != 0) model.core.displayName = text } + toValidate: true } Text { text: qsTr("Indicatif international*") diff --git a/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml b/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml index 139c8170..58a45210 100644 --- a/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml @@ -51,6 +51,7 @@ AbstractSettingsLayout { propertyOwner: account.core title: qsTr("URI du serveur de messagerie vocale") isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } + toValidate: true } Item { Layout.fillHeight: true @@ -104,12 +105,14 @@ AbstractSettingsLayout { entries: account.core.transports propertyName: "transport" propertyOwner: account.core + toValidate: true } DecoratedTextField { title: qsTr("URL du serveur mandataire") propertyName: "serverAddress" propertyOwner: account.core isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } + toValidate: true } SwitchSetting { titleText: qsTr("Serveur mandataire sortant") @@ -121,6 +124,7 @@ AbstractSettingsLayout { propertyOwner: account.core title: qsTr("Adresse du serveur STUN") isValid: function(text) { return UtilsCpp.isValidIPAddress(text) || UtilsCpp.isValidHostname(text); } + toValidate: true } SwitchSetting { titleText: qsTr("Activer ICE") @@ -143,12 +147,14 @@ AbstractSettingsLayout { title: qsTr("Expiration (en seconde)") canBeEmpty: false isValid: function(text) { return !isNaN(Number(text)); } + toValidate: true } DecoratedTextField { title: qsTr("URI de l’usine à conversations") propertyName: "conferenceFactoryAddress" propertyOwner: account.core isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } + toValidate: true } DecoratedTextField { title: qsTr("URI de l’usine à réunions") @@ -156,12 +162,14 @@ AbstractSettingsLayout { propertyOwner: account.core isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } visible: !SettingsCpp.disableMeetingsFeature + toValidate: true } DecoratedTextField { title: qsTr("URL du serveur d’échange de clés de chiffrement") propertyName: "limeServerUrl" propertyOwner: account.core isValid: function(text) { return UtilsCpp.isValidURL(text); } + toValidate: true } Item { Layout.fillHeight: true diff --git a/Linphone/view/Page/Layout/Settings/CallSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/CallSettingsLayout.qml index c25acb98..2d7ebed9 100644 --- a/Linphone/view/Page/Layout/Settings/CallSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/CallSettingsLayout.qml @@ -7,7 +7,7 @@ import SettingsCpp 1.0 AbstractSettingsLayout { contentComponent: content - width: parent.width + width: parent?.width Component { id: content ColumnLayout { diff --git a/Linphone/view/Page/Layout/Settings/LdapSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/LdapSettingsLayout.qml index 11351978..88a6c1b3 100644 --- a/Linphone/view/Page/Layout/Settings/LdapSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/LdapSettingsLayout.qml @@ -98,17 +98,20 @@ AbstractSettingsLayout { propertyName: "server" propertyOwner: ldapGui.core title: qsTr("URL du serveur (ne peut être vide)") + toValidate: true } DecoratedTextField { propertyName: "bindDn" propertyOwner: ldapGui.core title: qsTr("Bind DN") + toValidate: true } DecoratedTextField { propertyName: "password" hidden: true propertyOwner: ldapGui.core title: qsTr("Mot de passe") + toValidate: true } SwitchSetting { titleText: qsTr("Utiliser TLS") @@ -119,50 +122,59 @@ AbstractSettingsLayout { propertyName: "baseObject" propertyOwner: ldapGui.core title: qsTr("Base de recherche (ne peut être vide)") + toValidate: true } DecoratedTextField { propertyName: "filter" propertyOwner: ldapGui.core title: qsTr("Filtre") + toValidate: true } DecoratedTextField { propertyName: "maxResults" propertyOwner: ldapGui.core validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } title: qsTr("Nombre maximum de résultats") + toValidate: true } DecoratedTextField { propertyName: "delay" propertyOwner: ldapGui.core validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } title: qsTr("Délai entre 2 requêtes (en millisecondes)") + toValidate: true } DecoratedTextField { propertyName: "timeout" propertyOwner: ldapGui.core title: qsTr("Durée maximun (en secondes)") validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } + toValidate: true } DecoratedTextField { propertyName: "minChars" propertyOwner: ldapGui.core title: qsTr("Nombre minimum de caractères pour la requête") validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } + toValidate: true } DecoratedTextField { propertyName: "nameAttribute" propertyOwner: ldapGui.core title: qsTr("Attributs de nom") + toValidate: true } DecoratedTextField { propertyName: "sipAttribute" propertyOwner: ldapGui.core title: qsTr("Attributs SIP") + toValidate: true } DecoratedTextField { propertyName: "sipDomain" propertyOwner: ldapGui.core title: qsTr("Domaine SIP") + toValidate: true } } }