Commit Graph

6 Commits

Author SHA1 Message Date
David Schulz
48cd81b015 Copilot: fixup compression timer cleanup
Unfortunately the timer gets deleted to early when the temporary object
that gets copied into the hash gets deleted. Delete the timer only if
the editor widget or client gets destructed.

Amends e6e895d6be

Change-Id: Ifee0dce337e7fc69ffeaeb82901135bd23ea8d81
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-24 14:12:36 +00:00
David Schulz
e6e895d6be Copilot: correctly cleanup compression timer
fixes a leak and a crash if the timer triggers after the widget was
deleted.

Change-Id: I57794009186d4c5e4dee0b0c0746ffc5468000b7
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-24 12:00:50 +00:00
David Schulz
23513bb714 Copilot: remove unused client instance function
Change-Id: I84c3d674bae1011a7b0bff070c2d3d5d89675147
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-16 11:55:50 +00:00
David Schulz
301a3cb34f Copilot: improve client handling
- centralize starting client
 - allow to start copilot with alternative settings
 - do not reset the client on finished.

A finish might be followed by a restart attempt, so untracking the
client in the plugin can result in having multiple running clients. Use
a QPointer instead to safely reset once the client is deleted.

Change-Id: Ifab8b04287d84bbdd4a0e936f4684b8d4391da2b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-13 08:00:01 +00:00
David Schulz
9feef11b5d Copilot: robustify request logic
Change-Id: Ifa46bc05f0bab8e3c7fc40d855a35e940f0628da
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-03 13:34:40 +00:00
Marcus Tillmanns
625f0ef726 Copilot: Add LSP plugin for Copilot
Fixes: QTCREATORBUG-27771
Change-Id: I1249b9a4492427208a70b3e21bf20ac668fc3c50
Reviewed-by: hjk <hjk@qt.io>
2023-02-21 10:26:12 +00:00