QTreeWidget: use QSignalBlocker

Change-Id: I0b69cd5680dfae6349bd4a952f358fe0b4acb2ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
bb10
Marc Mutz 2013-10-26 11:06:12 +02:00 committed by The Qt Project
parent 694e822080
commit 180e28ef50
1 changed files with 2 additions and 3 deletions

View File

@ -493,8 +493,7 @@ bool QTreeModel::removeRows(int row, int count, const QModelIndex &parent) {
beginRemoveRows(parent, row, row + count - 1);
bool blockSignal = signalsBlocked();
blockSignals(true);
QSignalBlocker blocker(this);
QTreeWidgetItem *itm = item(parent);
for (int i = row + count - 1; i >= row; --i) {
@ -504,7 +503,7 @@ bool QTreeModel::removeRows(int row, int count, const QModelIndex &parent) {
delete child;
child = 0;
}
blockSignals(blockSignal);
blocker.unblock();
endRemoveRows();
return true;