CMake: Only start parsing when creator gets focus again

Rip out QFileSystemWatcher and use Qt Creators IDocument for file
watching instead. The latter properly delays any action till creator
gets focus again.

Task-number: QTCREATORBUG-16354
Change-Id: Ibb71963416b09712a80ee95347425550453b7fd4
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2016-06-27 14:49:35 +02:00
parent d8ed91c44f
commit 703c410085
8 changed files with 99 additions and 44 deletions

View File

@@ -120,6 +120,8 @@ protected:
bool setupTarget(ProjectExplorer::Target *t) override;
private:
void handleCmakeFileChanged();
void handleActiveTargetChanged();
void handleActiveBuildConfigurationChanged();
void handleParsingStarted();
@@ -144,7 +146,10 @@ private:
QFuture<void> m_codeModelFuture;
QList<ProjectExplorer::ExtraCompiler *> m_extraCompilers;
QSet<Internal::CMakeFile *> m_watchedFiles;
friend class Internal::CMakeBuildConfiguration;
friend class Internal::CMakeFile;
};
} // namespace CMakeProjectManager