diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2013-12-26 14:14:03 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-28 04:47:22 +0100 |
commit | 8afee88576063be83644a8638332a25abd9a8021 (patch) | |
tree | 81a88a9746dca685b9cb453ee331b379d9b6f634 /src/plugins/organizer/memory/qorganizeritemmemorybackend.cpp | |
parent | 28cd5aa9f9c222369c67a812aa7143e7b295bfa8 (diff) |
[QOrganizerItemMemoryEngine] Fix collection change notifications
Since the backend could share the data across instances,
all instances that share changed data must be notified
(do exactly the same as for QOrganizerItemChangeSet).
Change-Id: Iff50b8f0c8b67ed102128ff0a64854c3856aa7f3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/plugins/organizer/memory/qorganizeritemmemorybackend.cpp')
-rw-r--r-- | src/plugins/organizer/memory/qorganizeritemmemorybackend.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/organizer/memory/qorganizeritemmemorybackend.cpp b/src/plugins/organizer/memory/qorganizeritemmemorybackend.cpp index e141bdd23..82a7c5000 100644 --- a/src/plugins/organizer/memory/qorganizeritemmemorybackend.cpp +++ b/src/plugins/organizer/memory/qorganizeritemmemorybackend.cpp @@ -45,7 +45,6 @@ #include <qorganizeritemdetails.h> #include <qorganizeritemfilters.h> #include <qorganizeritemrequests.h> -#include <qorganizercollectionchangeset.h> #include <QtCore/qdebug.h> #include <QtCore/qstringbuilder.h> @@ -1326,7 +1325,7 @@ bool QOrganizerItemMemoryEngine::saveCollection(QOrganizerCollection* collection if (d->m_organizerCollections.at(i) != *collection) { d->m_organizerCollections.replace(i, *collection); cs.insertChangedCollection(colId); - cs.emitSignals(this); + d->emitSharedSignals(&cs); } return true; } @@ -1345,7 +1344,7 @@ bool QOrganizerItemMemoryEngine::saveCollection(QOrganizerCollection* collection d->m_organizerCollections.append(*collection); d->m_organizerCollectionIds.append(newId); cs.insertAddedCollection(newId); - cs.emitSignals(this); + d->emitSharedSignals(&cs); return true; } @@ -1377,7 +1376,7 @@ bool QOrganizerItemMemoryEngine::removeCollection(const QOrganizerCollectionId& d->m_organizerCollections.removeAt(i); d->m_itemsInCollections.remove(collectionId); cs.insertRemovedCollection(collectionId); - cs.emitSignals(this); + d->emitSharedSignals(&cs); return true; } } |