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

@ -7,6 +7,7 @@
#include <qqmllist.h>
#include <qtmetamacros.h>
#include "../../core/doc.hpp"
#include "../../core/model.hpp"
#include "../../dbus/properties.hpp"
#include "dbus_service.h"
@ -60,7 +61,8 @@ class UPowerQml: public QObject {
/// It is typically the device that is used for displaying information in desktop environments.
Q_PROPERTY(qs::service::upower::UPowerDevice* displayDevice READ displayDevice NOTIFY displayDeviceChanged);
/// All connected UPower devices.
Q_PROPERTY(ObjectModel<qs::service::upower::UPowerDevice>* devices READ devices CONSTANT);
QSDOC_TYPE_OVERRIDE(ObjectModel<qs::service::upower::UPowerDevice>*);
Q_PROPERTY(UntypedObjectModel* devices READ devices CONSTANT);
/// If the system is currently running on battery power, or discharging.
Q_PROPERTY(bool onBattery READ onBattery NOTIFY onBatteryChanged);
// clang-format on