summaryrefslogtreecommitdiffstats
path: root/logic/MMCJson.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-03-05 01:50:05 +0100
committerPetr Mrázek <peterix@gmail.com>2014-03-05 01:50:05 +0100
commit47bc7e5ee377dacfeb7cf3d13f07cfd24db906fb (patch)
treee48d886f3aa1a14854f3c79efda00590a2d987c3 /logic/MMCJson.h
parent6b76af116eabfa2a1c64e6eb7c9ad84fe7fc0bfe (diff)
downloadMultiMC-47bc7e5ee377dacfeb7cf3d13f07cfd24db906fb.tar
MultiMC-47bc7e5ee377dacfeb7cf3d13f07cfd24db906fb.tar.gz
MultiMC-47bc7e5ee377dacfeb7cf3d13f07cfd24db906fb.tar.lz
MultiMC-47bc7e5ee377dacfeb7cf3d13f07cfd24db906fb.tar.xz
MultiMC-47bc7e5ee377dacfeb7cf3d13f07cfd24db906fb.zip
More refactor.
Diffstat (limited to 'logic/MMCJson.h')
-rw-r--r--logic/MMCJson.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/logic/MMCJson.h b/logic/MMCJson.h
index 3e7342b5..b0d898fc 100644
--- a/logic/MMCJson.h
+++ b/logic/MMCJson.h
@@ -7,6 +7,7 @@
#pragma once
#include <QJsonValue>
#include <QJsonObject>
+#include <QJsonDocument>
#include <QJsonArray>
#include "MMCError.h"
@@ -29,6 +30,9 @@ QJsonValue ensureExists(QJsonValue val, const QString what = "value");
/// make sure the value is converted into an object. throw otherwise.
QJsonObject ensureObject(const QJsonValue val, const QString what = "value");
+/// make sure the document is converted into an object. throw otherwise.
+QJsonObject ensureObject(const QJsonDocument val, const QString what = "value");
+
/// make sure the value is converted into an array. throw otherwise.
QJsonArray ensureArray(const QJsonValue val, QString what = "value");