OSDN Git Service

Changed creation of QFileSystemModel. Object will now be created when the user first...
[lamexp/LameXP.git] / src / Model_FileSystem.h
index cf219ab..df15e16 100644 (file)
@@ -22,6 +22,7 @@
 #pragma once
 
 #include <QFileSystemModel>
+#include <QMutex>
 
 class QFileIconProviderEx;
 
@@ -32,7 +33,23 @@ public:
        ~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);
 };