From cfa456b29a9a7de01b448bb6a19f92a68bf0e264 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 31 Aug 2016 15:42:29 +0200 Subject: [PATCH] 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 --- src/plugins/debugger/breakhandler.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 20d2c6ff763..e20d9ecc693 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -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