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

@ -9,6 +9,7 @@
#include <qqmlintegration.h>
#include <qtmetamacros.h>
#include "doc.hpp"
#include "model.hpp"
class DesktopAction;
@ -139,7 +140,8 @@ private:
class DesktopEntries: public QObject {
Q_OBJECT;
/// All desktop entries of type Application that are not Hidden or NoDisplay.
Q_PROPERTY(ObjectModel<DesktopEntry>* applications READ applications CONSTANT);
QSDOC_TYPE_OVERRIDE(ObjectModel<DesktopEntry>*);
Q_PROPERTY(UntypedObjectModel* applications READ applications CONSTANT);
QML_ELEMENT;
QML_SINGLETON;

View file

@ -18,3 +18,6 @@
// overridden properties
#define QSDOC_PROPERTY_OVERRIDE(...)
// override types of properties for docs
#define QSDOC_TYPE_OVERRIDE(type)