From 7319c194cd3d80776c8de3bf0ff2cd36fdd217e0 Mon Sep 17 00:00:00 2001 From: Andras Becsi Date: Wed, 7 Nov 2012 14:44:28 +0100 Subject: 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 --- src/imports/multimedia/qdeclarativeaudio_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports') 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) -- cgit v1.2.3