diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2012-06-05 16:29:35 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2012-06-05 17:11:32 -0300 |
commit | 855d0368ebd844b6582c5ea0692cf6fdd8e4ee73 (patch) | |
tree | 5c0ab4353d7e238fdbb3b60ae0af98e250016b69 | |
parent | 02fcb503beb2f742ccb09d76ecc8df9df462f94b (diff) |
TabsModel::remove should not emit a dataChanged signal.
A dataChanged signal is not meant to be used when removing a row,
because the inner workings of a model expect to operate over a
still existing row, and insert it back on the model.
Without this patch you can see Snowshoe crashing by opening 5 tabs
(or any number whose modulo by 4 is 1; 4 is not magical, just the
number of tabs per page on the paged grid) and closing one.
Reviewed-by: Rafael Brandão
-rw-r--r-- | src/core/TabsModel.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/core/TabsModel.cpp b/src/core/TabsModel.cpp index 5c6c1a6..27eea6b 100644 --- a/src/core/TabsModel.cpp +++ b/src/core/TabsModel.cpp @@ -82,8 +82,6 @@ void TabsModel::remove(int pos) QPointer<QObject> item = m_list.takeAt(pos); endRemoveRows(); delete item; - QModelIndex start = createIndex(pos, 0), end = createIndex(m_list.size() - 1, 0); - emit dataChanged(start, end); if (currentWebViewIndex() < 0) return; |