diff options
Diffstat (limited to 'src/corelib/serialization/qcborvalue.cpp')
-rw-r--r-- | src/corelib/serialization/qcborvalue.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp index 1b170739d2..b77cfd5c70 100644 --- a/src/corelib/serialization/qcborvalue.cpp +++ b/src/corelib/serialization/qcborvalue.cpp @@ -42,7 +42,10 @@ #include "qdatastream.h" #include "qcborarray.h" #include "qcbormap.h" + +#if QT_CONFIG(cborstream) #include "qcborstream.h" +#endif #include <qendian.h> #include <qlocale.h> @@ -758,6 +761,7 @@ QT_BEGIN_NAMESPACE using namespace QtCbor; +#if QT_CONFIG(cborstream) // in qcborstream.cpp extern void qt_cbor_stream_set_error(QCborStreamReaderPrivate *d, QCborError error); @@ -799,6 +803,7 @@ static void writeDoubleToCbor(QCborStreamWriter &writer, double d, QCborValue::E writer.append(d); } +#endif // QT_CONFIG(cborstream) static inline int typeOrder(Element e1, Element e2) { @@ -1221,6 +1226,7 @@ int QCborMap::compare(const QCborMap &other) const noexcept return compareContainer(d.data(), other.d.data()); } +#if QT_CONFIG(cborstream) static void encodeToCbor(QCborStreamWriter &writer, const QCborContainerPrivate *d, qsizetype idx, QCborValue::EncodingOptions opt) { @@ -1632,6 +1638,7 @@ void QCborContainerPrivate::decodeFromCbor(QCborStreamReader &reader) if (reader.lastError() == QCborError::NoError) reader.leaveContainer(); } +#endif // QT_CONFIG(cborstream) /*! Creates a QCborValue with byte array value \a ba. The value can later be @@ -2330,6 +2337,7 @@ QCborValueRef QCborValue::operator[](qint64 key) return { container, index }; } +#if QT_CONFIG(cborstream) /*! Decodes one item from the CBOR stream found in \a reader and returns the equivalent representation. This function is recursive: if the item is a map @@ -2567,6 +2575,7 @@ void QCborValueRef::toCbor(QCborStreamWriter &writer, QCborValue::EncodingOption { concrete().toCbor(writer, opt); } +#endif // QT_CONFIG(cborstream) void QCborValueRef::assign(QCborValueRef that, const QCborValue &other) { |