From 82ee9e4e415c60410980c1adb0bfb74dd1571fc2 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 8 Feb 2021 23:02:10 +0100 Subject: [style] formatting we should try to use qmlfmt, indeed --- gui/qjsonmodel.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gui/qjsonmodel.cpp') diff --git a/gui/qjsonmodel.cpp b/gui/qjsonmodel.cpp index 43260a0..030a2d4 100644 --- a/gui/qjsonmodel.cpp +++ b/gui/qjsonmodel.cpp @@ -211,7 +211,7 @@ bool QJsonModel::loadJson(const QByteArray &json) if (!jdoc.isNull()) { beginResetModel(); - delete mRootItem; + delete mRootItem; if (jdoc.isArray()) { mRootItem = QJsonTreeItem::load(QJsonValue(jdoc.array())); @@ -228,7 +228,7 @@ bool QJsonModel::loadJson(const QByteArray &json) if (!ok) { - qDebug()<value(); case Qt::DisplayRole: { - if (index.column() == 0) - return QString("%1").arg(item->key()); - else if (index.column() == 1) - return QString("%1").arg(item->value()); - else - return QString(""); + if (index.column() == 0) + return QString("%1").arg(item->key()); + else if (index.column() == 1) + return QString("%1").arg(item->value()); + else + return QString(""); } case Qt::EditRole: { if (index.column() == 1) -- cgit v1.2.3