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>
This commit is contained in:
Sze Howe Koh
2013-11-09 00:15:21 +08:00
committed by The Qt Project
parent 2c7e734c8b
commit eb221bfd6d

View File

@@ -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)