all: use UntypedObjectModel instead of ObjectModel in Q_PROPERTY

Fixes qmllint/qmlls type deduction for ObjectModels
This commit is contained in:
outfoxxed 2024-11-01 03:12:07 -07:00
parent 746b0e70d7
commit 98cdb87181
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
9 changed files with 33 additions and 11 deletions

View file

@ -10,6 +10,7 @@
#include <qqmllist.h>
#include <qtmetamacros.h>
#include "../../core/doc.hpp"
#include "../../core/model.hpp"
#include "player.hpp"
@ -46,7 +47,8 @@ class MprisQml: public QObject {
QML_NAMED_ELEMENT(Mpris);
QML_SINGLETON;
/// All connected MPRIS players.
Q_PROPERTY(ObjectModel<qs::service::mpris::MprisPlayer>* players READ players CONSTANT);
QSDOC_TYPE_OVERRIDE(ObjectModel<qs::service::mpris::MprisPlayer>*);
Q_PROPERTY(UntypedObjectModel* players READ players CONSTANT);
public:
explicit MprisQml(QObject* parent = nullptr): QObject(parent) {};