Debugger: Adding information to the breakpoint tool tip

The breakpoint condition and the command executed upon breakpoint hit
are now added to the tool tip.

Change-Id: I804faae9fe0e70f7033dc99bf4e4b3701a70505d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2016-08-31 15:42:29 +02:00
parent 0761f32938
commit cfa456b29a

View File

@@ -2224,6 +2224,20 @@ void BreakpointItem::updateMarker()
if (!m_marker && !file.isEmpty() && line > 0)
m_marker = new BreakpointMarker(this, file, line);
if (m_marker) {
QString toolTip;
auto addToToolTipText = [&toolTip](const QString &info, const QString &label) {
if (info.isEmpty())
return;
if (!toolTip.isEmpty())
toolTip += ' ';
toolTip += label + ": '" + info + '\'';
};
addToToolTipText(m_params.condition, tr("Breakpoint Condition"));
addToToolTipText(m_params.command, tr("Debugger Command"));
m_marker->setToolTip(toolTip);
}
}
QIcon BreakpointItem::icon() const