summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2022-09-26 15:21:33 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2022-09-26 12:58:38 +0000
commit57dc7f8468cb83488dec144f475f157132de9c08 (patch)
treed775e29c3608511758e39039c1f6b439a0cd0d94
parent945e6fce31e8a4e9530cf61b20c20a74f9443812 (diff)
downloadqt-creator-57dc7f8468cb83488dec144f475f157132de9c08.tar.gz
QmlDesigner: Remove an external dependency from the SearchBox
Task-number: QDS-7784 Change-Id: Ibd1390398d9984c618da4052560706ac58fb5234 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/itemLibraryQmlSources/Assets.qml2
-rw-r--r--share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml2
-rw-r--r--share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml2
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/SearchBox.qml4
4 files changed, 9 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/Assets.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/Assets.qml
index b63280b368..d88b129794 100644
--- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/Assets.qml
+++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/Assets.qml
@@ -440,6 +440,8 @@ Item {
id: searchBox
width: parent.width - addAssetButton.width - 5
+
+ onSearchChanged: (searchText) => rootView.handleSearchfilterChanged(searchText)
}
IconButton {
diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
index ae39fdb5e3..8a926e2273 100644
--- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
+++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
@@ -225,6 +225,8 @@ Item {
id: searchBox
width: parent.width - addModuleButton.width - 5
+
+ onSearchChanged: (searchText) => rootView.handleSearchfilterChanged(searchText)
}
IconButton {
diff --git a/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml b/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml
index d9d207b555..756a7a98a6 100644
--- a/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml
+++ b/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml
@@ -234,6 +234,8 @@ Item {
id: searchBox
width: root.width - addMaterialButton.width
+
+ onSearchChanged: (searchText) => rootView.handleSearchfilterChanged(searchText)
}
IconButton {
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/SearchBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/SearchBox.qml
index c50d2e1d68..3b4f785faa 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/SearchBox.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/SearchBox.qml
@@ -33,6 +33,8 @@ Item {
property alias text: searchFilterText.text
+ signal searchChanged(string searchText);
+
function clear()
{
searchFilterText.text = "";
@@ -80,7 +82,7 @@ Item {
selectByMouse: true
hoverEnabled: true
- onTextChanged: rootView.handleSearchfilterChanged(text)
+ onTextChanged: root.searchChanged(text)
Label {
text: StudioTheme.Constants.search