From d6c022a8b01715f50d227c938beed680ac40ace0 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 28 Dec 2012 18:32:05 +0100 Subject: Krazy fixes, second shot (normalize) --- src/history/historymodels.cpp | 48 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'src/history') diff --git a/src/history/historymodels.cpp b/src/history/historymodels.cpp index 48cdc78e..4888ca42 100644 --- a/src/history/historymodels.cpp +++ b/src/history/historymodels.cpp @@ -223,12 +223,12 @@ void HistoryFilterModel::setSourceModel(QAbstractItemModel *newSourceModel) if (sourceModel()) { disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); - disconnect(sourceModel(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), - this, SLOT(dataChanged(QModelIndex, QModelIndex))); - disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex, int, int)), - this, SLOT(sourceRowsInserted(QModelIndex, int, int))); - disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex, int, int)), - this, SLOT(sourceRowsRemoved(QModelIndex, int, int))); + disconnect(sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(dataChanged(QModelIndex,QModelIndex))); + disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(sourceRowsInserted(QModelIndex,int,int))); + disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); } QAbstractProxyModel::setSourceModel(newSourceModel); @@ -237,12 +237,12 @@ void HistoryFilterModel::setSourceModel(QAbstractItemModel *newSourceModel) { m_loaded = false; connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); - connect(sourceModel(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), - this, SLOT(sourceDataChanged(QModelIndex, QModelIndex))); - connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex, int, int)), - this, SLOT(sourceRowsInserted(QModelIndex, int, int))); - connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex, int, int)), - this, SLOT(sourceRowsRemoved(QModelIndex, int, int))); + connect(sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(sourceDataChanged(QModelIndex,QModelIndex))); + connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(sourceRowsInserted(QModelIndex,int,int))); + connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); } } @@ -404,16 +404,16 @@ bool HistoryFilterModel::removeRows(int row, int count, const QModelIndex &paren if (row < 0 || count <= 0 || row + count > rowCount(parent) || parent.isValid()) return false; int lastRow = row + count - 1; - disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex, int, int)), - this, SLOT(sourceRowsRemoved(QModelIndex, int, int))); + disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); beginRemoveRows(parent, row, lastRow); int oldCount = rowCount(); int start = sourceModel()->rowCount() - m_sourceRow.value(row); int end = sourceModel()->rowCount() - m_sourceRow.value(lastRow); sourceModel()->removeRows(start, end - start + 1); endRemoveRows(); - connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex, int, int)), - this, SLOT(sourceRowsRemoved(QModelIndex, int, int))); + connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); m_loaded = false; if (oldCount - count != rowCount()) reset(); @@ -624,10 +624,10 @@ void HistoryTreeModel::setSourceModel(QAbstractItemModel *newSourceModel) { disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); disconnect(sourceModel(), SIGNAL(layoutChanged()), this, SLOT(sourceReset())); - disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex, int, int)), - this, SLOT(sourceRowsInserted(QModelIndex, int, int))); - disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex, int, int)), - this, SLOT(sourceRowsRemoved(QModelIndex, int, int))); + disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(sourceRowsInserted(QModelIndex,int,int))); + disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); } QAbstractProxyModel::setSourceModel(newSourceModel); @@ -636,10 +636,10 @@ void HistoryTreeModel::setSourceModel(QAbstractItemModel *newSourceModel) { connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset())); connect(sourceModel(), SIGNAL(layoutChanged()), this, SLOT(sourceReset())); - connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex, int, int)), - this, SLOT(sourceRowsInserted(QModelIndex, int, int))); - connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex, int, int)), - this, SLOT(sourceRowsRemoved(QModelIndex, int, int))); + connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(sourceRowsInserted(QModelIndex,int,int))); + connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(sourceRowsRemoved(QModelIndex,int,int))); } reset(); -- cgit v1.2.1