all: use fully qualified type names in Q_PROPERTY

Fixes type deduction issues with qmllint/qmlls.
This commit is contained in:
outfoxxed 2024-11-01 01:43:22 -07:00
parent a931adf033
commit 746b0e70d7
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
14 changed files with 52 additions and 40 deletions

View file

@ -53,15 +53,17 @@ class UPowerQml: public QObject {
Q_OBJECT;
QML_NAMED_ELEMENT(UPower);
QML_SINGLETON;
// clang-format off
/// UPower's DisplayDevice for your system. Can be `null`.
///
/// This is an aggregate device and not a physical one, meaning you will not find it in @@devices.
/// It is typically the device that is used for displaying information in desktop environments.
Q_PROPERTY(UPowerDevice* displayDevice READ displayDevice NOTIFY displayDeviceChanged);
Q_PROPERTY(qs::service::upower::UPowerDevice* displayDevice READ displayDevice NOTIFY displayDeviceChanged);
/// All connected UPower devices.
Q_PROPERTY(ObjectModel<UPowerDevice>* devices READ devices CONSTANT);
Q_PROPERTY(ObjectModel<qs::service::upower::UPowerDevice>* 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
public:
explicit UPowerQml(QObject* parent = nullptr);