VcsBase: Make dependency on CppTools optional

The VcsBaseSubmitEditor uses CppModelManager to collect the symbol names
from the affected files for completion in the commit message.

Move the C++ code model code into CppModelManager, register it in the
plugin manager, and call it via QObject means from the submit editor.

This avoids a hard dependency from VcsBase to CppTools.

Change-Id: I2fb34dbef153c1414820d711e7fc5596bcac1691
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2019-08-13 15:42:03 +02:00
parent 6b5bf41d9f
commit 857b299356
6 changed files with 101 additions and 73 deletions

View File

@@ -230,6 +230,9 @@ public:
void renameIncludes(const QString &oldFileName, const QString &newFileName);
// for VcsBaseSubmitEditor
Q_INVOKABLE QSet<QString> symbolsInFiles(const QSet<Utils::FilePath> &files) const;
signals:
/// Project data might be locked while this is emitted.
void aboutToRemoveFiles(const QStringList &files);