Commit ea6514b2 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

C++: Show virtual functions menu only if resolving was requested

That is, if the user does Ctrl+LeftClick or (Ctrl+E,) F2, but not on

The described bug in the report occurred because we immediately jump to
an item if there is only one, e.g. in case of no overrides. That could
also happen on hover, which lead to the undesired effect.

Change-Id: I79f6fa1f90d37ea209da022d55d48aab2c13c21a
Task-number: QTCREATORBUG-12986
Reviewed-by: default avatarDavid Schulz <>
parent 51a18c84
......@@ -669,6 +669,7 @@ BaseTextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor &
if (Symbol *symbol = result.declaration()) {
Symbol *def = 0;
if (resolveTarget) {
// Consider to show a pop-up displaying overrides for the function
Function *function = symbol->type()->asFunctionType();
VirtualFunctionHelper helper(*typeOfExpression, scope, doc, snapshot, symbolFinder);
......@@ -695,7 +696,6 @@ BaseTextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor &
return link;
if (resolveTarget) {
Symbol *lastVisibleSymbol = doc->lastVisibleSymbolAt(line, column);
def = findDefinition(symbol, snapshot, symbolFinder);
Supports Markdown
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