8#include <QJsonDocument>
14#include <QXmlStreamReader>
16#include <mm/renderer.h>
17#include <mm/renderer/types.h>
26#define MM_ERROR_ENTRY(error) { error, #error }
58template <
typename T,
size_t N>
67 if (qtKeyValueMaps.
isNull())
89 const mmr_error_info_t *
const mmError = mmr_error_info(
context);
92 *errorCode = mmError->error_code;
96 .
arg(mmError->error_code);
109 qWarning() <<
"checkForDrmPermission: Unable to open bar-descriptor.xml";
113 QXmlStreamReader reader(&
file);
114 while (!reader.atEnd()) {
115 reader.readNextStartElement();
118 if (reader.readElementText().trimmed() ==
QLatin1String(
"access_protected_media"))
bool isNull() const noexcept
Returns true if this byte array is null; otherwise returns false.
bool cdUp()
Changes directory by moving one directory up from the QDir's current directory.
QString filePath(const QString &fileName) const
Returns the path name of a file in the directory.
static QDir home()
Returns the user's home directory.
bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
\inmodule QtCore\reentrant
QJsonObject object() const
Returns the QJsonObject contained in the document.
bool isObject() const
Returns true if the document contains an object.
static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error=nullptr)
Parses json as a UTF-8 encoded JSON document, and creates a QJsonDocument from it.
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
Combined button and popup list for selecting options.
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)