diff --git a/src/boxplotchart/qboxplotmodelmapper.cpp b/src/boxplotchart/qboxplotmodelmapper.cpp index 98cf91f..eb9a8a1 100644 --- a/src/boxplotchart/qboxplotmodelmapper.cpp +++ b/src/boxplotchart/qboxplotmodelmapper.cpp @@ -437,47 +437,6 @@ void QBoxPlotModelMapperPrivate::boxSetsRemoved(QList sets) initializeBoxFromModel(); } -void QBoxPlotModelMapperPrivate::valuesAdded(int index, int count) -{ - if (m_seriesSignalsBlock) - return; - - if (m_count != -1) - m_count += count; - - int boxSetIndex = m_boxSets.indexOf(qobject_cast(QObject::sender())); - - blockModelSignals(); - if (m_orientation == Qt::Vertical) - m_model->insertRows(index + m_first, count); - else - m_model->insertColumns(index + m_first, count); - - for (int j = index; j < index + count; j++) - m_model->setData(boxModelIndex(boxSetIndex + m_firstBoxSetSection, j), m_boxSets.at(boxSetIndex)->at(j)); - - blockModelSignals(false); - initializeBoxFromModel(); -} - -void QBoxPlotModelMapperPrivate::valuesRemoved(int index, int count) -{ - if (m_seriesSignalsBlock) - return; - - if (m_count != -1) - m_count -= count; - - blockModelSignals(); - if (m_orientation == Qt::Vertical) - m_model->removeRows(index + m_first, count); - else - m_model->removeColumns(index + m_first, count); - - blockModelSignals(false); - initializeBoxFromModel(); -} - void QBoxPlotModelMapperPrivate::boxValueChanged(int index) { if (m_seriesSignalsBlock) @@ -513,8 +472,6 @@ void QBoxPlotModelMapperPrivate::initializeBoxFromModel() posInBar++; boxIndex = boxModelIndex(i, posInBar); } - connect(boxSet, SIGNAL(valuesAdded(int,int)), this, SLOT(valuesAdded(int,int))); - connect(boxSet, SIGNAL(valuesRemoved(int,int)), this, SLOT(valuesRemoved(int,int))); connect(boxSet, SIGNAL(valueChanged(int)), this, SLOT(boxValueChanged(int))); m_series->append(boxSet); m_boxSets.append(boxSet); diff --git a/src/boxplotchart/qboxplotmodelmapper_p.h b/src/boxplotchart/qboxplotmodelmapper_p.h index bfeeb80..daeaaff 100644 --- a/src/boxplotchart/qboxplotmodelmapper_p.h +++ b/src/boxplotchart/qboxplotmodelmapper_p.h @@ -58,8 +58,6 @@ public Q_SLOTS: // for the series void boxSetsAdded(QList sets); void boxSetsRemoved(QList sets); - void valuesAdded(int index, int count); - void valuesRemoved(int index, int count); void boxValueChanged(int index); void handleSeriesDestroyed(); diff --git a/tests/boxplottester/mainwidget.cpp b/tests/boxplottester/mainwidget.cpp index 25b5245..b8690a6 100644 --- a/tests/boxplottester/mainwidget.cpp +++ b/tests/boxplottester/mainwidget.cpp @@ -107,7 +107,7 @@ MainWidget::MainWidget(QWidget *parent) : initThemeCombo(grid); initCheckboxes(grid); - m_model = new CustomTableModel; + m_model = new CustomTableModel(); QTableView *tableView = new QTableView; tableView->setModel(m_model); tableView->setMaximumWidth(200);