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
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
9 changed files with 33 additions and 11 deletions

View file

@ -6,6 +6,7 @@
#include <qqmlintegration.h>
#include <qtmetamacros.h>
#include "../../core/doc.hpp"
#include "../../core/model.hpp"
#include "../../core/reload.hpp"
#include "notification.hpp"
@ -67,7 +68,8 @@ class NotificationServerQml
/// If the notification server should advertise that it supports images. Defaults to false.
Q_PROPERTY(bool imageSupported READ imageSupported WRITE setImageSupported NOTIFY imageSupportedChanged);
/// All notifications currently tracked by the server.
Q_PROPERTY(ObjectModel<qs::service::notifications::Notification>* trackedNotifications READ trackedNotifications NOTIFY trackedNotificationsChanged);
QSDOC_TYPE_OVERRIDE(ObjectModel<qs::service::notifications::Notification>*);
Q_PROPERTY(UntypedObjectModel* trackedNotifications READ trackedNotifications NOTIFY trackedNotificationsChanged);
/// Extra hints to expose to notification clients.
Q_PROPERTY(QVector<QString> extraHints READ extraHints WRITE setExtraHints NOTIFY extraHintsChanged);
// clang-format on