diff --git a/src/corelib/serialization/qjsonarray.cpp b/src/corelib/serialization/qjsonarray.cpp index d839c5cd950..402076eb814 100644 --- a/src/corelib/serialization/qjsonarray.cpp +++ b/src/corelib/serialization/qjsonarray.cpp @@ -1073,7 +1073,7 @@ size_t qHash(const QJsonArray &array, size_t seed) return qHashRange(array.begin(), array.end(), seed); } -#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) +#if !defined(QT_NO_DEBUG_STREAM) QDebug operator<<(QDebug dbg, const QJsonArray &a) { QDebugStateSaver saver(dbg); diff --git a/src/corelib/serialization/qjsonarray.h b/src/corelib/serialization/qjsonarray.h index 6e4dc6dd5ff..aaaf76cdbbe 100644 --- a/src/corelib/serialization/qjsonarray.h +++ b/src/corelib/serialization/qjsonarray.h @@ -325,7 +325,7 @@ inline QJsonValueConstRef::QJsonValueConstRef(QJsonArray *a, qsizetype idx) Q_CORE_EXPORT size_t qHash(const QJsonArray &array, size_t seed = 0); -#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) +#if !defined(QT_NO_DEBUG_STREAM) Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonArray &); #endif diff --git a/src/corelib/serialization/qjsoncbor.cpp b/src/corelib/serialization/qjsoncbor.cpp index 91f8e2e9f28..53c2a16ddbe 100644 --- a/src/corelib/serialization/qjsoncbor.cpp +++ b/src/corelib/serialization/qjsoncbor.cpp @@ -129,7 +129,7 @@ static Q_NEVER_INLINE QString makeString(const QCborContainerPrivate *d, qsizety case QCborValue::Array: case QCborValue::Map: -#if defined(QT_JSON_READONLY) || defined(QT_BOOTSTRAPPED) +#if defined(QT_BOOTSTRAPPED) Q_UNREACHABLE_RETURN(QString()); #else return d->valueAt(idx).toDiagnosticNotation(QCborValue::Compact); diff --git a/src/corelib/serialization/qjsondocument.cpp b/src/corelib/serialization/qjsondocument.cpp index 9b1439c66a6..ef012b7154a 100644 --- a/src/corelib/serialization/qjsondocument.cpp +++ b/src/corelib/serialization/qjsondocument.cpp @@ -242,7 +242,6 @@ QVariant QJsonDocument::toVariant() const \sa fromJson(), JsonFormat */ -#if !defined(QT_JSON_READONLY) || defined(Q_QDOC) QByteArray QJsonDocument::toJson(JsonFormat format) const { QByteArray json; @@ -253,7 +252,6 @@ QByteArray QJsonDocument::toJson(JsonFormat format) const format == JsonFormat::Compact ? QJsonValue::JsonFormat::Compact : QJsonValue::JsonFormat::Indented); } -#endif /*! Parses \a json as a UTF-8 encoded JSON document, and creates a QJsonDocument @@ -472,7 +470,7 @@ bool QJsonDocument::isNull() const return (d == nullptr); } -#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) +#if !defined(QT_NO_DEBUG_STREAM) QDebug operator<<(QDebug dbg, const QJsonDocument &o) { QDebugStateSaver saver(dbg); diff --git a/src/corelib/serialization/qjsondocument.h b/src/corelib/serialization/qjsondocument.h index 237445b04aa..6f8a46772fb 100644 --- a/src/corelib/serialization/qjsondocument.h +++ b/src/corelib/serialization/qjsondocument.h @@ -74,9 +74,7 @@ public: static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = nullptr); -#if !defined(QT_JSON_READONLY) || defined(Q_QDOC) QByteArray toJson(JsonFormat format = JsonFormat::Indented) const; -#endif bool isEmpty() const; bool isArray() const; @@ -113,7 +111,7 @@ private: Q_DECLARE_SHARED(QJsonDocument) -#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) +#if !defined(QT_NO_DEBUG_STREAM) Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonDocument &); #endif diff --git a/src/corelib/serialization/qjsonobject.cpp b/src/corelib/serialization/qjsonobject.cpp index 729119d938d..83eb76469d2 100644 --- a/src/corelib/serialization/qjsonobject.cpp +++ b/src/corelib/serialization/qjsonobject.cpp @@ -1424,7 +1424,7 @@ size_t qHash(const QJsonObject &object, size_t seed) return seed; } -#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) +#if !defined(QT_NO_DEBUG_STREAM) QDebug operator<<(QDebug dbg, const QJsonObject &o) { QDebugStateSaver saver(dbg); diff --git a/src/corelib/serialization/qjsonobject.h b/src/corelib/serialization/qjsonobject.h index fb653094c9c..fd8f344fd6b 100644 --- a/src/corelib/serialization/qjsonobject.h +++ b/src/corelib/serialization/qjsonobject.h @@ -366,7 +366,7 @@ inline QJsonValueConstRef::QJsonValueConstRef(QJsonObject *o, qsizetype idx) Q_CORE_EXPORT size_t qHash(const QJsonObject &object, size_t seed = 0); -#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) +#if !defined(QT_NO_DEBUG_STREAM) Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonObject &); #endif diff --git a/src/corelib/serialization/qjsonvalue.cpp b/src/corelib/serialization/qjsonvalue.cpp index 199e5d3154b..4e56cfb1433 100644 --- a/src/corelib/serialization/qjsonvalue.cpp +++ b/src/corelib/serialization/qjsonvalue.cpp @@ -642,7 +642,6 @@ QJsonValue QJsonValue::fromJson(QByteArrayView json, QJsonParseError *error) \sa fromJson(), JsonFormat */ -#if !defined(QT_JSON_READONLY) || defined(Q_QDOC) QByteArray QJsonValue::toJson(JsonFormat format) const { QByteArray json; @@ -651,7 +650,6 @@ QByteArray QJsonValue::toJson(JsonFormat format) const return json; } -#endif /*! Returns the type of the value. @@ -1168,7 +1166,7 @@ size_t qHash(const QJsonValue &value, size_t seed) Q_UNREACHABLE_RETURN(0); } -#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) +#if !defined(QT_NO_DEBUG_STREAM) QDebug operator<<(QDebug dbg, const QJsonValue &o) { QDebugStateSaver saver(dbg); diff --git a/src/corelib/serialization/qjsonvalue.h b/src/corelib/serialization/qjsonvalue.h index 16e5cffed81..af7d49a67c9 100644 --- a/src/corelib/serialization/qjsonvalue.h +++ b/src/corelib/serialization/qjsonvalue.h @@ -83,9 +83,7 @@ public: static QJsonValue fromJson(QByteArrayView json, QJsonParseError *error = nullptr); -#if !defined(QT_JSON_READONLY) || defined(Q_QDOC) QByteArray toJson(JsonFormat format = JsonFormat::Indented) const; -#endif Type type() const; inline bool isNull() const { return type() == Null; } @@ -333,7 +331,7 @@ inline QJsonValue QCborValueConstRef::toJsonValue() const Q_CORE_EXPORT size_t qHash(const QJsonValue &value, size_t seed = 0); -#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY) +#if !defined(QT_NO_DEBUG_STREAM) Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonValue &); #endif