Debugger: Merge watcher request creation

... of {Gdb,Lldb,Pdb}Engine. Code is the same nowadays.

Change-Id: I874b1ddfd813c15cc16c9b91bd894c7c42b56e93
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
hjk
2015-09-14 12:53:35 +02:00
parent 1cb811ebe6
commit 7ac99044e8
5 changed files with 29 additions and 68 deletions

View File

@@ -4669,31 +4669,11 @@ void GdbEngine::doUpdateLocals(const UpdateParameters &params)
DebuggerCommand cmd("showData");
watchHandler()->appendFormatRequests(&cmd);
watchHandler()->appendWatchersAndTooltipRequests(&cmd);
cmd.arg("stringcutoff", action(MaximalStringLength)->value().toByteArray());
cmd.arg("displaystringlimit", action(DisplayStringLimit)->value().toByteArray());
// Re-create tooltip items that are not filters on existing local variables in
// the tooltip model.
cmd.beginList("watchers");
DebuggerToolTipContexts toolTips = DebuggerToolTipManager::pendingTooltips(this);
foreach (const DebuggerToolTipContext &p, toolTips) {
cmd.beginGroup();
cmd.arg("iname", p.iname);
cmd.arg("exp", p.expression.toLatin1().toHex());
cmd.endGroup();
}
QHashIterator<QByteArray, int> it(WatchHandler::watcherNames());
while (it.hasNext()) {
it.next();
cmd.beginGroup();
cmd.arg("iname", "watch." + QByteArray::number(it.value()));
cmd.arg("exp", it.key().toHex());
cmd.endGroup();
}
cmd.endList();
const static bool alwaysVerbose = !qgetenv("QTC_DEBUGGER_PYTHON_VERBOSE").isEmpty();
cmd.arg("passExceptions", alwaysVerbose);