#pragma once
#include <QFileSystemModel>
+#include <QMutex>
class QFileIconProviderEx;
~QFileSystemModelEx();
virtual bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
+ //virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ virtual void fetchMore(const QModelIndex &parent);
+ virtual QModelIndex index(const QString &path, int column = 0) const;
+ virtual void flushCache(void);
private:
QFileIconProviderEx *m_myIconProvider;
+
+ static QHash<const QString, bool> s_hasSubfolderCache;
+ static QMutex s_hasSubfolderMutex;
+
+ static void *FindFirstFileExPtr;
+ static bool FindFirstFileExInitialized;
+ static bool FindFirstFileExInfoBasicOK;
+
+ static bool hasSubfolders(const QString &path);
+ static bool hasSubfoldersCached(const QString &path);
+ static void removeFromCache(const QString &path);
+ static void removeAllFromCache(void);
};