summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@jollamobile.com>2013-12-03 11:22:33 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-03 12:46:06 +0100
commita753d09e8f9c93eb182a6f4fc0d029a4d7540d7f (patch)
treeabe5098c819f0d54be7f6f594454fc5db1826a1b
parentc3380c2b41f3ae04937e5aa5754996ca8978bf8a (diff)
Update results set of type File on graph updates.
More specific file types were handled but not queries for all files. Change-Id: I6040f6f21a541191a0a54bdbb8442349aa591e88 Done-with: Andrew den Exter <andrew.den.exter@jollamobile.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r--src/gallery/tracker/qdocumentgallery_tracker.cpp12
-rw-r--r--src/gallery/tracker/qgallerytrackerchangenotifier.cpp1
2 files changed, 12 insertions, 1 deletions
diff --git a/src/gallery/tracker/qdocumentgallery_tracker.cpp b/src/gallery/tracker/qdocumentgallery_tracker.cpp
index 99f7f49..47453c3 100644
--- a/src/gallery/tracker/qdocumentgallery_tracker.cpp
+++ b/src/gallery/tracker/qdocumentgallery_tracker.cpp
@@ -95,6 +95,7 @@ private:
QGalleryTrackerChangeNotifier *getChangeNotifier( const QString &type );
QGalleryTrackerChangeNotifier *createChangeNotifier(
QScopedPointer<QGalleryTrackerChangeNotifier> &notifier, const QString &serviceId);
+ QGalleryTrackerChangeNotifier *fileChangeNotifier();
QGalleryTrackerChangeNotifier *audioChangeNotifier();
QGalleryTrackerChangeNotifier *artistChangeNotifier();
QGalleryTrackerChangeNotifier *documentChangeNotifier();
@@ -111,6 +112,7 @@ private:
QGalleryDBusInterfacePointer metaDataService;
QGalleryDBusInterfacePointer statisticsService;
+ QScopedPointer<QGalleryTrackerChangeNotifier> fileNotifier;
QScopedPointer<QGalleryTrackerChangeNotifier> audioNotifier;
QScopedPointer<QGalleryTrackerChangeNotifier> artistNotifier;
QScopedPointer<QGalleryTrackerChangeNotifier> documentNotifier;
@@ -151,6 +153,12 @@ QGalleryTrackerChangeNotifier *QDocumentGalleryPrivate::createChangeNotifier(
return notifier.data();
}
+QGalleryTrackerChangeNotifier *QDocumentGalleryPrivate::fileChangeNotifier()
+{
+ return createChangeNotifier(
+ fileNotifier, QGalleryTrackerSchema::serviceForType(QDocumentGallery::File));
+}
+
QGalleryTrackerChangeNotifier *QDocumentGalleryPrivate::audioChangeNotifier()
{
return createChangeNotifier(
@@ -222,7 +230,9 @@ QGalleryTrackerChangeNotifier *QDocumentGalleryPrivate::getChangeNotifier( const
{
QGalleryTrackerChangeNotifier * notifier = 0;
- if (itemType == QDocumentGallery::Audio.name())
+ if (itemType == QDocumentGallery::File.name()) {
+ notifier = fileChangeNotifier();
+ } else if (itemType == QDocumentGallery::Audio.name())
notifier = audioChangeNotifier();
else if (itemType == QDocumentGallery::Artist.name())
notifier = artistChangeNotifier();
diff --git a/src/gallery/tracker/qgallerytrackerchangenotifier.cpp b/src/gallery/tracker/qgallerytrackerchangenotifier.cpp
index d55af0c..610be79 100644
--- a/src/gallery/tracker/qgallerytrackerchangenotifier.cpp
+++ b/src/gallery/tracker/qgallerytrackerchangenotifier.cpp
@@ -74,6 +74,7 @@ void QGalleryTrackerChangeNotifier::graphUpdated(
QString identifier(m_service);
identifier.replace(QLatin1Char(':'), QLatin1Char('#'));
if (className.endsWith(identifier)
+ || (m_service == QLatin1String("nfo:FileDataObject") && className.contains(QLatin1String("/nfo#")))
|| (m_service == QLatin1String("nmm:Artist") && className.endsWith("nfo#Audio"))
|| (m_service == QLatin1String("nmm:Photo") && className.endsWith("nmm#ImageList"))
|| (m_service == QLatin1String("nfo:Audio") && className.endsWith("nmm#Playlist"))) {