From a7a4c9773bb6df68351fdc32320a1398c6de1f7a Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Mon, 13 Mar 2023 17:39:48 +0200 Subject: [PATCH] QmlDesigner: Add a default validator to ItemFilterComboBox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iba8f3f42d7028bc5da5b5abd6d3581f67184376b Reviewed-by: Miikka Heikkinen Reviewed-by: Henning Gründl --- .../QtMultimedia/MediaPlayerSection.qml | 2 -- .../propertyEditorQmlSources/QtQuick/AnimationTargetSection.qml | 1 - .../propertyEditorQmlSources/QtQuick/ConnectionsSpecifics.qml | 1 - .../propertyEditorQmlSources/QtQuick/LayerSection.qml | 1 - .../propertyEditorQmlSources/QtQuick/LoaderSpecifics.qml | 1 - .../propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml | 1 - .../propertyEditorQmlSources/QtQuick/RepeaterSpecifics.qml | 1 - .../QtQuick3D/SpatialAudio/AudioEngineSection.qml | 1 - .../imports/HelperWidgets/DynamicPropertiesSection.qml | 1 - .../imports/HelperWidgets/ItemFilterComboBox.qml | 2 ++ 10 files changed, 2 insertions(+), 10 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml index ef42ac29eaf..24ec8429ead 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtMultimedia/MediaPlayerSection.qml @@ -49,7 +49,6 @@ Section { + StudioTheme.Values.actionIndicatorWidth width: implicitWidth typeFilter: "QtQuick.AudioOutput" - validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } backendValue: backendValues.audioOutput } @@ -70,7 +69,6 @@ Section { + StudioTheme.Values.actionIndicatorWidth width: implicitWidth typeFilter: "QtQuick.VideoOutput" - validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } backendValue: backendValues.videoOutput } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationTargetSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationTargetSection.qml index c37f3e87af2..d441bb24802 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationTargetSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationTargetSection.qml @@ -23,7 +23,6 @@ Section { SecondColumnLayout { ItemFilterComboBox { typeFilter: "QtQuick.QtObject" - validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } backendValue: backendValues.target implicitWidth: StudioTheme.Values.singleControlColumnWidth + StudioTheme.Values.actionIndicatorWidth diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ConnectionsSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ConnectionsSpecifics.qml index 370de09eac6..5b32d6babd1 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ConnectionsSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ConnectionsSpecifics.qml @@ -52,7 +52,6 @@ Section { SecondColumnLayout { ItemFilterComboBox { typeFilter: "QtQuick.Item" - validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } backendValue: backendValues.target implicitWidth: StudioTheme.Values.singleControlColumnWidth + StudioTheme.Values.actionIndicatorWidth diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayerSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayerSection.qml index d0639629ac5..2106b86b72f 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayerSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayerSection.qml @@ -100,7 +100,6 @@ Section { + StudioTheme.Values.actionIndicatorWidth width: implicitWidth typeFilter: "QtQuick.Item" - validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } backendValue: backendValues.layer_effect } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LoaderSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LoaderSpecifics.qml index 1fff3f36ec4..d93dc0b3d40 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LoaderSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LoaderSpecifics.qml @@ -55,7 +55,6 @@ Column { SecondColumnLayout { ItemFilterComboBox { typeFilter: "Component" - validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } backendValue: backendValues.sourceComponent implicitWidth: StudioTheme.Values.singleControlColumnWidth + StudioTheme.Values.actionIndicatorWidth diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml index 3dc30fbbf81..6fb5102f4c3 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml @@ -181,7 +181,6 @@ Column { SecondColumnLayout { ItemFilterComboBox { typeFilter: "QtQuick.QtObject" - validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } backendValue: backendValues.drag_target implicitWidth: StudioTheme.Values.singleControlColumnWidth + StudioTheme.Values.actionIndicatorWidth diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RepeaterSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RepeaterSpecifics.qml index 5895db1b1f9..ad94780a5c3 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RepeaterSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RepeaterSpecifics.qml @@ -42,7 +42,6 @@ Column { SecondColumnLayout { ItemFilterComboBox { typeFilter: "Component" - validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } backendValue: backendValues.delegate implicitWidth: StudioTheme.Values.singleControlColumnWidth + StudioTheme.Values.actionIndicatorWidth diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/SpatialAudio/AudioEngineSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/SpatialAudio/AudioEngineSection.qml index 6add6fc880e..88b50c7872e 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/SpatialAudio/AudioEngineSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/SpatialAudio/AudioEngineSection.qml @@ -55,7 +55,6 @@ Section { SecondColumnLayout { ItemFilterComboBox { typeFilter: "QtMultimedia.AudioDevice" - validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } backendValue: backendValues.outputDevice implicitWidth: StudioTheme.Values.singleControlColumnWidth + StudioTheme.Values.actionIndicatorWidth diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml index 4e2ef4b044a..b3353f2fba2 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/DynamicPropertiesSection.qml @@ -266,7 +266,6 @@ Section { ItemFilterComboBox { typeFilter: "QtQuick3D.TextureInput" - validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } backendValue: layoutTextureInput.backendValue implicitWidth: StudioTheme.Values.singleControlColumnWidth + StudioTheme.Values.actionIndicatorWidth diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ItemFilterComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ItemFilterComboBox.qml index ba0d8376f7a..61bcc7e6296 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ItemFilterComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ItemFilterComboBox.qml @@ -13,6 +13,8 @@ HelperWidgets.ComboBox { editable: true model: comboBox.addDefaultItem(itemFilterModel.itemModel) + validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ } + HelperWidgets.ItemFilterModel { id: itemFilterModel modelNodeBackendProperty: modelNodeBackend