QmlJS: Reparse cpp types when component headers change

Previously the code model would only get updated when the document that
contains the qmlRegisterType changed. If the actual component exported
to QML lives in a different file, any updates to that component would
be lost. With this change we keep track of the header files the
components are declared in and rescan if any of them changes.

This is still not the greatest way to do it as there are a number of
ways to introduce dependencies the system cannot detect. It's better
than before, though.

Change-Id: Ic077c516dca3ac720f78973c84e5e6e91b6a5c07
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Ulf Hermann
2016-07-08 13:09:56 +02:00
parent b851b57ea3
commit 1e7bf7f721
4 changed files with 72 additions and 31 deletions

View File

@@ -275,6 +275,7 @@ private:
QrcCache m_qrcCache;
CppDataHash m_cppDataHash;
QHash<QString, QStringList> m_cppDeclarationFiles;
mutable QMutex m_cppDataMutex;
// project integration