diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-08-25 16:32:24 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-25 13:59:45 -0700 |
commit | 3d5dde09adfce0631746eb8b8552dd47e6743c76 (patch) | |
tree | efaf8a30a878d2e3bc0a85b75c6e70167da4bd52 /qt-ui/statistics | |
parent | b01ef9a0a5da0467aa7630ec1e903331ba4a2d33 (diff) | |
download | subsurface-3d5dde09adfce0631746eb8b8552dd47e6743c76.tar.gz |
Use aboutToBeRemoved instead of removed
If we used removed things from the interface we could hit a dangling
pointer, so first delete the items, then let the system delete the rows.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/statistics')
-rw-r--r-- | qt-ui/statistics/statisticswidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/statistics/statisticswidget.cpp b/qt-ui/statistics/statisticswidget.cpp index 89555eb23..471814300 100644 --- a/qt-ui/statistics/statisticswidget.cpp +++ b/qt-ui/statistics/statisticswidget.cpp @@ -11,7 +11,7 @@ void YearlyStatisticsWidget::setModel(YearlyStatisticsModel *m) m_model = m; connect(m, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(modelDataChanged(QModelIndex,QModelIndex))); - connect(m, SIGNAL(rowsRemoved(QModelIndex,int,int)), + connect(m, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), this, SLOT(modelRowsRemoved(QModelIndex,int,int))); connect(m, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(modelRowsInserted(QModelIndex,int,int))); |