diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-08-01 16:33:03 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-01 22:27:37 +0200 |
commit | 218fff76d51e29f7808ce670a7c61ef9c429046f (patch) | |
tree | 47e7b1e6095ecd0fd2aed689e7ac297ff3a82599 /examples | |
parent | cfa44b12bea5ad1201333a6ed4106e2c4762407d (diff) |
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 <stephen.kelly@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/player/playlistmodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/player/playlistmodel.cpp b/examples/player/playlistmodel.cpp index da3f09c6c..50a663445 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) |