Skip to content

kickoff: Use Item as searchField property type

Kai Uwe Broulik requested to merge work/kbroulik/kickoff-searchfield-type into master

This works around a Qt bug where assigning the SearchField from the Header fails because of a type mismatch:

"Cannot assign QObject* to TextField_QMLTYPE_8*"


PlasmaExtras.SearchField is a PlasmaExtras.ActionTextField is a QQC2.TextField, so this should work. But for some reason it sees the searchField in [1] as plain QObject instead of what it really is.

I haven’t been able to reproduce it in a minimal example. I assume it’s got to do with declarative type registration, qmltc, and/or the way Plasma creates the full representation vs the main QML.

@davidedmundson @nicolasfella @fabiank

[1] https://invent.kde.org/plasma/plasma-desktop/-/blob/master/applets/kickoff/package/contents/ui/Header.qml?ref_type=heads#L176

Merge request reports