Commit 74f24c96 authored by hjk's avatar hjk

Debugger: Show a "no valid expression" hint in tooltips

So far silently nothing happened, which can be annoying.

Change-Id: Ib0a20343b41a0737de82c2894d526e46a21400a4
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent c468057f
......@@ -1338,8 +1338,11 @@ bool DebuggerToolTipManager::tryHandleToolTipOverride(BaseTextEditor *editor, co
QString raw = cppExpressionAt(editor, context.position, &context.line, &context.column, &context.function);
context.expression = fixCppExpression(raw);
if (context.expression.isEmpty())
return false;
if (context.expression.isEmpty()) {
const Utils::WidgetContent widgetContent(new QLabel(tr("No valid expression")), true);
Utils::ToolTip::show(context.mousePosition, widgetContent, debuggerCore()->mainWindow());
return true;
}
// Prefer a filter on an existing local variable if it can be found.
if (const WatchData *localVariable = engine->watchHandler()->findCppLocalVariable(context.expression)) {
......
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