1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef FPSUBMIT_LOADFILELISTTASK_H_
#define FPSUBMIT_LOADFILELISTTASK_H_
#include <QRunnable>
#include <QObject>
#include <QSet>
#include <QStringList>
class LoadFileListTask : public QObject, public QRunnable
{
Q_OBJECT
public:
LoadFileListTask(const QStringList &directories);
void run();
QStringList files() const { return m_files; }
signals:
void finished(const QStringList &files);
void currentPathChanged(const QString &path);
private:
static QStringList removeDuplicateDirectories(const QStringList &directories);
void processDirectory(const QString &path);
void processFile(const QString &path);
QSet<QString> m_cache;
QStringList m_directories;
QStringList m_files;
};
#endif
|