Fix possible crash

The filter model needs to remove rows before the view tries to find
the next row to select. Otherwise the filtermodel might access the
source model at a position that is out of bounds.

Change-Id: Id610455f32e7c7fe921c243537def0097b46a798
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2012-10-05 14:32:40 +02:00
parent 996479e64f
commit 8d1e87c790
2 changed files with 4 additions and 4 deletions

View File

@@ -164,7 +164,7 @@ public:
QModelIndex mapFromSource(const QModelIndex &idx) const;
private slots:
void handleNewRows(const QModelIndex &index, int first, int last);
void handleRemovedRows(const QModelIndex &index, int first, int last);
void handleRowsAboutToBeRemoved(const QModelIndex &index, int first, int last);
void handleDataChanged(QModelIndex,QModelIndex bottom);
void handleReset();