summaryrefslogtreecommitdiff
path: root/gui/qjsonmodel.cpp
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-02-08 23:02:10 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-02-08 23:32:22 +0100
commit82ee9e4e415c60410980c1adb0bfb74dd1571fc2 (patch)
treeb3d3cfdc00cda51ebda34bd63079da4287e7a5b0 /gui/qjsonmodel.cpp
parent7af4d63ea872609a9d7c2f9d954a211bded1b5bb (diff)
[style] formatting
we should try to use qmlfmt, indeed
Diffstat (limited to 'gui/qjsonmodel.cpp')
-rw-r--r--gui/qjsonmodel.cpp16
1 files changed, 8 insertions, 8 deletions
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()<<Q_FUNC_INFO<<"ERROR: cannot load json";
+ qDebug()<<Q_FUNC_INFO<<"ERROR: cannot load json";
}
mtx.unlock();
@@ -250,12 +250,12 @@ QVariant QJsonModel::data(const QModelIndex &index, int role) const
case Roles::ValueRole:
return item->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)