diff options
Diffstat (limited to 'src/corelib/json')
-rw-r--r-- | src/corelib/json/qjsonarray.cpp | 2 | ||||
-rw-r--r-- | src/corelib/json/qjsonarray.h | 2 | ||||
-rw-r--r-- | src/corelib/json/qjsondocument.cpp | 6 | ||||
-rw-r--r-- | src/corelib/json/qjsondocument.h | 4 | ||||
-rw-r--r-- | src/corelib/json/qjsonobject.cpp | 2 | ||||
-rw-r--r-- | src/corelib/json/qjsonobject.h | 2 | ||||
-rw-r--r-- | src/corelib/json/qjsonvalue.cpp | 2 | ||||
-rw-r--r-- | src/corelib/json/qjsonvalue.h | 2 |
8 files changed, 13 insertions, 9 deletions
diff --git a/src/corelib/json/qjsonarray.cpp b/src/corelib/json/qjsonarray.cpp index 8dd7f6092f..d81de89628 100644 --- a/src/corelib/json/qjsonarray.cpp +++ b/src/corelib/json/qjsonarray.cpp @@ -1089,7 +1089,7 @@ void QJsonArray::compact() } -#ifndef QT_NO_DEBUG_STREAM +#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) QDebug operator<<(QDebug dbg, const QJsonArray &a) { if (!a.a) { diff --git a/src/corelib/json/qjsonarray.h b/src/corelib/json/qjsonarray.h index 1474ccae41..562e6accd7 100644 --- a/src/corelib/json/qjsonarray.h +++ b/src/corelib/json/qjsonarray.h @@ -211,7 +211,7 @@ private: QJsonPrivate::Array *a; }; -#ifndef QT_NO_DEBUG_STREAM +#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonArray &); #endif diff --git a/src/corelib/json/qjsondocument.cpp b/src/corelib/json/qjsondocument.cpp index 4806ac68d6..6e257df39d 100644 --- a/src/corelib/json/qjsondocument.cpp +++ b/src/corelib/json/qjsondocument.cpp @@ -303,10 +303,12 @@ QVariant QJsonDocument::toVariant() const \sa fromJson() */ +#ifndef QT_JSON_READONLY QByteArray QJsonDocument::toJson() const { return toJson(Indented); } +#endif /*! \enum QJsonDocument::JsonFormat @@ -338,6 +340,7 @@ QByteArray QJsonDocument::toJson() const \sa fromJson(), JsonFormat */ +#ifndef QT_JSON_READONLY QByteArray QJsonDocument::toJson(JsonFormat format) const { if (!d) @@ -352,6 +355,7 @@ QByteArray QJsonDocument::toJson(JsonFormat format) const return json; } +#endif /*! Parses a UTF-8 encoded JSON document and creates a QJsonDocument @@ -562,7 +566,7 @@ bool QJsonDocument::isNull() const return (d == 0); } -#ifndef QT_NO_DEBUG_STREAM +#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) QDebug operator<<(QDebug dbg, const QJsonDocument &o) { if (!o.d) { diff --git a/src/corelib/json/qjsondocument.h b/src/corelib/json/qjsondocument.h index 0354262e2c..ea42d76b20 100644 --- a/src/corelib/json/qjsondocument.h +++ b/src/corelib/json/qjsondocument.h @@ -117,7 +117,7 @@ public: #ifdef Q_QDOC QByteArray toJson(JsonFormat format = Indented) const; -#else +#elif !defined(QT_JSON_READONLY) QByteArray toJson() const; //### Merge in Qt6 QByteArray toJson(JsonFormat format) const; #endif @@ -148,7 +148,7 @@ private: QJsonPrivate::Data *d; }; -#ifndef QT_NO_DEBUG_STREAM +#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonDocument &); #endif diff --git a/src/corelib/json/qjsonobject.cpp b/src/corelib/json/qjsonobject.cpp index 362d01384e..afc0d5f71f 100644 --- a/src/corelib/json/qjsonobject.cpp +++ b/src/corelib/json/qjsonobject.cpp @@ -1036,7 +1036,7 @@ void QJsonObject::setValueAt(int i, const QJsonValue &val) insert(e->key(), val); } -#ifndef QT_NO_DEBUG_STREAM +#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) QDebug operator<<(QDebug dbg, const QJsonObject &o) { if (!o.o) { diff --git a/src/corelib/json/qjsonobject.h b/src/corelib/json/qjsonobject.h index 8226b614b4..ad3184b1f2 100644 --- a/src/corelib/json/qjsonobject.h +++ b/src/corelib/json/qjsonobject.h @@ -206,7 +206,7 @@ private: QJsonPrivate::Object *o; }; -#ifndef QT_NO_DEBUG_STREAM +#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonObject &); #endif diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp index 8aa1f654c6..0a603b958a 100644 --- a/src/corelib/json/qjsonvalue.cpp +++ b/src/corelib/json/qjsonvalue.cpp @@ -661,7 +661,7 @@ QJsonValue QJsonValueRef::toValue() const return o->valueAt(index); } -#ifndef QT_NO_DEBUG_STREAM +#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) QDebug operator<<(QDebug dbg, const QJsonValue &o) { switch (o.t) { diff --git a/src/corelib/json/qjsonvalue.h b/src/corelib/json/qjsonvalue.h index b18bbde0f7..c0ecdd2b61 100644 --- a/src/corelib/json/qjsonvalue.h +++ b/src/corelib/json/qjsonvalue.h @@ -179,7 +179,7 @@ private: uint index : 31; }; -#ifndef QT_NO_DEBUG_STREAM +#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonValue &); #endif |