diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-17 01:01:01 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-17 01:01:01 +0200 |
commit | 6f27bb135246b7fe9d11ba58e05d2b7661bc2080 (patch) | |
tree | 9704e1c4ffb775472a9984872c3bd292faa999a5 /src/corelib/serialization/qcborvalue.cpp | |
parent | dc4212b3a694e143595968419ae5ad695ab2aa03 (diff) | |
parent | c222a9283d94ad1e29334bb2fba0beef7cc716c7 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ica69de99be9c8af4d28a52e4b69e6af748ed983c
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) { |