From kde-commits Tue Jan 25 01:14:59 2011 From: Christian Mollekopf Date: Tue, 25 Jan 2011 01:14:59 +0000 To: kde-commits Subject: KDE/kdepimlibs/akonadi Message-Id: <20110125011459.429A9AC8B9 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129591827825859 SVN commit 1216830 by cmollekopf: react to changes of the monitored resources M +1 -0 entitytreemodel.h M +10 -0 entitytreemodel_p.cpp M +2 -1 entitytreemodel_p.h --- trunk/KDE/kdepimlibs/akonadi/entitytreemodel.h #1216829:1216830 @@ -642,6 +642,7 @@ Q_PRIVATE_SLOT( d_func(), void monitoredMimeTypeChanged( const QString&, bool ) ) Q_PRIVATE_SLOT( d_func(), void monitoredCollectionsChanged( const Akonadi::Collection&, bool ) ) + Q_PRIVATE_SLOT( d_func(), void monitoredResourcesChanged( const QByteArray&, bool ) ) Q_PRIVATE_SLOT( d_func(), void monitoredCollectionAdded( const Akonadi::Collection&, const Akonadi::Collection& ) ) Q_PRIVATE_SLOT( d_func(), void monitoredCollectionRemoved( const Akonadi::Collection& ) ) --- trunk/KDE/kdepimlibs/akonadi/entitytreemodel_p.cpp #1216829:1216830 @@ -120,6 +120,8 @@ SLOT( monitoredMimeTypeChanged( const QString&, bool ) ) ); q->connect( monitor, SIGNAL( collectionMonitored(Akonadi::Collection,bool)), SLOT( monitoredCollectionsChanged( const Akonadi::Collection&, bool ) ) ); + q->connect( monitor, SIGNAL( resourceMonitored(QByteArray,bool)), + SLOT( monitoredResourcesChanged( const QByteArray&, bool ) ) ); // monitor collection changes q->connect( monitor, SIGNAL( collectionChanged( const Akonadi::Collection& ) ), @@ -571,6 +573,14 @@ endResetModel(); } +void EntityTreeModelPrivate::monitoredResourcesChanged(const QByteArray& resource, bool monitored) +{ + Q_UNUSED(resource) + Q_UNUSED(monitored) + beginResetModel(); + endResetModel(); +} + void EntityTreeModelPrivate::retrieveAncestors( const Akonadi::Collection& collection ) { Q_Q( EntityTreeModel ); --- trunk/KDE/kdepimlibs/akonadi/entitytreemodel_p.h #1216829:1216830 @@ -106,7 +106,8 @@ void monitoredItemUnlinked( const Akonadi::Item&, const Akonadi::Collection& ); void monitoredMimeTypeChanged( const QString &mimeType, bool monitored ); - void monitoredCollectionsChanged( const Akonadi::Collection &colllection, bool monitored ); + void monitoredCollectionsChanged( const Akonadi::Collection &collection, bool monitored ); + void monitoredResourcesChanged( const QByteArray &resource, bool monitored ); Collection::List getParentCollections( const Item &item ) const; Collection getParentCollection( const Collection &collection ) const;