Debugger: Simple tooltips for the PdbEngine

Change-Id: I320860ddf06a82bd35fb172eda6a5f6f812ae415
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
hjk
2015-02-13 15:28:56 +01:00
parent d479701591
commit d0b448aa29
4 changed files with 20 additions and 61 deletions

View File

@@ -691,6 +691,13 @@ bool DebuggerToolTipContext::isSame(const DebuggerToolTipContext &other) const
&& iname == other.iname;
}
void DebuggerToolTipContext::appendFormatRequest(DebuggerCommand *cmd) const
{
cmd->arg("expression", expression);
cmd->arg("fileName", fileName);
cmd->arg("iname", iname);
}
QString DebuggerToolTipContext::toolTip() const
{
return DebuggerToolTipManager::tr("Expression %1 in function %2 from line %3 to %4")
@@ -787,7 +794,10 @@ void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine)
StackFrame frame = engine->stackHandler()->currentFrame();
const bool sameFrame = context.matchesFrame(frame);
// FIXME: The engine should decide on whether it likes
// the context.
const bool sameFrame = context.matchesFrame(frame)
|| context.fileName.endsWith(QLatin1String(".py"));
DEBUG("UPDATE TOOLTIP: STATE " << state << context.iname
<< "PINNED: " << widget->isPinned
<< "SHOW NEEDED: " << widget->isPinned