@@ -117,7 +117,7 @@ class MprisPlayer: public QObject {
117117 // / The length of the playing track, as seconds, with millisecond precision,
118118 // / or the value of @@position if @@lengthSupported is false.
119119 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 );
121121 // / The volume of the playing track from 0.0 to 1.0, or 1.0 if @@volumeSupported is false.
122122 // /
123123 // / May only be written to if @@canControl and @@volumeSupported are true.
@@ -274,7 +274,7 @@ class MprisPlayer: public QObject {
274274 void setPosition (qreal position);
275275
276276 [[nodiscard]] qreal length () const ;
277- [[nodiscard]] bool lengthSupported () const ;
277+ [[nodiscard]] QBindable< bool > bindableLengthSupported () const { return & this -> bLengthSupported ; }
278278
279279 [[nodiscard]] qreal volume () const { return this ->bVolume ; };
280280 [[nodiscard]] bool volumeSupported () const ;
@@ -447,6 +447,7 @@ private slots:
447447 Q_OBJECT_BINDABLE_PROPERTY (MprisPlayer, QString, bTrackAlbumArtist, &MprisPlayer::trackAlbumArtistChanged);
448448 Q_OBJECT_BINDABLE_PROPERTY (MprisPlayer, QString, bTrackArtUrl, &MprisPlayer::trackArtUrlChanged);
449449 Q_OBJECT_BINDABLE_PROPERTY (MprisPlayer, qlonglong, bInternalLength, &MprisPlayer::lengthChanged);
450+ Q_OBJECT_BINDABLE_PROPERTY (MprisPlayer, bool , bLengthSupported, &MprisPlayer::lengthSupportedChanged);
450451 Q_OBJECT_BINDABLE_PROPERTY (MprisPlayer, bool , bShuffle, &MprisPlayer::shuffleChanged);
451452
452453 QS_DBUS_BINDABLE_PROPERTY_GROUP (MprisPlayer, playerProperties);
0 commit comments