From 3a69a7ec0571387b9b6aff1dd7ef111c457a3816 Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Mon, 24 Jun 2024 12:06:11 -0300 Subject: [PATCH 01/16] bug fixing --- .../private/MMBaseSingleLineInput.qml | 2 +- app/qml/form/MMFormPage.qml | 4 +++- app/qml/form/editors/MMFormCalendarEditor.qml | 5 +++-- app/qml/form/editors/MMFormNumberEditor.qml | 5 +++-- .../editors/MMFormRelationReferenceEditor.qml | 5 +++-- app/qml/form/editors/MMFormScannerEditor.qml | 5 +++-- app/qml/form/editors/MMFormSliderEditor.qml | 5 +++-- app/qml/form/editors/MMFormSwitchEditor.qml | 5 +++-- app/qml/form/editors/MMFormTextEditor.qml | 5 +++-- .../test_photo_rename/Survey_points.gpkg | Bin 98304 -> 98304 bytes 10 files changed, 25 insertions(+), 16 deletions(-) diff --git a/app/qml/components/private/MMBaseSingleLineInput.qml b/app/qml/components/private/MMBaseSingleLineInput.qml index a0c124dc3..84274150e 100644 --- a/app/qml/components/private/MMBaseSingleLineInput.qml +++ b/app/qml/components/private/MMBaseSingleLineInput.qml @@ -144,7 +144,7 @@ MMBaseInput { // Do not let TextField calculate implicitWidth automatically based on background, it causes binding loops implicitWidth: width - readOnly: root.editState === "readOnly" || root.editState === "disabled" + readOnly: root.editState === "readOnly" || root.editState === "disabled" && root.isAttributeEditable // Ensure the text is scrolled to the beginning Component.onCompleted: ensureVisible( 0 ) diff --git a/app/qml/form/MMFormPage.qml b/app/qml/form/MMFormPage.qml index 228533669..3154e673f 100644 --- a/app/qml/form/MMFormPage.qml +++ b/app/qml/form/MMFormPage.qml @@ -281,7 +281,9 @@ Page { property var fieldWidget: model.EditorWidget property var fieldConfig: model.EditorWidgetConfig - property bool fieldIsReadOnly: root.state === "readOnly" || !AttributeEditable + property bool fieldIsReadOnly: root.state === "readOnly" + property bool isAttributeEditable: AttributeEditable + property bool fieldShouldShowTitle: model.ShowName property string fieldTitle: model.Name diff --git a/app/qml/form/editors/MMFormCalendarEditor.qml b/app/qml/form/editors/MMFormCalendarEditor.qml index 37a018bf2..a1643a279 100644 --- a/app/qml/form/editors/MMFormCalendarEditor.qml +++ b/app/qml/form/editors/MMFormCalendarEditor.qml @@ -31,7 +31,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property bool _fieldValueIsNull: parent.fieldValueIsNull property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly + property bool _isAttributeEditable: parent.isAttributeEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -58,7 +59,7 @@ MMPrivateComponents.MMBaseSingleLineInput { hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly onCheckboxCheckedChanged: { root.rememberValueBoxClicked( checkboxChecked ) diff --git a/app/qml/form/editors/MMFormNumberEditor.qml b/app/qml/form/editors/MMFormNumberEditor.qml index 3ae2a070d..9cfdca14f 100644 --- a/app/qml/form/editors/MMFormNumberEditor.qml +++ b/app/qml/form/editors/MMFormNumberEditor.qml @@ -28,7 +28,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property bool _fieldValueIsNull: parent.fieldValueIsNull property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly + property bool _isAttributeEditable: parent.isAttributeEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -41,7 +42,7 @@ MMPrivateComponents.MMBaseSingleLineInput { signal rememberValueBoxClicked( bool state ) title: _fieldShouldShowTitle ? _fieldTitle : "" - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly errorMsg: _fieldErrorMessage warningMsg: _fieldWarningMessage diff --git a/app/qml/form/editors/MMFormRelationReferenceEditor.qml b/app/qml/form/editors/MMFormRelationReferenceEditor.qml index e681c987d..18586d4f9 100644 --- a/app/qml/form/editors/MMFormRelationReferenceEditor.qml +++ b/app/qml/form/editors/MMFormRelationReferenceEditor.qml @@ -22,7 +22,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property var _fieldConfig: parent.fieldConfig property var _fieldActiveProject: parent.fieldActiveProject - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly + property bool _isAttributeEditable: parent.isAttributeEditable property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle property string _fieldTitle: parent.fieldTitle @@ -45,7 +46,7 @@ MMPrivateComponents.MMBaseSingleLineInput { errorMsg: _fieldErrorMessage warningMsg: _fieldWarningMessage - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormScannerEditor.qml b/app/qml/form/editors/MMFormScannerEditor.qml index f2defc302..d4f66dfdc 100644 --- a/app/qml/form/editors/MMFormScannerEditor.qml +++ b/app/qml/form/editors/MMFormScannerEditor.qml @@ -28,7 +28,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property bool _fieldValueIsNull: parent.fieldValueIsNull property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly + property bool _isAttributeEditable: parent.isAttributeEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -45,7 +46,7 @@ MMPrivateComponents.MMBaseSingleLineInput { warningMsg: _fieldWarningMessage errorMsg: _fieldErrorMessage - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormSliderEditor.qml b/app/qml/form/editors/MMFormSliderEditor.qml index 6465ecc62..45a066f3c 100644 --- a/app/qml/form/editors/MMFormSliderEditor.qml +++ b/app/qml/form/editors/MMFormSliderEditor.qml @@ -28,7 +28,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property var _fieldConfig: parent.fieldConfig property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly + property bool _isAttributeEditable: parent.isAttributeEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -45,7 +46,7 @@ MMPrivateComponents.MMBaseSingleLineInput { warningMsg: _fieldWarningMessage errorMsg: _fieldErrorMessage - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormSwitchEditor.qml b/app/qml/form/editors/MMFormSwitchEditor.qml index 7c7ff20cc..5faa027ba 100644 --- a/app/qml/form/editors/MMFormSwitchEditor.qml +++ b/app/qml/form/editors/MMFormSwitchEditor.qml @@ -28,7 +28,8 @@ MMSwitchInput { property var _fieldConfig: parent.fieldConfig property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly + property bool _isAttributeEditable: parent.isAttributeEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -45,7 +46,7 @@ MMSwitchInput { warningMsg: _fieldWarningMessage errorMsg: _fieldErrorMessage - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormTextEditor.qml b/app/qml/form/editors/MMFormTextEditor.qml index 10ec5358e..01e18cdd8 100644 --- a/app/qml/form/editors/MMFormTextEditor.qml +++ b/app/qml/form/editors/MMFormTextEditor.qml @@ -29,7 +29,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property bool _fieldValueIsNull: parent.fieldValueIsNull property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly + property bool _isAttributeEditable: parent.isAttributeEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -43,7 +44,7 @@ MMPrivateComponents.MMBaseSingleLineInput { text: _fieldValue === undefined || _fieldValueIsNull ? '' : _fieldValue - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly title: _fieldShouldShowTitle ? _fieldTitle : "" diff --git a/test/test_data/test_photo_rename/Survey_points.gpkg b/test/test_data/test_photo_rename/Survey_points.gpkg index b02047968574e4d98a2547283603f3eccde9ef4f..37e2997ad2416a67c2351e1de9a90d1a1fae0e0b 100644 GIT binary patch delta 51 zcmZo@U~6b#lL-#=$t+1#NXswEO)OC`W)NUtVq$PmP+(wS;F&1n%*w-{=U>&BvNeTq GPCWozZVd?l delta 51 zcmZo@U~6b#lL-#=$t+1#NXswEO)OC`W)NUtWMptqP+(wS;G8Jq%*x527w*-VvNeTq GPCWoxtPI%z From 52489a228f6fcc03fadd3104ece1ca5002692e2c Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Mon, 24 Jun 2024 12:17:11 -0300 Subject: [PATCH 02/16] small fix --- app/qml/components/private/MMBaseSingleLineInput.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/qml/components/private/MMBaseSingleLineInput.qml b/app/qml/components/private/MMBaseSingleLineInput.qml index 84274150e..46e33fc3b 100644 --- a/app/qml/components/private/MMBaseSingleLineInput.qml +++ b/app/qml/components/private/MMBaseSingleLineInput.qml @@ -144,7 +144,7 @@ MMBaseInput { // Do not let TextField calculate implicitWidth automatically based on background, it causes binding loops implicitWidth: width - readOnly: root.editState === "readOnly" || root.editState === "disabled" && root.isAttributeEditable + readOnly: root.editState === "readOnly" || root.editState === "disabled" && !root.isAttributeEditable // Ensure the text is scrolled to the beginning Component.onCompleted: ensureVisible( 0 ) From 336db0fbd895dcac27e42d97b46d963e3c3b0dcc Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Mon, 24 Jun 2024 12:30:14 -0300 Subject: [PATCH 03/16] removing push error --- .../test_photo_rename/Survey_points.gpkg | Bin 98304 -> 98304 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/test/test_data/test_photo_rename/Survey_points.gpkg b/test/test_data/test_photo_rename/Survey_points.gpkg index 37e2997ad2416a67c2351e1de9a90d1a1fae0e0b..b02047968574e4d98a2547283603f3eccde9ef4f 100644 GIT binary patch delta 51 zcmZo@U~6b#lL-#=$t+1#NXswEO)OC`W)NUtWMptqP+(wS;G8Jq%*x527w*-VvNeTq GPCWoxtPI%z delta 51 zcmZo@U~6b#lL-#=$t+1#NXswEO)OC`W)NUtVq$PmP+(wS;F&1n%*w-{=U>&BvNeTq GPCWozZVd?l From 84bdd3cb49d959098b2c176e1d707dbd4a6c184c Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Tue, 25 Jun 2024 13:00:01 -0300 Subject: [PATCH 04/16] commenting bug fix --- app/qml/form/MMFormPage.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/qml/form/MMFormPage.qml b/app/qml/form/MMFormPage.qml index 3154e673f..5d4171cac 100644 --- a/app/qml/form/MMFormPage.qml +++ b/app/qml/form/MMFormPage.qml @@ -281,6 +281,8 @@ Page { property var fieldWidget: model.EditorWidget property var fieldConfig: model.EditorWidgetConfig + // Following issue #3457, error message can be displayed even for non-editable attributes + // Thus, we split attributes indicating edit mode for formPage and attribute editability property bool fieldIsReadOnly: root.state === "readOnly" property bool isAttributeEditable: AttributeEditable From b78a204be472ab3f1af0cbfbfc0fce26a02d2fb7 Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Wed, 26 Jun 2024 09:52:06 -0300 Subject: [PATCH 05/16] post review changes --- app/qml/components/private/MMBaseInput.qml | 3 ++- app/qml/form/MMFormPage.qml | 6 ++---- app/qml/form/editors/MMFormCalendarEditor.qml | 7 ++++--- app/qml/form/editors/MMFormNumberEditor.qml | 7 ++++--- app/qml/form/editors/MMFormPhotoEditor.qml | 6 ++++-- app/qml/form/editors/MMFormRelationReferenceEditor.qml | 7 ++++--- app/qml/form/editors/MMFormScannerEditor.qml | 7 ++++--- app/qml/form/editors/MMFormSliderEditor.qml | 7 ++++--- app/qml/form/editors/MMFormSwitchEditor.qml | 7 ++++--- app/qml/form/editors/MMFormTextEditor.qml | 7 ++++--- app/qml/form/editors/MMFormTextMultilineEditor.qml | 6 ++++-- app/qml/form/editors/MMFormValueMapEditor.qml | 6 ++++-- app/qml/form/editors/MMFormValueRelationEditor.qml | 6 ++++-- 13 files changed, 48 insertions(+), 34 deletions(-) diff --git a/app/qml/components/private/MMBaseInput.qml b/app/qml/components/private/MMBaseInput.qml index 128830641..ccf557961 100644 --- a/app/qml/components/private/MMBaseInput.qml +++ b/app/qml/components/private/MMBaseInput.qml @@ -28,6 +28,7 @@ Item { property alias checkboxChecked: checkbox.checked property bool readOnly: false + property bool shouldShowValidationMsg: !readOnly property string errorMsg: "" property string warningMsg: "" @@ -170,7 +171,7 @@ Item { width: parent.width height: validationMessagegroup.implicitHeight - visible: root.validationState !== "valid" && root.editState === "enabled" + visible: root.shouldShowValidationMsg RowLayout { id: validationMessagegroup diff --git a/app/qml/form/MMFormPage.qml b/app/qml/form/MMFormPage.qml index 5d4171cac..912661501 100644 --- a/app/qml/form/MMFormPage.qml +++ b/app/qml/form/MMFormPage.qml @@ -281,10 +281,8 @@ Page { property var fieldWidget: model.EditorWidget property var fieldConfig: model.EditorWidgetConfig - // Following issue #3457, error message can be displayed even for non-editable attributes - // Thus, we split attributes indicating edit mode for formPage and attribute editability - property bool fieldIsReadOnly: root.state === "readOnly" - property bool isAttributeEditable: AttributeEditable + property bool fieldFormIsReadOnly: root.state === "readOnly" + property bool fieldIsEditable: AttributeEditable property bool fieldShouldShowTitle: model.ShowName diff --git a/app/qml/form/editors/MMFormCalendarEditor.qml b/app/qml/form/editors/MMFormCalendarEditor.qml index a1643a279..4f8fd5b75 100644 --- a/app/qml/form/editors/MMFormCalendarEditor.qml +++ b/app/qml/form/editors/MMFormCalendarEditor.qml @@ -31,8 +31,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property bool _fieldValueIsNull: parent.fieldValueIsNull property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly - property bool _isAttributeEditable: parent.isAttributeEditable + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -59,7 +59,8 @@ MMPrivateComponents.MMBaseSingleLineInput { hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState - readOnly: _fieldFormIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly onCheckboxCheckedChanged: { root.rememberValueBoxClicked( checkboxChecked ) diff --git a/app/qml/form/editors/MMFormNumberEditor.qml b/app/qml/form/editors/MMFormNumberEditor.qml index 9cfdca14f..f50689647 100644 --- a/app/qml/form/editors/MMFormNumberEditor.qml +++ b/app/qml/form/editors/MMFormNumberEditor.qml @@ -28,8 +28,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property bool _fieldValueIsNull: parent.fieldValueIsNull property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly - property bool _isAttributeEditable: parent.isAttributeEditable + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -42,7 +42,8 @@ MMPrivateComponents.MMBaseSingleLineInput { signal rememberValueBoxClicked( bool state ) title: _fieldShouldShowTitle ? _fieldTitle : "" - readOnly: _fieldFormIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly errorMsg: _fieldErrorMessage warningMsg: _fieldWarningMessage diff --git a/app/qml/form/editors/MMFormPhotoEditor.qml b/app/qml/form/editors/MMFormPhotoEditor.qml index 12af68b94..36661c545 100644 --- a/app/qml/form/editors/MMFormPhotoEditor.qml +++ b/app/qml/form/editors/MMFormPhotoEditor.qml @@ -63,7 +63,8 @@ MMFormPhotoViewer { property var _fieldFeatureLayerPair: parent.fieldFeatureLayerPair property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -80,7 +81,8 @@ MMFormPhotoViewer { warningMsg: photoState === "notAvailable" ? qsTr( "Photo is missing." ) : _fieldWarningMessage errorMsg: _fieldErrorMessage - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormRelationReferenceEditor.qml b/app/qml/form/editors/MMFormRelationReferenceEditor.qml index 18586d4f9..b83cce355 100644 --- a/app/qml/form/editors/MMFormRelationReferenceEditor.qml +++ b/app/qml/form/editors/MMFormRelationReferenceEditor.qml @@ -22,8 +22,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property var _fieldConfig: parent.fieldConfig property var _fieldActiveProject: parent.fieldActiveProject - property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly - property bool _isAttributeEditable: parent.isAttributeEditable + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle property string _fieldTitle: parent.fieldTitle @@ -46,7 +46,8 @@ MMPrivateComponents.MMBaseSingleLineInput { errorMsg: _fieldErrorMessage warningMsg: _fieldWarningMessage - readOnly: _fieldFormIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormScannerEditor.qml b/app/qml/form/editors/MMFormScannerEditor.qml index d4f66dfdc..18480b3cf 100644 --- a/app/qml/form/editors/MMFormScannerEditor.qml +++ b/app/qml/form/editors/MMFormScannerEditor.qml @@ -28,8 +28,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property bool _fieldValueIsNull: parent.fieldValueIsNull property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly - property bool _isAttributeEditable: parent.isAttributeEditable + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -46,7 +46,8 @@ MMPrivateComponents.MMBaseSingleLineInput { warningMsg: _fieldWarningMessage errorMsg: _fieldErrorMessage - readOnly: _fieldFormIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormSliderEditor.qml b/app/qml/form/editors/MMFormSliderEditor.qml index 45a066f3c..7981a81a4 100644 --- a/app/qml/form/editors/MMFormSliderEditor.qml +++ b/app/qml/form/editors/MMFormSliderEditor.qml @@ -28,8 +28,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property var _fieldConfig: parent.fieldConfig property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly - property bool _isAttributeEditable: parent.isAttributeEditable + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -46,7 +46,8 @@ MMPrivateComponents.MMBaseSingleLineInput { warningMsg: _fieldWarningMessage errorMsg: _fieldErrorMessage - readOnly: _fieldFormIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormSwitchEditor.qml b/app/qml/form/editors/MMFormSwitchEditor.qml index 5faa027ba..3e2ed6d41 100644 --- a/app/qml/form/editors/MMFormSwitchEditor.qml +++ b/app/qml/form/editors/MMFormSwitchEditor.qml @@ -28,8 +28,8 @@ MMSwitchInput { property var _fieldConfig: parent.fieldConfig property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly - property bool _isAttributeEditable: parent.isAttributeEditable + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -46,7 +46,8 @@ MMSwitchInput { warningMsg: _fieldWarningMessage errorMsg: _fieldErrorMessage - readOnly: _fieldFormIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormTextEditor.qml b/app/qml/form/editors/MMFormTextEditor.qml index 01e18cdd8..b4a685091 100644 --- a/app/qml/form/editors/MMFormTextEditor.qml +++ b/app/qml/form/editors/MMFormTextEditor.qml @@ -29,8 +29,8 @@ MMPrivateComponents.MMBaseSingleLineInput { property bool _fieldValueIsNull: parent.fieldValueIsNull property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly - property bool _isAttributeEditable: parent.isAttributeEditable + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -44,7 +44,8 @@ MMPrivateComponents.MMBaseSingleLineInput { text: _fieldValue === undefined || _fieldValueIsNull ? '' : _fieldValue - readOnly: _fieldFormIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly title: _fieldShouldShowTitle ? _fieldTitle : "" diff --git a/app/qml/form/editors/MMFormTextMultilineEditor.qml b/app/qml/form/editors/MMFormTextMultilineEditor.qml index f93e54253..f8e329721 100644 --- a/app/qml/form/editors/MMFormTextMultilineEditor.qml +++ b/app/qml/form/editors/MMFormTextMultilineEditor.qml @@ -31,7 +31,8 @@ MMPrivateComponents.MMBaseInput { property bool _fieldValueIsNull: parent.fieldValueIsNull property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -49,7 +50,8 @@ MMPrivateComponents.MMBaseInput { warningMsg: _fieldWarningMessage errorMsg: _fieldErrorMessage - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormValueMapEditor.qml b/app/qml/form/editors/MMFormValueMapEditor.qml index 45c4c9f3d..d25703d7c 100644 --- a/app/qml/form/editors/MMFormValueMapEditor.qml +++ b/app/qml/form/editors/MMFormValueMapEditor.qml @@ -28,7 +28,8 @@ MMFormComboboxBaseEditor { property bool _fieldValueIsNull: parent.fieldValueIsNull property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -47,7 +48,8 @@ MMFormComboboxBaseEditor { errorMsg: _fieldErrorMessage warningMsg: _fieldWarningMessage - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormValueRelationEditor.qml b/app/qml/form/editors/MMFormValueRelationEditor.qml index 59f7837a8..8e90026b8 100644 --- a/app/qml/form/editors/MMFormValueRelationEditor.qml +++ b/app/qml/form/editors/MMFormValueRelationEditor.qml @@ -31,7 +31,8 @@ MMFormComboboxBaseEditor { property var _fieldFeatureLayerPair: parent.fieldFeatureLayerPair property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle - property bool _fieldIsReadOnly: parent.fieldIsReadOnly + property bool _fieldFormIsReadOnly: parent.fieldFormIsReadOnly + property bool _fieldIsEditable: parent.fieldIsEditable property string _fieldTitle: parent.fieldTitle property string _fieldErrorMessage: parent.fieldErrorMessage @@ -48,7 +49,8 @@ MMFormComboboxBaseEditor { errorMsg: _fieldErrorMessage warningMsg: _fieldWarningMessage - readOnly: _fieldIsReadOnly + readOnly: _fieldFormIsReadOnly || !_fieldIsEditable + shouldShowValidationMsg: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState From 01a4bf3832266768eada3ddd2324e9b4f005b6c8 Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Wed, 26 Jun 2024 09:54:26 -0300 Subject: [PATCH 06/16] last adjustment --- app/qml/components/private/MMBaseSingleLineInput.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/qml/components/private/MMBaseSingleLineInput.qml b/app/qml/components/private/MMBaseSingleLineInput.qml index 46e33fc3b..54b54dfd5 100644 --- a/app/qml/components/private/MMBaseSingleLineInput.qml +++ b/app/qml/components/private/MMBaseSingleLineInput.qml @@ -144,7 +144,7 @@ MMBaseInput { // Do not let TextField calculate implicitWidth automatically based on background, it causes binding loops implicitWidth: width - readOnly: root.editState === "readOnly" || root.editState === "disabled" && !root.isAttributeEditable + readOnly: root.editState === "readOnly" || root.editState === "disabled" && !root.fieldIsEditable // Ensure the text is scrolled to the beginning Component.onCompleted: ensureVisible( 0 ) From 5bd8a2bd652cf4f6d363923eb01ced287083883b Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Wed, 26 Jun 2024 10:08:17 -0300 Subject: [PATCH 07/16] code adjust --- app/qml/components/private/MMBaseSingleLineInput.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/qml/components/private/MMBaseSingleLineInput.qml b/app/qml/components/private/MMBaseSingleLineInput.qml index 54b54dfd5..a0c124dc3 100644 --- a/app/qml/components/private/MMBaseSingleLineInput.qml +++ b/app/qml/components/private/MMBaseSingleLineInput.qml @@ -144,7 +144,7 @@ MMBaseInput { // Do not let TextField calculate implicitWidth automatically based on background, it causes binding loops implicitWidth: width - readOnly: root.editState === "readOnly" || root.editState === "disabled" && !root.fieldIsEditable + readOnly: root.editState === "readOnly" || root.editState === "disabled" // Ensure the text is scrolled to the beginning Component.onCompleted: ensureVisible( 0 ) From 1c613af924a1a57bc174cac166545c4374c57f5a Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Wed, 26 Jun 2024 10:14:02 -0300 Subject: [PATCH 08/16] error message visibility adjustment --- app/qml/components/private/MMBaseInput.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/qml/components/private/MMBaseInput.qml b/app/qml/components/private/MMBaseInput.qml index ccf557961..fab9df718 100644 --- a/app/qml/components/private/MMBaseInput.qml +++ b/app/qml/components/private/MMBaseInput.qml @@ -171,7 +171,7 @@ Item { width: parent.width height: validationMessagegroup.implicitHeight - visible: root.shouldShowValidationMsg + visible: root.validationState !== "valid" && root.shouldShowValidationMsg RowLayout { id: validationMessagegroup From 4d9d1394e39f0527faeb405cb0da4bfe8bf43863 Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Thu, 27 Jun 2024 11:17:47 -0300 Subject: [PATCH 09/16] anything --- app/qml/components/private/MMBaseInput.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/qml/components/private/MMBaseInput.qml b/app/qml/components/private/MMBaseInput.qml index fab9df718..62c2316c5 100644 --- a/app/qml/components/private/MMBaseInput.qml +++ b/app/qml/components/private/MMBaseInput.qml @@ -28,7 +28,7 @@ Item { property alias checkboxChecked: checkbox.checked property bool readOnly: false - property bool shouldShowValidationMsg: !readOnly + property bool shouldShowValidation: true property string errorMsg: "" property string warningMsg: "" @@ -171,7 +171,7 @@ Item { width: parent.width height: validationMessagegroup.implicitHeight - visible: root.validationState !== "valid" && root.shouldShowValidationMsg + visible: root.validationState !== "valid" && root.shouldShowValidation RowLayout { id: validationMessagegroup From bb1cbd98bdcefa4bbe6fffda2e39c723471ec096 Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Thu, 27 Jun 2024 11:26:45 -0300 Subject: [PATCH 10/16] anything --- app/qml/components/private/MMBaseInput.qml | 2 +- core/merginapi.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/qml/components/private/MMBaseInput.qml b/app/qml/components/private/MMBaseInput.qml index 62c2316c5..0044acf53 100644 --- a/app/qml/components/private/MMBaseInput.qml +++ b/app/qml/components/private/MMBaseInput.qml @@ -65,7 +65,7 @@ Item { states: [ State { name: "valid" - when: !warningMsg && !errorMsg + when: !shouldShowValidation || ( !warningMsg && !errorMsg ) }, State { name: "error" diff --git a/core/merginapi.cpp b/core/merginapi.cpp index 781c8e990..b16010677 100644 --- a/core/merginapi.cpp +++ b/core/merginapi.cpp @@ -25,6 +25,7 @@ #include "geodiffutils.h" #include "localprojectsmanager.h" #include "../app/enumhelper.h" +#include "../app/inpututils.h" #include "merginerrortypes.h" #include @@ -2415,6 +2416,10 @@ void MerginApi::startProjectPull( const QString &projectFullName ) []( const DownloadQueueItem & a, const DownloadQueueItem & b ) { return a.size > b.size; } ); + CoreUtils::log( "pull " + projectFullName, QStringLiteral( "%1 available device storage, %2 total device storage" ) + .arg( InputUtils::getAvailableDeviceStorage() ) + .arg( InputUtils::getTotalDeviceStorage() ); + CoreUtils::log( "pull " + projectFullName, QStringLiteral( "%1 update tasks, %2 items to download (total size %3 bytes)" ) .arg( transaction.pullTasks.count() ) .arg( transaction.downloadQueue.count() ) From 20bcee07c6a4582dd3659d3e6b50a4ab4f16a6ee Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Thu, 27 Jun 2024 12:26:11 -0300 Subject: [PATCH 11/16] shouldShowValidationMsg to shouldShowValidation and states condition modified --- app/qml/form/editors/MMFormCalendarEditor.qml | 2 +- app/qml/form/editors/MMFormNumberEditor.qml | 2 +- app/qml/form/editors/MMFormPhotoEditor.qml | 2 +- app/qml/form/editors/MMFormRelationReferenceEditor.qml | 2 +- app/qml/form/editors/MMFormScannerEditor.qml | 2 +- app/qml/form/editors/MMFormSliderEditor.qml | 2 +- app/qml/form/editors/MMFormSwitchEditor.qml | 2 +- app/qml/form/editors/MMFormTextEditor.qml | 2 +- app/qml/form/editors/MMFormTextMultilineEditor.qml | 2 +- app/qml/form/editors/MMFormValueMapEditor.qml | 2 +- app/qml/form/editors/MMFormValueRelationEditor.qml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/qml/form/editors/MMFormCalendarEditor.qml b/app/qml/form/editors/MMFormCalendarEditor.qml index 4f8fd5b75..a01f414fe 100644 --- a/app/qml/form/editors/MMFormCalendarEditor.qml +++ b/app/qml/form/editors/MMFormCalendarEditor.qml @@ -60,7 +60,7 @@ MMPrivateComponents.MMBaseSingleLineInput { checkboxChecked: _fieldRememberValueState readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly onCheckboxCheckedChanged: { root.rememberValueBoxClicked( checkboxChecked ) diff --git a/app/qml/form/editors/MMFormNumberEditor.qml b/app/qml/form/editors/MMFormNumberEditor.qml index f50689647..ae1d894dd 100644 --- a/app/qml/form/editors/MMFormNumberEditor.qml +++ b/app/qml/form/editors/MMFormNumberEditor.qml @@ -43,7 +43,7 @@ MMPrivateComponents.MMBaseSingleLineInput { title: _fieldShouldShowTitle ? _fieldTitle : "" readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly errorMsg: _fieldErrorMessage warningMsg: _fieldWarningMessage diff --git a/app/qml/form/editors/MMFormPhotoEditor.qml b/app/qml/form/editors/MMFormPhotoEditor.qml index 36661c545..9f586c596 100644 --- a/app/qml/form/editors/MMFormPhotoEditor.qml +++ b/app/qml/form/editors/MMFormPhotoEditor.qml @@ -82,7 +82,7 @@ MMFormPhotoViewer { errorMsg: _fieldErrorMessage readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormRelationReferenceEditor.qml b/app/qml/form/editors/MMFormRelationReferenceEditor.qml index b83cce355..47d41c56c 100644 --- a/app/qml/form/editors/MMFormRelationReferenceEditor.qml +++ b/app/qml/form/editors/MMFormRelationReferenceEditor.qml @@ -47,7 +47,7 @@ MMPrivateComponents.MMBaseSingleLineInput { warningMsg: _fieldWarningMessage readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormScannerEditor.qml b/app/qml/form/editors/MMFormScannerEditor.qml index 18480b3cf..4aa4fd0de 100644 --- a/app/qml/form/editors/MMFormScannerEditor.qml +++ b/app/qml/form/editors/MMFormScannerEditor.qml @@ -47,7 +47,7 @@ MMPrivateComponents.MMBaseSingleLineInput { errorMsg: _fieldErrorMessage readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormSliderEditor.qml b/app/qml/form/editors/MMFormSliderEditor.qml index 7981a81a4..de34005e3 100644 --- a/app/qml/form/editors/MMFormSliderEditor.qml +++ b/app/qml/form/editors/MMFormSliderEditor.qml @@ -47,7 +47,7 @@ MMPrivateComponents.MMBaseSingleLineInput { errorMsg: _fieldErrorMessage readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormSwitchEditor.qml b/app/qml/form/editors/MMFormSwitchEditor.qml index 3e2ed6d41..aac2b388b 100644 --- a/app/qml/form/editors/MMFormSwitchEditor.qml +++ b/app/qml/form/editors/MMFormSwitchEditor.qml @@ -47,7 +47,7 @@ MMSwitchInput { errorMsg: _fieldErrorMessage readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormTextEditor.qml b/app/qml/form/editors/MMFormTextEditor.qml index b4a685091..07cc0a9d4 100644 --- a/app/qml/form/editors/MMFormTextEditor.qml +++ b/app/qml/form/editors/MMFormTextEditor.qml @@ -45,7 +45,7 @@ MMPrivateComponents.MMBaseSingleLineInput { text: _fieldValue === undefined || _fieldValueIsNull ? '' : _fieldValue readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly title: _fieldShouldShowTitle ? _fieldTitle : "" diff --git a/app/qml/form/editors/MMFormTextMultilineEditor.qml b/app/qml/form/editors/MMFormTextMultilineEditor.qml index f8e329721..c9aaae1b0 100644 --- a/app/qml/form/editors/MMFormTextMultilineEditor.qml +++ b/app/qml/form/editors/MMFormTextMultilineEditor.qml @@ -51,7 +51,7 @@ MMPrivateComponents.MMBaseInput { errorMsg: _fieldErrorMessage readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormValueMapEditor.qml b/app/qml/form/editors/MMFormValueMapEditor.qml index d25703d7c..28497a08d 100644 --- a/app/qml/form/editors/MMFormValueMapEditor.qml +++ b/app/qml/form/editors/MMFormValueMapEditor.qml @@ -49,7 +49,7 @@ MMFormComboboxBaseEditor { warningMsg: _fieldWarningMessage readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState diff --git a/app/qml/form/editors/MMFormValueRelationEditor.qml b/app/qml/form/editors/MMFormValueRelationEditor.qml index 8e90026b8..e98643ed2 100644 --- a/app/qml/form/editors/MMFormValueRelationEditor.qml +++ b/app/qml/form/editors/MMFormValueRelationEditor.qml @@ -50,7 +50,7 @@ MMFormComboboxBaseEditor { warningMsg: _fieldWarningMessage readOnly: _fieldFormIsReadOnly || !_fieldIsEditable - shouldShowValidationMsg: !_fieldFormIsReadOnly + shouldShowValidation: !_fieldFormIsReadOnly hasCheckbox: _fieldRememberValueSupported checkboxChecked: _fieldRememberValueState From 956e36b38309993017b0066560b431ce977d699d Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Thu, 27 Jun 2024 12:36:43 -0300 Subject: [PATCH 12/16] revert core/merginapi.cpp changes --- core/merginapi.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/merginapi.cpp b/core/merginapi.cpp index b16010677..781c8e990 100644 --- a/core/merginapi.cpp +++ b/core/merginapi.cpp @@ -25,7 +25,6 @@ #include "geodiffutils.h" #include "localprojectsmanager.h" #include "../app/enumhelper.h" -#include "../app/inpututils.h" #include "merginerrortypes.h" #include @@ -2416,10 +2415,6 @@ void MerginApi::startProjectPull( const QString &projectFullName ) []( const DownloadQueueItem & a, const DownloadQueueItem & b ) { return a.size > b.size; } ); - CoreUtils::log( "pull " + projectFullName, QStringLiteral( "%1 available device storage, %2 total device storage" ) - .arg( InputUtils::getAvailableDeviceStorage() ) - .arg( InputUtils::getTotalDeviceStorage() ); - CoreUtils::log( "pull " + projectFullName, QStringLiteral( "%1 update tasks, %2 items to download (total size %3 bytes)" ) .arg( transaction.pullTasks.count() ) .arg( transaction.downloadQueue.count() ) From 8837318e2ad010f1808be87da725364ffff81c5d Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Fri, 28 Jun 2024 11:08:04 -0300 Subject: [PATCH 13/16] forcing new CI run --- app/qml/form/MMFormPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/qml/form/MMFormPage.qml b/app/qml/form/MMFormPage.qml index 912661501..da12963af 100644 --- a/app/qml/form/MMFormPage.qml +++ b/app/qml/form/MMFormPage.qml @@ -282,7 +282,7 @@ Page { property var fieldConfig: model.EditorWidgetConfig property bool fieldFormIsReadOnly: root.state === "readOnly" - property bool fieldIsEditable: AttributeEditable + property bool fieldIsEditable: AttributeEditable // property bool fieldShouldShowTitle: model.ShowName From 74689ef491c8e9d8a8b0ed9048b0e0f67c039d67 Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Fri, 28 Jun 2024 11:08:16 -0300 Subject: [PATCH 14/16] new CI run --- app/qml/form/MMFormPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/qml/form/MMFormPage.qml b/app/qml/form/MMFormPage.qml index da12963af..912661501 100644 --- a/app/qml/form/MMFormPage.qml +++ b/app/qml/form/MMFormPage.qml @@ -282,7 +282,7 @@ Page { property var fieldConfig: model.EditorWidgetConfig property bool fieldFormIsReadOnly: root.state === "readOnly" - property bool fieldIsEditable: AttributeEditable // + property bool fieldIsEditable: AttributeEditable property bool fieldShouldShowTitle: model.ShowName From 68c0d1ac14b5b6f75d0f9403b31394960f7d4386 Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Fri, 28 Jun 2024 11:11:02 -0300 Subject: [PATCH 15/16] new CI run --- app/qml/form/MMFormPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/qml/form/MMFormPage.qml b/app/qml/form/MMFormPage.qml index 912661501..da12963af 100644 --- a/app/qml/form/MMFormPage.qml +++ b/app/qml/form/MMFormPage.qml @@ -282,7 +282,7 @@ Page { property var fieldConfig: model.EditorWidgetConfig property bool fieldFormIsReadOnly: root.state === "readOnly" - property bool fieldIsEditable: AttributeEditable + property bool fieldIsEditable: AttributeEditable // property bool fieldShouldShowTitle: model.ShowName From d84fc786fb17374f9bc1e00368af4610bdd7a2cb Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Fri, 28 Jun 2024 12:04:33 -0300 Subject: [PATCH 16/16] gallery fix --- app/qml/form/MMFormPage.qml | 2 +- gallery/qml/components/EditorItem.qml | 3 ++- gallery/qml/pages/EditorsPage.qml | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/qml/form/MMFormPage.qml b/app/qml/form/MMFormPage.qml index da12963af..912661501 100644 --- a/app/qml/form/MMFormPage.qml +++ b/app/qml/form/MMFormPage.qml @@ -282,7 +282,7 @@ Page { property var fieldConfig: model.EditorWidgetConfig property bool fieldFormIsReadOnly: root.state === "readOnly" - property bool fieldIsEditable: AttributeEditable // + property bool fieldIsEditable: AttributeEditable property bool fieldShouldShowTitle: model.ShowName diff --git a/gallery/qml/components/EditorItem.qml b/gallery/qml/components/EditorItem.qml index 11f4884c9..d00936ab1 100644 --- a/gallery/qml/components/EditorItem.qml +++ b/gallery/qml/components/EditorItem.qml @@ -21,7 +21,8 @@ Item { property string fieldValue: "" property var fieldConfig: ({UseHtml: true}) property bool fieldShouldShowTitle: checkboxTitle.checked - property bool fieldIsReadOnly: !checkbox.checked + property bool fieldFormIsReadOnly: !checkbox.checked + property bool fieldIsEditable: checkboxEditable.checked property string fieldErrorMessage: checkboxError.checked ? "error" : "" property string fieldWarningMessage: checkboxWarning.checked ? "warning" : "" property bool fieldRememberValueSupported: checkboxRemember.checked diff --git a/gallery/qml/pages/EditorsPage.qml b/gallery/qml/pages/EditorsPage.qml index f571a6c89..b2ddb5462 100644 --- a/gallery/qml/pages/EditorsPage.qml +++ b/gallery/qml/pages/EditorsPage.qml @@ -67,6 +67,12 @@ ScrollView { checked: false } + MMCheckBox { + id: checkboxEditable + text: checked ? "attribute editable: yes" : "attribute editable: no" + checked: true + } + GalleryComponents.EditorItem { width: parent.width height: relationEditor.height