summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2012-11-07 14:44:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-07 16:20:22 +0100
commit7319c194cd3d80776c8de3bf0ff2cd36fdd217e0 (patch)
treec5bc1a1d31c3155a0b7410ca94bc10fbdd583641
parent74e44a6ef60120c3284b07a29d35d8d771c7d4f6 (diff)
Fix the bufferProgress property of QDeclarativeAudio
The bufferProgress property of QDeclarativeAudio is documented to hold how much of the data buffer is currently filled, from 0.0 (empty) to 1.0 (full) and should be declared to be of type qreal instead of int. The implementation was correctly normalizing the buffer status percentage to the [0, 1] range but the returned value was truncated to int in QML because of the faulty property declaration. Change-Id: I494c9cd14f4b3ec511759ae66a50e9f96bcb1452 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
-rw-r--r--src/imports/multimedia/qdeclarativeaudio_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/multimedia/qdeclarativeaudio_p.h b/src/imports/multimedia/qdeclarativeaudio_p.h
index f45a1f0a8..3164f4d4b 100644
--- a/src/imports/multimedia/qdeclarativeaudio_p.h
+++ b/src/imports/multimedia/qdeclarativeaudio_p.h
@@ -87,7 +87,7 @@ class QDeclarativeAudio : public QObject, public QQmlParserStatus
Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
Q_PROPERTY(bool hasAudio READ hasAudio NOTIFY hasAudioChanged)
Q_PROPERTY(bool hasVideo READ hasVideo NOTIFY hasVideoChanged)
- Q_PROPERTY(int bufferProgress READ bufferProgress NOTIFY bufferProgressChanged)
+ Q_PROPERTY(qreal bufferProgress READ bufferProgress NOTIFY bufferProgressChanged)
Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged)
Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged)
Q_PROPERTY(Error error READ error NOTIFY errorChanged)