]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemmodelrolesupdater.h
Merge remote-tracking branch 'origin/KDE/4.12'
[dolphin.git] / src / kitemviews / kfileitemmodelrolesupdater.h
index e17667a0c62c38e87a7af3d4f8c314055622462d..19207575ed265d05ba5c628b4698f13ac5ba4012 100644 (file)
@@ -32,7 +32,7 @@
 #include <QSize>
 #include <QStringList>
 
-class KDirWatch;
+class KDirectoryContentsCounter;
 class KFileItemModel;
 class KJob;
 class QPixmap;
@@ -54,6 +54,10 @@ class QTimer;
     namespace Nepomuk2
     {
         class Resource;
+        namespace Types
+        {
+            class Property;
+        }
     }
 #endif
 
@@ -214,12 +218,7 @@ private slots:
 
     void applyChangedNepomukRoles(const Nepomuk2::Resource& resource, const Nepomuk2::Types::Property& property);
 
-    /**
-     * Is invoked if a directory watched by KDirWatch got dirty. Updates
-     * the "isExpandable"- and "size"-roles of the item that matches to
-     * the given path.
-     */
-    void slotDirWatchDirty(const QString& path);
+    void slotDirectoryContentsCountReceived(const QString& path, int count);
 
 private:
     /**
@@ -262,8 +261,8 @@ private:
         ResolveFast,
         ResolveAll
     };
-    bool applyResolvedRoles(const KFileItem& item, ResolveHint hint);
-    QHash<QByteArray, QVariant> rolesData(const KFileItem& item) const;
+    bool applyResolvedRoles(int index, ResolveHint hint);
+    QHash<QByteArray, QVariant> rolesData(const KFileItem& item);
 
     /**
      * @return The number of items of the path \a path.
@@ -345,9 +344,8 @@ private:
     // Items which have not been changed repeatedly recently.
     QSet<KFileItem> m_changedItems;
 
-    KDirWatch* m_dirWatcher;
-    mutable QSet<QString> m_watchedDirs; // Required as sadly KDirWatch does not offer a getter method
-                                         // to get all watched directories.
+    KDirectoryContentsCounter* m_directoryContentsCounter;
+
 #ifdef HAVE_NEPOMUK
     Nepomuk2::ResourceWatcher* m_nepomukResourceWatcher;
     mutable QHash<QUrl, KUrl> m_nepomukUriItems;