diff options
author | Marcus Tillmanns <[email protected]> | 2023-05-23 08:58:07 +0200 |
---|---|---|
committer | Marcus Tillmanns <[email protected]> | 2023-05-26 12:55:57 +0000 |
commit | bdb31d43484046a3879246462697115679046d41 (patch) | |
tree | 8be9f8434a6d9dd3a6660b9cfddabf7602e17e9b /src/plugins/copilot/copilotsettings.h | |
parent | f385324bc8e7a9c4623781a349fd542e1ee43e0a (diff) |
Copilot: Allow user to disable Copilot
Fixes: QTCREATORBUG-29179
Change-Id: I274de1f13f773fb61b376643b61056b6f14dabaf
Reviewed-by: BogDan Vatra <[email protected]>
Reviewed-by: David Schulz <[email protected]>
Reviewed-by: Leena Miettinen <[email protected]>
Diffstat (limited to 'src/plugins/copilot/copilotsettings.h')
-rw-r--r-- | src/plugins/copilot/copilotsettings.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/plugins/copilot/copilotsettings.h b/src/plugins/copilot/copilotsettings.h index ea3ac7520f5..cec44c43fed 100644 --- a/src/plugins/copilot/copilotsettings.h +++ b/src/plugins/copilot/copilotsettings.h @@ -5,6 +5,10 @@ #include <utils/aspects.h> +namespace ProjectExplorer { +class Project; +} + namespace Copilot { class CopilotSettings : public Utils::AspectContainer @@ -17,6 +21,21 @@ public: Utils::FilePathAspect nodeJsPath{this}; Utils::FilePathAspect distPath{this}; Utils::BoolAspect autoComplete{this}; + Utils::BoolAspect enableCopilot{this}; +}; + +class CopilotProjectSettings : public Utils::AspectContainer +{ +public: + CopilotProjectSettings(ProjectExplorer::Project *project, QObject *parent = nullptr); + + void save(ProjectExplorer::Project *project); + void setUseGlobalSettings(bool useGlobalSettings); + + bool isEnabled() const; + + Utils::BoolAspect enableCopilot{this}; + Utils::BoolAspect useGlobalSettings{this}; }; } // namespace Copilot |