Replace a writable position() property with a seek() method.
Seeking is sometimes asynchronous, and more importantly nearly every one using a slider for seeking ends up with a binding loop. Change-Id: I45d92e19b0276c8b97c51c073754d1c9d3dc611e Reviewed-by: Ling Hu <ling.hu@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
940ef93c30
commit
c88abd0177
@@ -82,7 +82,7 @@ class QDeclarativeAudio : public QObject, public QQmlParserStatus
|
||||
Q_PROPERTY(bool autoLoad READ isAutoLoad WRITE setAutoLoad NOTIFY autoLoadChanged)
|
||||
Q_PROPERTY(Status status READ status NOTIFY statusChanged)
|
||||
Q_PROPERTY(int duration READ duration NOTIFY durationChanged)
|
||||
Q_PROPERTY(int position READ position WRITE setPosition NOTIFY positionChanged)
|
||||
Q_PROPERTY(int position READ position NOTIFY positionChanged)
|
||||
Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged)
|
||||
Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
|
||||
Q_PROPERTY(bool hasAudio READ hasAudio NOTIFY hasAudioChanged)
|
||||
@@ -171,7 +171,6 @@ public:
|
||||
int duration() const;
|
||||
|
||||
int position() const;
|
||||
void setPosition(int position);
|
||||
|
||||
qreal volume() const;
|
||||
void setVolume(qreal volume);
|
||||
@@ -200,6 +199,7 @@ public Q_SLOTS:
|
||||
void play();
|
||||
void pause();
|
||||
void stop();
|
||||
void seek(int position);
|
||||
|
||||
Q_SIGNALS:
|
||||
void sourceChanged();
|
||||
|
||||
Reference in New Issue
Block a user