Do the scanning for include files in the background

In order to speed up completion for include statements.

Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
This commit is contained in:
Thorbjørn Lindeijer
2009-07-24 12:50:10 +02:00
parent f4ec27cdc2
commit 00f7dd4586
5 changed files with 108 additions and 18 deletions

View File

@@ -77,6 +77,8 @@ public:
virtual ProjectInfo projectInfo(ProjectExplorer::Project *project) const;
virtual void updateProjectInfo(const ProjectInfo &pinfo);
virtual QStringList includesInPath(const QString &path) const;
virtual CPlusPlus::Snapshot snapshot() const;
virtual void GC();
@@ -99,6 +101,9 @@ public:
virtual void addEditorSupport(AbstractEditorSupport *editorSupport);
virtual void removeEditorSupport(AbstractEditorSupport *editorSupport);
void setHeaderSuffixes(const QStringList &suffixes)
{ m_headerSuffixes = suffixes; }
Q_SIGNALS:
void projectPathChanged(const QString &projectPath);
@@ -149,6 +154,13 @@ private:
QStringList internalFrameworkPaths() const;
QByteArray internalDefinedMacros() const;
void setIncludesInPaths(const QMap<QString, QStringList> includesInPaths);
static void updateIncludesInPaths(QFutureInterface<void> &future,
CppModelManager *manager,
QStringList paths,
QStringList suffixes);
static void parse(QFutureInterface<void> &future,
CppPreprocessor *preproc,
QStringList files);
@@ -164,6 +176,9 @@ private:
QStringList m_frameworkPaths;
QByteArray m_definedMacros;
QMap<QString, QStringList> m_includesInPaths;
QStringList m_headerSuffixes;
// editor integration
QMap<TextEditor::ITextEditor *, CppEditorSupport *> m_editorSupport;