summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-01-02 17:26:31 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-06 00:46:18 +0100
commit17cc46a9a73a419619f2c13f26ef228325aa4a85 (patch)
tree667c15ed7e083e3ffcb06a13bec2f5037fdf2c6c /src/widgets
parent7023bb1d35a0c8f0a618f47065762f46465fc2df (diff)
Add the roles to the dataChanged slot.
This will allow the possibility of ignoring dataChange signals for roles which are not interesting to particular widgets. Change-Id: Ia7dcebd875f7b9fa90aa5e9bff7ef5ca9f381d55 Reviewed-by: David Faure <faure@kde.org>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/itemviews/qdatawidgetmapper.cpp12
-rw-r--r--src/widgets/itemviews/qdatawidgetmapper.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/itemviews/qdatawidgetmapper.cpp b/src/widgets/itemviews/qdatawidgetmapper.cpp
index 3574d63d1c..34699039c4 100644
--- a/src/widgets/itemviews/qdatawidgetmapper.cpp
+++ b/src/widgets/itemviews/qdatawidgetmapper.cpp
@@ -104,7 +104,7 @@ public:
void populate();
// private slots
- void _q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void _q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &);
void _q_commitData(QWidget *);
void _q_closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint);
void _q_modelDestroyed();
@@ -182,7 +182,7 @@ static bool qContainsIndex(const QModelIndex &idx, const QModelIndex &topLeft,
&& idx.column() >= topLeft.column() && idx.column() <= bottomRight.column();
}
-void QDataWidgetMapperPrivate::_q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+void QDataWidgetMapperPrivate::_q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &)
{
if (topLeft.parent() != rootIndex)
return; // not in our hierarchy
@@ -369,8 +369,8 @@ void QDataWidgetMapper::setModel(QAbstractItemModel *model)
return;
if (d->model) {
- disconnect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this,
- SLOT(_q_dataChanged(QModelIndex,QModelIndex)));
+ disconnect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QSet<int>)), this,
+ SLOT(_q_dataChanged(QModelIndex,QModelIndex,QSet<int>)));
disconnect(d->model, SIGNAL(destroyed()), this,
SLOT(_q_modelDestroyed()));
}
@@ -380,8 +380,8 @@ void QDataWidgetMapper::setModel(QAbstractItemModel *model)
d->model = model;
- connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
- SLOT(_q_dataChanged(QModelIndex,QModelIndex)));
+ connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QSet<int>)),
+ SLOT(_q_dataChanged(QModelIndex,QModelIndex,QSet<int>)));
connect(model, SIGNAL(destroyed()), SLOT(_q_modelDestroyed()));
}
diff --git a/src/widgets/itemviews/qdatawidgetmapper.h b/src/widgets/itemviews/qdatawidgetmapper.h
index 36b208529c..5ffb666fbd 100644
--- a/src/widgets/itemviews/qdatawidgetmapper.h
+++ b/src/widgets/itemviews/qdatawidgetmapper.h
@@ -113,7 +113,7 @@ Q_SIGNALS:
private:
Q_DECLARE_PRIVATE(QDataWidgetMapper)
Q_DISABLE_COPY(QDataWidgetMapper)
- Q_PRIVATE_SLOT(d_func(), void _q_dataChanged(const QModelIndex &, const QModelIndex &))
+ Q_PRIVATE_SLOT(d_func(), void _q_dataChanged(const QModelIndex &, const QModelIndex &, const QSet<int> &))
Q_PRIVATE_SLOT(d_func(), void _q_commitData(QWidget *))
Q_PRIVATE_SLOT(d_func(), void _q_closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint))
Q_PRIVATE_SLOT(d_func(), void _q_modelDestroyed())