forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user