@@ -117,7 +117,7 @@ class MprisPlayer: public QObject {
117
117
// / The length of the playing track, as seconds, with millisecond precision,
118
118
// / or the value of @@position if @@lengthSupported is false.
119
119
Q_PROPERTY (qreal length READ length NOTIFY lengthChanged);
120
- Q_PROPERTY (bool lengthSupported READ lengthSupported NOTIFY lengthSupportedChanged);
120
+ Q_PROPERTY (bool lengthSupported READ default NOTIFY lengthSupportedChanged BINDABLE bindableLengthSupported );
121
121
// / The volume of the playing track from 0.0 to 1.0, or 1.0 if @@volumeSupported is false.
122
122
// /
123
123
// / May only be written to if @@canControl and @@volumeSupported are true.
@@ -274,7 +274,7 @@ class MprisPlayer: public QObject {
274
274
void setPosition (qreal position);
275
275
276
276
[[nodiscard]] qreal length () const ;
277
- [[nodiscard]] bool lengthSupported () const ;
277
+ [[nodiscard]] QBindable< bool > bindableLengthSupported () const { return & this -> bLengthSupported ; }
278
278
279
279
[[nodiscard]] qreal volume () const { return this ->bVolume ; };
280
280
[[nodiscard]] bool volumeSupported () const ;
@@ -447,6 +447,7 @@ private slots:
447
447
Q_OBJECT_BINDABLE_PROPERTY (MprisPlayer, QString, bTrackAlbumArtist, &MprisPlayer::trackAlbumArtistChanged);
448
448
Q_OBJECT_BINDABLE_PROPERTY (MprisPlayer, QString, bTrackArtUrl, &MprisPlayer::trackArtUrlChanged);
449
449
Q_OBJECT_BINDABLE_PROPERTY (MprisPlayer, qlonglong, bInternalLength, &MprisPlayer::lengthChanged);
450
+ Q_OBJECT_BINDABLE_PROPERTY (MprisPlayer, bool , bLengthSupported, &MprisPlayer::lengthSupportedChanged);
450
451
Q_OBJECT_BINDABLE_PROPERTY (MprisPlayer, bool , bShuffle, &MprisPlayer::shuffleChanged);
451
452
452
453
QS_DBUS_BINDABLE_PROPERTY_GROUP (MprisPlayer, playerProperties);
0 commit comments