diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-07-09 09:56:56 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-13 01:51:44 +0200 |
commit | 536ec793b69c16611e73cff4360c6f49b644f740 (patch) | |
tree | be2a36264a4cb22a131944e10918bdc089ae24e2 /src/corelib/itemmodels/qabstractitemmodel.cpp | |
parent | 0efa445141ce3d7243f28e7b6da730d8dec17e23 (diff) |
Make it possible to use new syntax to connect to model signals.
The private signals can not be used as function pointers, as
required by the new syntax, so we introduce a parameter which
can only be created privately.
Change-Id: I3d7bb8a163e764d685e8007cba831fb77e3c6855
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/itemmodels/qabstractitemmodel.cpp')
-rw-r--r-- | src/corelib/itemmodels/qabstractitemmodel.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index c78287759b..e4cd8f8e01 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -2483,7 +2483,7 @@ void QAbstractItemModel::beginInsertRows(const QModelIndex &parent, int first, i Q_ASSERT(last >= first); Q_D(QAbstractItemModel); d->changes.push(QAbstractItemModelPrivate::Change(parent, first, last)); - emit rowsAboutToBeInserted(parent, first, last); + emit rowsAboutToBeInserted(parent, first, last, QPrivateSignal()); d->rowsAboutToBeInserted(parent, first, last); } @@ -2500,7 +2500,7 @@ void QAbstractItemModel::endInsertRows() Q_D(QAbstractItemModel); QAbstractItemModelPrivate::Change change = d->changes.pop(); d->rowsInserted(change.parent, change.first, change.last); - emit rowsInserted(change.parent, change.first, change.last); + emit rowsInserted(change.parent, change.first, change.last, QPrivateSignal()); } /*! @@ -2537,7 +2537,7 @@ void QAbstractItemModel::beginRemoveRows(const QModelIndex &parent, int first, i Q_ASSERT(last >= first); Q_D(QAbstractItemModel); d->changes.push(QAbstractItemModelPrivate::Change(parent, first, last)); - emit rowsAboutToBeRemoved(parent, first, last); + emit rowsAboutToBeRemoved(parent, first, last, QPrivateSignal()); d->rowsAboutToBeRemoved(parent, first, last); } @@ -2554,7 +2554,7 @@ void QAbstractItemModel::endRemoveRows() Q_D(QAbstractItemModel); QAbstractItemModelPrivate::Change change = d->changes.pop(); d->rowsRemoved(change.parent, change.first, change.last); - emit rowsRemoved(change.parent, change.first, change.last); + emit rowsRemoved(change.parent, change.first, change.last, QPrivateSignal()); } /*! @@ -2699,7 +2699,7 @@ bool QAbstractItemModel::beginMoveRows(const QModelIndex &sourceParent, int sour destinationChange.needsAdjust = destinationParent.isValid() && destinationParent.row() >= sourceLast && destinationParent.parent() == sourceParent; d->changes.push(destinationChange); - emit rowsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild); + emit rowsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, QPrivateSignal()); d->itemsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Vertical); return true; } @@ -2734,7 +2734,7 @@ void QAbstractItemModel::endMoveRows() d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Vertical); - emit rowsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first); + emit rowsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, QPrivateSignal()); } /*! @@ -2784,7 +2784,7 @@ void QAbstractItemModel::beginInsertColumns(const QModelIndex &parent, int first Q_ASSERT(last >= first); Q_D(QAbstractItemModel); d->changes.push(QAbstractItemModelPrivate::Change(parent, first, last)); - emit columnsAboutToBeInserted(parent, first, last); + emit columnsAboutToBeInserted(parent, first, last, QPrivateSignal()); d->columnsAboutToBeInserted(parent, first, last); } @@ -2802,7 +2802,7 @@ void QAbstractItemModel::endInsertColumns() Q_D(QAbstractItemModel); QAbstractItemModelPrivate::Change change = d->changes.pop(); d->columnsInserted(change.parent, change.first, change.last); - emit columnsInserted(change.parent, change.first, change.last); + emit columnsInserted(change.parent, change.first, change.last, QPrivateSignal()); } /*! @@ -2839,7 +2839,7 @@ void QAbstractItemModel::beginRemoveColumns(const QModelIndex &parent, int first Q_ASSERT(last >= first); Q_D(QAbstractItemModel); d->changes.push(QAbstractItemModelPrivate::Change(parent, first, last)); - emit columnsAboutToBeRemoved(parent, first, last); + emit columnsAboutToBeRemoved(parent, first, last, QPrivateSignal()); d->columnsAboutToBeRemoved(parent, first, last); } @@ -2856,7 +2856,7 @@ void QAbstractItemModel::endRemoveColumns() Q_D(QAbstractItemModel); QAbstractItemModelPrivate::Change change = d->changes.pop(); d->columnsRemoved(change.parent, change.first, change.last); - emit columnsRemoved(change.parent, change.first, change.last); + emit columnsRemoved(change.parent, change.first, change.last, QPrivateSignal()); } /*! @@ -2918,7 +2918,7 @@ bool QAbstractItemModel::beginMoveColumns(const QModelIndex &sourceParent, int s d->itemsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Horizontal); - emit columnsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild); + emit columnsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, QPrivateSignal()); return true; } @@ -2952,7 +2952,7 @@ void QAbstractItemModel::endMoveColumns() d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Horizontal); - emit columnsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first); + emit columnsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, QPrivateSignal()); } /*! @@ -3002,7 +3002,7 @@ void QAbstractItemModel::endMoveColumns() */ void QAbstractItemModel::beginResetModel() { - emit modelAboutToBeReset(); + emit modelAboutToBeReset(QPrivateSignal()); } /*! @@ -3020,7 +3020,7 @@ void QAbstractItemModel::endResetModel() { Q_D(QAbstractItemModel); d->invalidatePersistentIndexes(); - emit modelReset(); + emit modelReset(QPrivateSignal()); } /*! |