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>
This commit is contained in:
Alessandro Portale
2018-07-23 22:28:49 +02:00
parent babf038ce8
commit 0558db7b54
104 changed files with 718 additions and 820 deletions

View File

@@ -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;