Commit 9cd552a1 authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppTools: Do not offer pointless ")" signature completion

If "Automatically insert matching characters" is activated and '(' is
typed before the semicolon in the declaration

    int f;

we offered the ')' completion, although the ')' was already inserted.

Change-Id: Id5a50fa94c2cb7b5c4056d87028501b0b90afc73
Reviewed-by: default avatarErik Verbruggen <>
parent d850485f
......@@ -1927,7 +1927,9 @@ bool CppCompletionAssistProcessor::completeConstructorOrFunction(const QList<CPl
const FullySpecifiedType localTy = rewriteType(f->type(), &env, control);
// gets: "parameter list) cv-spec",
QString completion = overview.prettyType(localTy).mid(1);
const QString completion = overview.prettyType(localTy).mid(1);
if (completion == QLatin1String(")"))
addCompletionItem(completion, QIcon(), 0,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment