From a3b1ee1cb4ec6e37aed65f857b2aa50d42167464 Mon Sep 17 00:00:00 2001 From: hjk <qtc-committer@nokia.com> Date: Mon, 15 Nov 2010 14:35:19 +0100 Subject: [PATCH] debugger: add some description to breakpoint states in tooltip. FIXME: add translations once interface has stabilized. --- src/plugins/debugger/breakhandler.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 84f322d260d..bd59c626c89 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -844,6 +844,23 @@ static void formatAddress(QTextStream &str, quint64 address) } } +static QString stateToString(BreakpointState state) +{ + switch (state) { + case BreakpointNew: return "new"; + case BreakpointInsertRequested: return "insertion requested"; + case BreakpointInsertProceeding: return "insertion proceeding"; + case BreakpointChangeRequested: return "change requested"; + case BreakpointChangeProceeding: return "change proceeding"; + case BreakpointPending: return "breakpoint pending"; + case BreakpointInserted: return "breakpoint inserted"; + case BreakpointRemoveRequested: return "removal requested"; + case BreakpointRemoveProceeding: return "removal is proceeding"; + case BreakpointDead: return "dead"; + default: return "<invalid state>"; + } +}; + QString BreakHandler::BreakpointItem::toToolTip() const { QString t; @@ -870,7 +887,7 @@ QString BreakHandler::BreakpointItem::toToolTip() const str << "<html><body><table>" //<< "<tr><td>" << tr("Id:") << "</td><td>" << m_id << "</td></tr>" << "<tr><td>" << tr("State:") - << "</td><td>" << state << "</td></tr>" + << "</td><td>" << state << "(" << stateToString(state) << ")</td></tr>" << "<tr><td>" << tr("Engine:") << "</td><td>" << (engine ? engine->objectName() : "0") << "</td></tr>" << "<tr><td>" << tr("Marker File:") -- GitLab