From: Thiago Macieira Date: Wed, 1 Aug 2012 14:33:03 +0000 (+0200) Subject: QAbstractItemMode::reset() is deprecated, don't use it X-Git-Tag: upstream/5.2.95+rc1~225 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=218fff76d51e29f7808ce670a7c61ef9c429046f;p=platform%2Fupstream%2Fqtmultimedia.git QAbstractItemMode::reset() is deprecated, don't use it Instead, use beginResetModel() before the model is reset, and add endResetModel() after it. Change-Id: Ibac3f2207ed999ed9d703266509b3ad91203f28d Reviewed-by: Stephen Kelly --- diff --git a/examples/player/playlistmodel.cpp b/examples/player/playlistmodel.cpp index da3f09c..50a6634 100644 --- a/examples/player/playlistmodel.cpp +++ b/examples/player/playlistmodel.cpp @@ -106,6 +106,7 @@ void PlaylistModel::setPlaylist(QMediaPlaylist *playlist) disconnect(m_playlist, SIGNAL(mediaChanged(int,int)), this, SLOT(changeItems(int,int))); } + beginResetModel(); m_playlist = playlist; if (m_playlist) { @@ -116,8 +117,7 @@ void PlaylistModel::setPlaylist(QMediaPlaylist *playlist) connect(m_playlist, SIGNAL(mediaChanged(int,int)), this, SLOT(changeItems(int,int))); } - - reset(); + endResetModel(); } bool PlaylistModel::setData(const QModelIndex &index, const QVariant &value, int role)