mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2025-11-04 19:04:56 +11:00
all: use UntypedObjectModel instead of ObjectModel in Q_PROPERTY
Fixes qmllint/qmlls type deduction for ObjectModels
This commit is contained in:
parent
746b0e70d7
commit
98cdb87181
9 changed files with 33 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue