summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/watchdata.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2018-07-23 22:28:49 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2018-07-25 12:52:43 +0000
commit0558db7b54a60297444ff3a9a0d49651383bf825 (patch)
treedc7bc8757ebda56fc687b3605a3276f9449eff6d /src/plugins/debugger/watchdata.cpp
parentbabf038ce8f9174578545df843ff183a1583fd08 (diff)
downloadqt-creator-0558db7b54a60297444ff3a9a0d49651383bf825.tar.gz
Debugger: Modernize
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using modernize-use-default-member-init modernize-use-equals-default Change-Id: I91a6874f0d7b94e9079ab4ef07c23c60c80be9c0 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/debugger/watchdata.cpp')
-rw-r--r--src/plugins/debugger/watchdata.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/debugger/watchdata.cpp b/src/plugins/debugger/watchdata.cpp
index d6f9ca8c64..128b790f30 100644
--- a/src/plugins/debugger/watchdata.cpp
+++ b/src/plugins/debugger/watchdata.cpp
@@ -236,9 +236,9 @@ public:
void decodeArrayHelper(int childSize)
{
const QByteArray ba = QByteArray::fromHex(rawData.toUtf8());
- const T *p = (const T *) ba.data();
+ const auto p = (const T*)ba.data();
for (int i = 0, n = ba.size() / sizeof(T); i < n; ++i) {
- WatchItem *child = new WatchItem;
+ auto child = new WatchItem;
child->arrayIndex = i;
child->value = decodeItemHelper(p[i]);
child->size = childSize;
@@ -409,7 +409,7 @@ void WatchItem::parseHelper(const GdbMi &input, bool maySort)
for (int i = 0, n = int(children.children().size()); i != n; ++i) {
const GdbMi &subinput = children.children().at(i);
- WatchItem *child = new WatchItem;
+ auto child = new WatchItem;
if (childType.isValid())
child->type = childType.data();
if (childNumChild.isValid())
@@ -505,7 +505,7 @@ QString WatchItem::toToolTip() const
if (arrayIndex >= 0)
formatToolTipRow(str, tr("Array Index"), QString::number(arrayIndex));
if (size)
- formatToolTipRow(str, tr("Static Object Size"), tr("%n bytes", 0, size));
+ formatToolTipRow(str, tr("Static Object Size"), tr("%n bytes", nullptr, size));
formatToolTipRow(str, tr("Internal ID"), internalName());
str << "</table></body></html>";
return res;