diff options
author | Sze Howe Koh <szehowe.koh@gmail.com> | 2013-11-09 00:15:21 +0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-23 00:30:30 +0100 |
commit | eb221bfd6d68a8028d55c344cb29bf8defd2a81e (patch) | |
tree | cf309b128512794af45812bf340aa5c79529c59c | |
parent | 2c7e734c8b4decc89820cc946ff72c89aee5cde5 (diff) |
Doc: Document asynchronous nature of QMediaPlayer::setMedia()
The function name can be interpreted to mean that it loads the media.
Users have made this mistake before:
http://comments.gmane.org/gmane.comp.lib.qt.user/9189
https://bugreports.qt-project.org/browse/QTBUG-28514
Change-Id: I9e9b36405d67d40db42b77d8eeb8f9d528ee16e2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
-rw-r--r-- | src/multimedia/playback/qmediaplayer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index eaac82820..bf6294a1e 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -864,6 +864,11 @@ void QMediaPlayer::setPlaybackRate(qreal rate) Setting the media to a null QMediaContent will cause the player to discard all information relating to the current media source and to cease all I/O operations related to that media. + + \note This function returns immediately after recording the specified source of the media. + It does not wait for the media to finish loading and does not check for errors. Listen for + the mediaStatusChanged() and error() signals to be notified when the media is loaded and + when an error occurs during loading. */ void QMediaPlayer::setMedia(const QMediaContent &media, QIODevice *stream) |