Nim: Collect project data asynchronously

... and provide a progress bar.

Change-Id: I9d57c0dd1d26325eb9e6f15c8fada9e1fc398d9f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Tobias Hunger
2016-10-20 16:20:01 +02:00
parent e86383c741
commit e0ee142f8d
2 changed files with 46 additions and 31 deletions

View File

@@ -28,8 +28,9 @@
#include <projectexplorer/project.h>
#include <projectexplorer/projectnodes.h>
#include <QFileSystemWatcher>
#include <QElapsedTimer>
#include <QFileSystemWatcher>
#include <QFutureWatcher>
#include <QTimer>
namespace TextEditor { class TextDocument; }
@@ -54,11 +55,13 @@ public:
private:
void scheduleProjectScan();
void populateProject();
void recursiveScanDirectory(const QDir &dir, QSet<QString> &container);
void collectProjectFiles();
void updateProject();
QSet<QString> m_files;
QStringList m_files;
QFileSystemWatcher m_fsWatcher;
QFutureInterface<QList<ProjectExplorer::FileNode *>> m_futureInterface;
QFutureWatcher<QList<ProjectExplorer::FileNode *>> m_futureWatcher;
QElapsedTimer m_lastProjectScan;
QTimer m_projectScanTimer;