aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-08-25 16:32:24 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-25 13:59:45 -0700
commit3d5dde09adfce0631746eb8b8552dd47e6743c76 (patch)
treeefaf8a30a878d2e3bc0a85b75c6e70167da4bd52 /qt-ui
parentb01ef9a0a5da0467aa7630ec1e903331ba4a2d33 (diff)
downloadsubsurface-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')
-rw-r--r--qt-ui/statistics/statisticswidget.cpp2
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)));