KService has property(QString, QMetaType::Type) and property(QString), the latter inherited from KSycocaEntry.
property(QString) effectively does property(QString, QMetaType::Unknown). In KF5 this then resolved the actual type via the servicetype file. In KF6 that doesn't happen any more. There is a hardcoded list of properties and their types (https://invent.kde.org/frameworks/kservice/-/blob/master/src/services/kservice.cpp#L432), but for any other property this doesn't work. Explicitly stating the type makes it work.
That's very not obvious. There's a warning printed about the type not being found, but only on debug level and thus off by default.
I see some options:
- Crank up the output to warning level
- Make passing a type parameter mandatory (i.e. remove the second overload). Needs fixing a bunch of consumers, but seems manageable
- 'service->property("Foo", QMetaType::QStringList).toStringList()' is a bit of a mouthful. Can/should we make it something like 'service->property<QStringList>("Foo")'?