Commit 6bccf331 authored by David Edmundson's avatar David Edmundson
Browse files

Fix searching in FacesConfig

KItemModels API changed between the time this was written and
KItemModel's having the relevant patch merged. This wasn't updated.

BUG: 422835
parent 3a133b70
......@@ -234,8 +234,9 @@ ColumnLayout {
filterCaseSensitivity: Qt.CaseInsensitive
filterString: searchQuery.text
sourceModel: KItemModels.KSortFilterProxyModel {
filterRole: "SensorId"
filterRowCallback: function(row, value) {
filterRowCallback: function(source_row, source_parent) {
//filter only items which were leaf nodes from before we squashed everything
var value = sourceModel.data(sourceModel.index(source_row, 0, source_parent), Sensors.SensorTreeModel.SensorId)
return (value && value.length)
}
sourceModel: KItemModels.KDescendantsProxyModel {
......
......@@ -382,9 +382,11 @@ void SensorTreeModel::init()
connect(query, &SensorQuery::finished, [query, this]() {
query->deleteLater();
const auto result = query->result();
beginResetModel();
for (auto pair : result) {
d->addSensor(pair.first, pair.second);
}
endResetModel();
});
query->execute();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment