Debugger: Format addresses in tooltips.

Pad to 4 digit groups and insert colons for readability.

Change-Id: Icdda754e1d5ac26fd5bb90b5434b0cfa1f7a2f4e
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Friedemann Kleint
2012-08-21 16:31:03 +02:00
committed by hjk
parent 0e8ac9b663
commit 04ad4ba333
5 changed files with 32 additions and 15 deletions

View File

@@ -29,6 +29,7 @@
**************************************************************************/
#include "stackframe.h"
#include "watchutils.h"
#include <QFileInfo>
#include <QDebug>
@@ -87,13 +88,9 @@ QString StackFrame::toToolTip() const
QString res;
QTextStream str(&res);
str << "<html><body><table>";
if (address) {
str << "<tr><td>" << tr("Address:") << "</td><td>0x";
str.setIntegerBase(16);
str << address;
}
str.setIntegerBase(10);
str << "</td></tr>";
if (address)
str << "<tr><td>" << tr("Address:") << "</td><td>"
<< formatToolTipAddress(address) << "</td></tr>";
if (!function.isEmpty())
str << "<tr><td>" << tr("Function:") << "</td><td>" << function << "</td></tr>";
if (!file.isEmpty())