QmlDesigner: Add a default validator to ItemFilterComboBox

Change-Id: Iba8f3f42d7028bc5da5b5abd6d3581f67184376b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Mahmoud Badri
2023-03-13 17:39:48 +02:00
parent f34bd3309d
commit a7a4c9773b
10 changed files with 2 additions and 10 deletions

View File

@@ -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
}

View File

@@ -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

View File

@@ -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

View File

@@ -100,7 +100,6 @@ Section {
+ StudioTheme.Values.actionIndicatorWidth
width: implicitWidth
typeFilter: "QtQuick.Item"
validator: RegExpValidator { regExp: /(^$|^[a-z_]\w*)/ }
backendValue: backendValues.layer_effect
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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