...when typing more arguments:
struct Foo {};
void f(int, int);
void f(Foo, Foo);
void f(char, char);
void c()
{
f( // 1. Trigger completion with Ctrl+Space
// 2. Chose item "f(Foo, Foo)"
// 3. Type: Foo(),
// OK, signature hint "f(Foo, Foo)" is displayed again
}
FunctionHintProposalWidget and IFunctionHintProposalModel are
instantiated for each calculation, so remember the selected hint in the
CodeAssist. Keep the latest 20 entries.
Task-number: QTCREATORBUG-11688
Change-Id: I579fc6d8a35dd8fa398e4b3170ddc05a85252d1a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
...for emphasis in the function signature tooltip when doing function
completion.
Braces, brackets and less/greater were not considered so that arguments
containing initializer lists, lambda captures or templates could lead to
the emphasis of no or the wrong parameter:
void foo(VariantType t1, VariantType t2);
void g(int x, int y)
{
foo({1,2, // Ops, no parameter emphasized
foo({1,2}, // Ops, no parameter emphasized
foo([x, y](){}, // Ops, no parameter emphasized
foo(Bar<int, // Ops, second parameter emphasized
foo(Bar<int, int>, // Ops, no parameter emphasized
}
Change-Id: I2515fcbd892850b608bd90b35dd348ae522144b2
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
using CodeCompletions = QVector<CodeCompletion>;
using CodeCompletionChunks = QVector<CodeCompletionChunk>;
Change-Id: Id729a43566c23dc000e44d79ccf4a49e4f235f51
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>