CMakePM: Revamp the CMake code completion

By using KSyntaxHighlighting's metadata from the cmake.xml file.

With this information the code completion has localized arguments for
functions.

Added support for Generator Expressions $< and function ${ completions.

The project functions/macros and options are also taken into
consideration.

The file completion is using FilePaths and should work remotely.

Change-Id: I79d1360c1249c65c9db65349f326be5d41f0f734
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2023-09-17 20:19:04 +02:00
parent 88ddecd281
commit bc1c24eb84
6 changed files with 449 additions and 30 deletions

View File

@@ -119,6 +119,7 @@ public:
QString warning() const;
const QHash<QString, Utils::Link> &cmakeSymbolsHash() const { return m_cmakeSymbolsHash; }
CMakeKeywords projectKeywords() const { return m_projectKeywords; }
signals:
void configurationCleared();
@@ -223,6 +224,7 @@ private:
QList<CMakeBuildTarget> m_buildTargets;
QSet<CMakeFileInfo> m_cmakeFiles;
QHash<QString, Utils::Link> m_cmakeSymbolsHash;
CMakeKeywords m_projectKeywords;
QHash<QString, ProjectFileArgumentPosition> m_filesToBeRenamed;