diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-07-29 12:15:15 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-07-29 12:18:39 +0000 |
commit | a1da7182f91a8d3a197f6356eafbba46e52cd2a3 (patch) | |
tree | 14b7e7d91a3007beeb35adf358f7eb0aae3f6953 /share | |
parent | 6bb2aa6ba15519e1593d82d93ac818ff95e9d443 (diff) | |
download | qt-creator-a1da7182f91a8d3a197f6356eafbba46e52cd2a3.tar.gz |
Clang: Fix memory leak on completion II
...for the following case:
void fun1();
void fun2();
void g()
{
fu // Type 'n', wait for the widget, hit return to choose the item
}
Once e.g. "fun1" is chosen, the completion is triggered again but the
processor (and as result the assist interface) is not freed.
The assumption was that for the AsynchronousWithThread case
IAssistProcessor::perform() would either return 0 (async completion was
started) or != 0 for an immediate proposal. It turns out there is a
third case: no proposal if the completion is not applicable, e.g.
choosing an item in the example above will retrigger completion, however
no completion makes sense for "fun1()<CURSOR>" for an idle editor.
Workaround the case with a getter/setter in IAssistProcessor. Proper
solution should (slightly?) rework the IAssistProcessor API.
Change-Id: I44dde8287998d54ded1ea07e7c39a5157cf62029
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions