QTreeWidget: use QSignalBlocker
Change-Id: I0b69cd5680dfae6349bd4a952f358fe0b4acb2ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>bb10
parent
694e822080
commit
180e28ef50
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue