diff options
Diffstat (limited to 'src/plugins/cpptools/cppmodelmanager.h')
| -rw-r--r-- | src/plugins/cpptools/cppmodelmanager.h | 62 |
1 files changed, 28 insertions, 34 deletions
diff --git a/src/plugins/cpptools/cppmodelmanager.h b/src/plugins/cpptools/cppmodelmanager.h index cacba4319c7..eecd5abaeda 100644 --- a/src/plugins/cpptools/cppmodelmanager.h +++ b/src/plugins/cpptools/cppmodelmanager.h @@ -96,8 +96,6 @@ public: virtual CPlusPlus::Snapshot snapshot() const; virtual void GC(); - QFuture<void> refreshSourceFiles(const QStringList &sourceFiles); - virtual bool isCppEditor(Core::IEditor *editor) const; CppEditorSupport *editorSupport(TextEditor::ITextEditor *editor) const @@ -133,30 +131,7 @@ public: virtual CppHighlightingSupport *highlightingSupport(Core::IEditor *editor) const; virtual void setHighlightingSupportFactory(CppHighlightingSupportFactory *highlightingFactory); -Q_SIGNALS: - void projectPathChanged(const QString &projectPath); - - void aboutToRemoveFiles(const QStringList &files); - -public Q_SLOTS: - void editorOpened(Core::IEditor *editor); - void editorAboutToClose(Core::IEditor *editor); - virtual void updateModifiedSourceFiles(); - -private Q_SLOTS: - // this should be executed in the GUI thread. - void onDocumentUpdated(CPlusPlus::Document::Ptr doc); - void onExtraDiagnosticsUpdated(const QString &fileName); - void onAboutToRemoveProject(ProjectExplorer::Project *project); - void onAboutToUnloadSession(); - void onProjectAdded(ProjectExplorer::Project *project); - void postEditorUpdate(); - void updateEditorSelections(); - -private: - void updateEditor(CPlusPlus::Document::Ptr doc); - - WorkingCopy buildWorkingCopyList(); + virtual void addIndexingSupport(CppIndexingSupport *indexingSupport); QStringList projectFiles() { @@ -182,16 +157,37 @@ private: return m_definedMacros; } +Q_SIGNALS: + void projectPathChanged(const QString &projectPath); + + void aboutToRemoveFiles(const QStringList &files); + +public Q_SLOTS: + void editorOpened(Core::IEditor *editor); + void editorAboutToClose(Core::IEditor *editor); + virtual void updateModifiedSourceFiles(); + +private Q_SLOTS: + // this should be executed in the GUI thread. + void onDocumentUpdated(CPlusPlus::Document::Ptr doc); + void onExtraDiagnosticsUpdated(const QString &fileName); + void onAboutToRemoveProject(ProjectExplorer::Project *project); + void onAboutToUnloadSession(); + void onProjectAdded(ProjectExplorer::Project *project); + void postEditorUpdate(); + void updateEditorSelections(); + +private: + void updateEditor(CPlusPlus::Document::Ptr doc); + + WorkingCopy buildWorkingCopyList(); + void ensureUpdated(); QStringList internalProjectFiles() const; QStringList internalIncludePaths() const; QStringList internalFrameworkPaths() const; QByteArray internalDefinedMacros() const; - static void parse(QFutureInterface<void> &future, - CppPreprocessor *preproc, - QStringList files); - private: static QMutex m_modelManagerMutex; static CppModelManager *m_modelManagerInstance; @@ -233,12 +229,8 @@ private: QTimer *m_updateEditorSelectionsTimer; - QFutureSynchronizer<void> m_synchronizer; - unsigned m_revision; - CppFindReferences *m_findReferences; bool m_indexerEnabled; - bool m_dumpFileNameWhileParsing; mutable QMutex protectExtraDiagnostics; QHash<QString, QHash<int, QList<CPlusPlus::Document::DiagnosticMessage> > > m_extraDiagnostics; @@ -249,6 +241,8 @@ private: CppCompletionAssistProvider *m_completionFallback; CppHighlightingSupportFactory *m_highlightingFactory; CppHighlightingSupportFactory *m_highlightingFallback; + QList<CppIndexingSupport *> m_indexingSupporters; + CppIndexingSupport *m_internalIndexingSupport; }; class CPPTOOLS_EXPORT CppPreprocessor: public CPlusPlus::Client |
