Commit 7d916096 authored by hjk's avatar hjk Committed by hjk

debugger: display pointers in hexadecimal again

Change-Id: Ie4b65fcfba99dca08d893b77d2b7fa5b724a1dfa
Reviewed-on: http://codereview.qt.nokia.com/1292Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 79316d6c
...@@ -370,10 +370,12 @@ static inline QString formattedValue(const WatchData &data, int format) ...@@ -370,10 +370,12 @@ static inline QString formattedValue(const WatchData &data, int format)
return reformatInteger(data.value.toLongLong(), format); return reformatInteger(data.value.toLongLong(), format);
} }
bool ok = false; if (!isPointerType(data.type)) {
qulonglong integer = data.value.toULongLong(&ok, 0); bool ok = false;
if (ok) qulonglong integer = data.value.toULongLong(&ok, 0);
return reformatInteger(integer, format); if (ok)
return reformatInteger(integer, format);
}
QString result = data.value; QString result = data.value;
result.replace(QLatin1Char('\n'), QLatin1String("\\n")); result.replace(QLatin1Char('\n'), QLatin1String("\\n"));
...@@ -712,7 +714,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const ...@@ -712,7 +714,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
return m_handler->m_expandedINames.contains(data.iname); return m_handler->m_expandedINames.contains(data.iname);
case LocalsTypeFormatListRole: { case LocalsTypeFormatListRole: {
if (data.referencingAddress || data.type.endsWith('*')) if (data.referencingAddress || isPointerType(data.type))
return QStringList() return QStringList()
<< tr("Raw pointer") << tr("Raw pointer")
<< tr("Latin1 string") << tr("Latin1 string")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment