forked from qt-creator/qt-creator
Copilot: Various coverity warning fixes
Change-Id: I5d86606611369f4bc11f9f21e308139bba700eb0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -14,12 +14,22 @@ using namespace Utils;
|
||||
namespace Copilot {
|
||||
namespace Internal {
|
||||
|
||||
CopilotPlugin::~CopilotPlugin()
|
||||
{
|
||||
if (m_client)
|
||||
m_client->shutdown();
|
||||
|
||||
m_client = nullptr;
|
||||
}
|
||||
|
||||
void CopilotPlugin::initialize()
|
||||
{
|
||||
CopilotSettings::instance().readSettings(Core::ICore::settings());
|
||||
|
||||
m_client = new CopilotClient();
|
||||
|
||||
connect(m_client, &CopilotClient::finished, this, [this]() { m_client = nullptr; });
|
||||
|
||||
connect(&CopilotSettings::instance(), &CopilotSettings::applied, this, [this]() {
|
||||
if (m_client)
|
||||
m_client->shutdown();
|
||||
|
||||
Reference in New Issue
Block a user