summaryrefslogtreecommitdiffstats
path: root/src/contacts/qcontactmanager_p.cpp
diff options
context:
space:
mode:
authorMatt Vogt <matthew.vogt@jollamobile.com>2014-05-22 19:18:55 +1000
committerMatthew Vogt <matthew.vogt@qinetic.com.au>2014-07-18 08:45:20 +0200
commit3b77fe17a82590627d306d5e58ecd5d83fee7893 (patch)
tree555f1e48aa66c18e65748805311bdb90e5f1a706 /src/contacts/qcontactmanager_p.cpp
parent69065fa9fd53ea6955537f5b5dad7f5b88ec2071 (diff)
Extend changed signals to optionally report changed types
Add a parameter to the contactsChanged and itemsChanged signals, which allow a manager to optionally report the extent of changes involved in a contact or organizer item modification. If no changes are explicitly reported by the manager, the receiver must assume that any or all details of the contacts or organizer items may have been modified. Change-Id: Ie8a0d051c3f82a5911dea68213d78c2b173e762e Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Diffstat (limited to 'src/contacts/qcontactmanager_p.cpp')
-rw-r--r--src/contacts/qcontactmanager_p.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/contacts/qcontactmanager_p.cpp b/src/contacts/qcontactmanager_p.cpp
index 28358848f..132a934c4 100644
--- a/src/contacts/qcontactmanager_p.cpp
+++ b/src/contacts/qcontactmanager_p.cpp
@@ -287,8 +287,8 @@ void QContactManagerData::registerObserver(QContactManager *manager, QContactObs
// If this is the first observer, connect to the engine too
if (d->m_observerForContact.size() == 1) {
// This takes advantage of the manager connectNotify code
- QObject::connect(manager, SIGNAL(contactsChanged(QList<QContactId>)),
- manager, SLOT(_q_contactsUpdated(QList<QContactId>)));
+ QObject::connect(manager, SIGNAL(contactsChanged(QList<QContactId>,QList<QContactDetail::DetailType>)),
+ manager, SLOT(_q_contactsUpdated(QList<QContactId>,QList<QContactDetail::DetailType>)));
QObject::connect(manager, SIGNAL(contactsRemoved(QList<QContactId>)),
manager, SLOT(_q_contactsDeleted(QList<QContactId>)));
}
@@ -307,20 +307,20 @@ void QContactManagerData::unregisterObserver(QContactManager *manager, QContactO
// If there are now no more observers, disconnect from the engine
if (d->m_observerForContact.size() == 0) {
// This takes advantage of the manager disconnectNotify code
- QObject::disconnect(manager, SIGNAL(contactsChanged(QList<QContactId>)),
- manager, SLOT(_q_contactsUpdated(QList<QContactId>)));
+ QObject::disconnect(manager, SIGNAL(contactsChanged(QList<QContactId>,QList<QContactDetail::DetailType>)),
+ manager, SLOT(_q_contactsUpdated(QList<QContactId>,QList<QContactDetail::DetailType>)));
QObject::disconnect(manager, SIGNAL(contactsRemoved(QList<QContactId>)),
manager, SLOT(_q_contactsDeleted(QList<QContactId>)));
}
}
}
-void QContactManagerData::_q_contactsUpdated(const QList<QContactId> &ids)
+void QContactManagerData::_q_contactsUpdated(const QList<QContactId> &ids, const QList<QContactDetail::DetailType> &typesChanged)
{
foreach (const QContactId &id, ids) {
QList<QContactObserver*> observers = m_observerForContact.values(id);
foreach (QContactObserver* observer, observers) {
- QMetaObject::invokeMethod(observer, "contactChanged");
+ QMetaObject::invokeMethod(observer, "contactChanged", Q_ARG(QList<QContactDetail::DetailType>, typesChanged));
}
}
}