summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/generatedcodemodelsupport.h
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2016-11-17 17:00:01 +0100
committerNikolai Kosjar <nikolai.kosjar@qt.io>2016-11-22 12:21:07 +0000
commitb4d6884c25c6be7999e5ad90467f020774b9c195 (patch)
tree7d0795bec25a66cae1269afd18dde3878144c29e /src/plugins/cpptools/generatedcodemodelsupport.h
parent814bf768af7991bf3e19490c5315a63755b40a33 (diff)
downloadqt-creator-b4d6884c25c6be7999e5ad90467f020774b9c195.tar.gz
CppTools: Fix propagating unsaved files
On project loading ExtraCompiler objects are created that might read the already existing ui_*.h files in the build directory. In this case, ExtraCompiler::setContent() is called, which will emit a signal about the modified content. Now GeneratedCodeModelSupport is a client of this signal and it forwards the changed contents to the clang code model. However, GeneratedCodeModelSupport objects might be created later and miss the initial signal emission, thus leaving the code model unaware of some unsaved files. Fix by notifying the code model at construction time of GeneratedCodeModelSupport. Change-Id: I7311867ad7f534920357801647bd2d0c82bb4edb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/cpptools/generatedcodemodelsupport.h')
-rw-r--r--src/plugins/cpptools/generatedcodemodelsupport.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/plugins/cpptools/generatedcodemodelsupport.h b/src/plugins/cpptools/generatedcodemodelsupport.h
index c0947849fb..04dd3e3cb5 100644
--- a/src/plugins/cpptools/generatedcodemodelsupport.h
+++ b/src/plugins/cpptools/generatedcodemodelsupport.h
@@ -59,7 +59,6 @@ public:
private:
void onContentsChanged(const Utils::FileName &file);
- void init() const;
Utils::FileName m_generatedFileName;
ProjectExplorer::ExtraCompiler *m_generator;
};