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
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
14 changed files with 52 additions and 40 deletions

View file

@ -150,11 +150,11 @@ class MprisPlayer: public QObject {
/// - If @@canPause is false, you cannot assign the `Paused` state.
/// - If @@canControl is false, you cannot assign the `Stopped` state.
/// (or any of the others, though their repsective properties will also be false)
Q_PROPERTY(MprisPlaybackState::Enum playbackState READ playbackState WRITE setPlaybackState NOTIFY playbackStateChanged);
Q_PROPERTY(qs::service::mpris::MprisPlaybackState::Enum playbackState READ playbackState WRITE setPlaybackState NOTIFY playbackStateChanged);
/// The loop state of the media player, or `None` if @@loopSupported is false.
///
/// May only be written to if @@canControl and @@loopSupported are true.
Q_PROPERTY(MprisLoopState::Enum loopState READ loopState WRITE setLoopState NOTIFY loopStateChanged);
Q_PROPERTY(qs::service::mpris::MprisLoopState::Enum loopState READ loopState WRITE setLoopState NOTIFY loopStateChanged);
Q_PROPERTY(bool loopSupported READ loopSupported NOTIFY loopSupportedChanged);
/// The speed the song is playing at, as a multiplier.
///

View file

@ -46,7 +46,7 @@ class MprisQml: public QObject {
QML_NAMED_ELEMENT(Mpris);
QML_SINGLETON;
/// All connected MPRIS players.
Q_PROPERTY(ObjectModel<MprisPlayer>* players READ players CONSTANT);
Q_PROPERTY(ObjectModel<qs::service::mpris::MprisPlayer>* players READ players CONSTANT);
public:
explicit MprisQml(QObject* parent = nullptr): QObject(parent) {};