forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user