diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2021-06-25 16:50:52 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2021-06-28 10:34:24 +0000 |
commit | ba138a185534269f6a6f32088965b12cbb898337 (patch) | |
tree | 9a29aa1877502f61e089cc263755a45c83e4f056 /src/plugins/cpptools/cpptoolsplugin.cpp | |
parent | cd20ad8ff433acdf1629580e4700c2e9e394a962 (diff) | |
download | qt-creator-ba138a185534269f6a6f32088965b12cbb898337.tar.gz |
CppTools: Add dedicated settings and settings page for clangd
We plan to add more clangd settings, and it makes sense to have a
dedicated place for them both in the code and the UI.
Change-Id: Ideb92935b7a5a6a98e07980f4011736fb82042d1
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
-rw-r--r-- | src/plugins/cpptools/cpptoolsplugin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index c5796e0dba..87ecc25d71 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -86,6 +86,7 @@ public: ~CppToolsPluginPrivate() { ExtensionSystem::PluginManager::removeObject(&m_cppProjectUpdaterFactory); + delete m_clangdSettingsPage; } StringTable stringTable; @@ -95,6 +96,7 @@ public: CppFileSettings m_fileSettings; CppFileSettingsPage m_cppFileSettingsPage{&m_fileSettings}; CppCodeModelSettingsPage m_cppCodeModelSettingsPage{&m_codeModelSettings}; + ClangdSettingsPage *m_clangdSettingsPage = nullptr; CppCodeStyleSettingsPage m_cppCodeStyleSettingsPage; CppProjectUpdaterFactory m_cppProjectUpdaterFactory; }; @@ -218,6 +220,8 @@ void CppToolsPlugin::extensionsInitialized() d->m_fileSettings.fromSettings(ICore::settings()); if (!d->m_fileSettings.applySuffixesToMimeDB()) qWarning("Unable to apply cpp suffixes to mime database (cpp mime types not found).\n"); + if (CppModelManager::instance()->isClangCodeModelActive()) + d->m_clangdSettingsPage = new ClangdSettingsPage; } CppCodeModelSettings *CppToolsPlugin::codeModelSettings() |