Fix warnings in SearchPage

This commit is contained in:
Tobias Fella
2025-08-13 18:56:37 +02:00
parent 78b218fef3
commit 0bcf6e74c0

View File

@@ -134,8 +134,8 @@ Kirigami.ScrollablePage {
Keys.onReturnPressed: searchButton.clicked()
onTextChanged: {
searchTimer.restart();
if (model) {
model.searchText = text;
if (root.model) {
root.model.searchText = text;
}
}
}
@@ -147,8 +147,8 @@ Kirigami.ScrollablePage {
text: i18nc("@action:button", "Search")
onClicked: {
if (typeof model.search === 'function') {
model.search();
if (typeof root.model.search === 'function') {
root.model.search();
}
}
@@ -160,8 +160,8 @@ Kirigami.ScrollablePage {
id: searchTimer
interval: 500
running: true
onTriggered: if (typeof model.search === 'function') {
model.search();
onTriggered: if (typeof root.model.search === 'function') {
root.model.search();
}
}
}