More refactor.

This commit is contained in:
Petr Mrázek
2014-03-05 01:50:05 +01:00
parent 6b76af116e
commit 47bc7e5ee3
10 changed files with 184 additions and 215 deletions

View File

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