From b58631ce472ce2bfce6319874468aa4e7e11b405 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sun, 26 Feb 2012 10:54:07 +0100 Subject: Don't use deprecated QAbstractItemModel::reset() Change-Id: Idf9971668a372a12ba319d954c35e157d8a08bd1 Reviewed-by: Stephen Kelly --- src/widgets/util/qcompleter.cpp | 3 ++- src/widgets/util/qundoview.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/widgets/util') diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp index 503e5aa596..d416f26f51 100644 --- a/src/widgets/util/qcompleter.cpp +++ b/src/widgets/util/qcompleter.cpp @@ -421,7 +421,8 @@ void QCompletionModel::filter(const QStringList& parts) void QCompletionModel::resetModel() { if (rowCount() == 0) { - reset(); + beginResetModel(); + endResetModel(); return; } diff --git a/src/widgets/util/qundoview.cpp b/src/widgets/util/qundoview.cpp index 4b09d5fc70..a87e9e0f05 100644 --- a/src/widgets/util/qundoview.cpp +++ b/src/widgets/util/qundoview.cpp @@ -142,7 +142,8 @@ void QUndoModel::stackDestroyed(QObject *obj) void QUndoModel::stackChanged() { - reset(); + beginResetModel(); + endResetModel(); m_sel_model->setCurrentIndex(selectedIndex(), QItemSelectionModel::ClearAndSelect); } -- cgit v1.2.3