10#if QT_CONFIG(cborstreamreader)
14#if QT_CONFIG(cborstreamwriter)
22#include <private/qnumeric_p.h>
23#include <private/qsimd_p.h>
767 auto &e =
d->elements[1];
770 auto replaceByteData = [&](
const char *
buf,
qsizetype len, Element::ValueFlags
f) {
773 e.flags = Element::HasByteData |
f;
774 e.value =
d->addByteData(
buf,
len);
790#if QT_POINTER_SIZE == 8
795 static const qint64 Limit = std::numeric_limits<qint64>::max() / 1000;
796 ok = (e.value > -Limit && e.value < Limit);
798 msecs = e.value * 1000;
801 ok = convertDoubleTo(round(e.fpvalue() * 1000), &msecs);
809 replaceByteData(
text,
text.
size(), Element::StringIsAscii);
818#ifndef QT_BOOTSTRAPPED
823 QUrl url(e.flags & Element::StringIsUtf16 ?
836#if QT_CONFIG(regularexpression)
850 memcpy(
buf,
b->byte(),
qMin(
sizeof(
buf),
size_t(
b->len)));
851 replaceByteData(
buf,
sizeof(
buf), {});
862#if QT_CONFIG(cborstreamwriter)
867#ifndef QT_BOOTSTRAPPED
869 return writer.append(std::numeric_limits<qfloat16>::quiet_NaN());
871 return writer.append(std::numeric_limits<float>::quiet_NaN());
873 return writer.append(
qt_qnan());
880 if (convertDoubleTo(
d, &
i)) {
883 return writer.append(
i);
891#ifndef QT_BOOTSTRAPPED
895 return writer.append(f16);
899 return writer.append(
f);
914 return comparable(e1) - comparable(e2);
917QCborContainerPrivate::~QCborContainerPrivate()
921 if (e.flags & Element::IsContainer)
922 e.container->deref();
937 if (e.flags & Element::HasByteData) {
954 u->elements.reserve(reserved);
959 d->ref.storeRelaxed(0);
961 for (
auto &e : std::as_const(
d->elements)) {
962 if (e.flags & Element::IsContainer)
963 e.container->ref.ref();
971 if (!
d ||
d->ref.loadRelaxed() != 1)
972 return clone(
d, reserved);
1010 d->elements.detach();
1011 d->ref.storeRelaxed(1);
1020 e.
flags = Element::IsContainer;
1034 if (
this ==
value.container) {
1047 value.container->deref();
1060 e.
flags = Element::HasByteData | Element::StringIsAscii;
1089 container->data =
data;
1090 container->elements.
reserve(1);
1091 container->elements.append(e);
1110 }
else if (!QChar::isHighSurrogate(
r.c) ||
ptr ==
end) {
1114 r.c = QChar::surrogateToUcs4(
r.c, *
ptr++);
1130 if (
mode == Comparison::ForEquality)
1131 return lhs == rhs ? 0 : 1;
1140 const char16_t *src1 = lhs.utf16();
1141 const char16_t *src2 = rhs.utf16();
1142 const char16_t *end1 = src1 + lhs.size();
1143 const char16_t *end2 = src2 + rhs.size();
1151 diff = int(
r1.c) - int(
r2.c);
1152 }
while (src1 < end1 && src2 < end2 && diff == 0);
1159 return len1 < len2 ? -1 : 1;
1170 const auto src1 =
reinterpret_cast<const uchar *
>(lhs.data());
1171 const char16_t *src2 = rhs.utf16();
1172 const char16_t *
const end2 = src2 + rhs.size();
1181 char16_t uc = *src2++;
1182 int r = QUtf8Functions::toUtf8<QUtf8BaseTraits>(uc,
ptr, src2, end2);
1187 if (len1 - idx1 <
n)
1189 diff = memcmp(src1 + idx1, utf8,
n);
1191 }
while (diff == 0 && idx1 < len1 && src2 < end2);
1193 if (
mode == Comparison::ForEquality && diff)
1195 if ((idx1 == len1) != (src2 == end2)) {
1197 return idx1 == len1 ? -1 : 1;
1205 return len1 < len2 ? -1 : 1;
1232 auto makeSortable = [](
qint64 v) {
1235 return quint64(std::numeric_limits<qint64>::max()) + (-u);
1251 return u1 <
u2 ? -1 : 1;
1268 if ((e1.flags & Element::IsContainer) || (e2.flags & Element::IsContainer))
1269 return compareContainer(e1.flags & Element::IsContainer ? e1.container :
nullptr,
1270 e2.flags & Element::IsContainer ? e2.container :
nullptr,
mode);
1273 const ByteData *b1 = c1 ? c1->byteData(e1) :
nullptr;
1276 auto len1 = b1 ? b1->len : 0;
1277 auto len2 = b2 ? b2->len : 0;
1278 if (len1 == 0 || len2 == 0)
1279 return len1 < len2 ? -1 : len1 == len2 ? 0 : 1;
1289 if ((e1.flags & Element::StringIsUtf16) && (e2.flags & Element::StringIsUtf16))
1292 if (!(e1.flags & Element::StringIsUtf16) && !(e2.flags & Element::StringIsUtf16)) {
1296 if (
mode == Comparison::ForEquality) {
1298 return memcmp(b1->byte(), b2->byte(),
size_t(len1)) == 0 ? 0 : 1;
1300 return memcmp(b1->byte(), b2->byte(),
size_t(len1));
1302 return len1 < len2 ? -1 : 1;
1306 if (e1.flags & Element::StringIsUtf16)
1318 auto len1 = c1 ? c1->elements.size() : 0;
1319 auto len2 =
c2 ?
c2->elements.size() : 0;
1322 return len1 < len2 ? -1 : 1;
1326 const Element &e1 = c1->elements.at(
i);
1374 Comparison::ForEquality) == 0;
1501 return compareContainer(lhs.d.constData(), rhs.d.constData(), Comparison::ForEquality) == 0;
1513 return compareContainer(lhs.d.constData(), rhs.container, Comparison::ForEquality) == 0;
1521 c =
compareContainer(lhs.d.constData(), rhs.container, Comparison::ForOrdering);
1527 return compareContainer(lhs.d.constData(), rhs.d.constData(), Comparison::ForEquality) == 0;
1535bool QCborMap::comparesEqual_helper(
const QCborMap &lhs,
const QCborValue &rhs)
noexcept
1539 return compareContainer(lhs.d.constData(), rhs.container, Comparison::ForEquality) == 0;
1547 c =
compareContainer(lhs.d.constData(), rhs.container, Comparison::ForOrdering);
1551#if QT_CONFIG(cborstreamwriter)
1553 QCborValue::EncodingOptions
opt)
1563 for (idx = 0; idx <
len; ++idx)
1564 encodeToCbor(writer,
d, idx,
opt);
1570 }
else if (idx < 0) {
1571 Q_ASSERT_X(
d !=
nullptr,
"QCborValue",
"Unexpected null container");
1572 if (
d->elements.size() != 2) {
1574 qWarning(
"QCborValue: invalid tag state; are you encoding something that was improperly decoded?");
1579 writer.append(
QCborTag(
d->elements.at(0).value));
1580 encodeToCbor(writer,
d, 1,
opt);
1582 Q_ASSERT_X(
d !=
nullptr,
"QCborValue",
"Unexpected null container");
1584 auto e =
d->elements.at(idx);
1588 return writer.append(
qint64(e.value));
1592 return writer.appendByteString(
b->byte(),
b->len);
1593 return writer.appendByteString(
"", 0);
1597 if (e.flags & Element::StringIsUtf16)
1598 return writer.append(
b->asStringView());
1599 return writer.appendTextString(
b->byte(),
b->len);
1607 return encodeToCbor(writer,
1608 e.flags & Element::IsContainer ? e.container :
nullptr,
1619 return writeDoubleToCbor(writer, e.fpvalue(),
opt);
1634 if (
unsigned(simpleType) < 0x100)
1638 qWarning(
"QCborValue: found unknown type 0x%x", e.type);
1643#if QT_CONFIG(cborstreamreader)
1647 if (
reader.isUnsignedInteger()) {
1668 if (
double d = integerOutOfRange(reader)) {
1705 if (!
reader.isLengthKnown())
1707 int mapShift =
reader.isMap() ? 1 : 0;
1710 return len << mapShift;
1715 if (
Q_UNLIKELY(remainingRecursionDepth == 0)) {
1725 u->elements.reserve(
len);
1731 d->elements.clear();
1736 d->decodeValueFromCbor(reader, remainingRecursionDepth - 1);
1741 d->elements.squeeze();
1748 if (
Q_UNLIKELY(remainingRecursionDepth == 0)) {
1759 d->decodeValueFromCbor(reader, remainingRecursionDepth - 1);
1793 if (
len != rawlen) {
1804 constexpr size_t EstimatedOverhead = 16;
1805 constexpr size_t MaxMemoryIncrement = 16384;
1819 if (
size_t(
len) > MaxMemoryIncrement - EstimatedOverhead) {
1822 newCapacity =
offset + MaxMemoryIncrement - EstimatedOverhead;
1828 if (newCapacity >
size_t(
data.capacity()))
1829 data.reserve(newCapacity);
1832 e.
flags = Element::HasByteData;
1842 if (!utf8result.isValidUtf8) {
1850 rawlen =
reader.currentStringChunkSize();
1852 if (
len == rawlen) {
1872 e.
flags |= Element::StringIsAscii;
1891void QCborContainerPrivate::decodeValueFromCbor(
QCborStreamReader &reader,
int remainingRecursionDepth)
1906 decodeStringFromCbor(reader);
1912 createContainerFromCbor(
reader, remainingRecursionDepth),
1916 return append(taggedValueFromCbor(reader, remainingRecursionDepth));
1983 :
n(-1), container(
a.
d.
data()),
t(Array)
1999 :
n(-1), container(
m.
d.
data()),
t(Map)
2031 container->ref.ref();
2055#ifndef QT_BOOTSTRAPPED
2073#if QT_CONFIG(regularexpression)
2113void QCborValue::dispose()
2158 container->
valueAt(1) : defaultValue;
2173 return defaultValue;
2191 return defaultValue;
2209 return defaultValue;
2214 return defaultValue;
2221#ifndef QT_BOOTSTRAPPED
2233 return defaultValue;
2243#if QT_CONFIG(regularexpression)
2257 return defaultValue;
2275 return defaultValue;
2280 return defaultValue;
2320 return defaultValue;
2322 Q_ASSERT(
n == -1 || container ==
nullptr);
2363 return defaultValue;
2365 Q_ASSERT(
n == -1 || container ==
nullptr);
2428 constexpr qint64 LargeKey = 0x10000;
2438 return key <= currentSize;
2450 qWarning(
"Using CBOR array as map forced conversion");
2454 map->elements.resize(
size * 2);
2458 auto src =
array->elements.constBegin();
2477 if (replace->elements.size() ==
index)
2484template <
typename KeyType>
inline QCborValueRef
2490 else if (!self.isMap())
2495 QCborValueRef
result = findOrAddMapKey<KeyType>(self.container,
key);
2500template<
typename KeyType> QCborValueRef
2503 auto &e = self.d->elements[self.i];
2509 if (e.
flags & QtCbor::Element::IsContainer)
2513 e.
flags = QtCbor::Element::IsContainer;
2584#if QT_CONFIG(cborstreamreader)
2608 auto t = reader.type();
2620 Element e = decodeBasicValueFromCbor(reader);
2636 result.container->ref.ref();
2637 result.container->decodeStringFromCbor(reader);
2701#if QT_CONFIG(cborstreamwriter)
2732 toCbor(writer,
opt);
2768 return encodeToCbor(writer, container, -
type(),
opt);
2770 return encodeToCbor(writer, container,
n,
opt);
2778 return writer.append(
n);
2781 return writeDoubleToCbor(writer, fp_helper(),
opt);
2797 return writer.appendByteString(
"", 0);
2801 return writer.appendTextString(
"", 0);
2820# if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
2823 concrete().toCbor(writer,
opt);
2828void QCborValueRef::assign(QCborValueRef that,
const QCborValue &
other)
2830 that.d->replaceAt(that.i,
other);
2838void QCborValueRef::assign(QCborValueRef that,
const QCborValueRef
other)
2841 that =
other.concrete();
2848 return defaultValue;
2858 return defaultValue;
2869 return defaultValue;
2878 return defaultValue;
2879 return self.d->byteArrayAt(self.i);
2886 return defaultValue;
2887 return self.d->stringAt(self.i);
2962 return self.d->valueAt(self.i);
2967 return self.d->elements.at(self.i).type;
2988#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
2989QCborValue QCborValueRef::concrete(QCborValueRef self)
noexcept
2991 return self.d->valueAt(self.i);
2996 return self.d->elements.at(
self.i).type;
3070QCborValueRef QCborValueRef::operator[](
const QString &
key)
3111QCborValueRef QCborValueRef::operator[](
qint64 key)
3113 auto &e =
d->elements[
i];
3135 switch (
value.type()) {
3166#ifndef QT_BOOTSTRAPPED
3169# if QT_CONFIG(regularexpression)
3205 auto n = std::underlying_type<QCborKnownTags>::type(
tag);
3209 return "DateTimeString";
3211 return "UnixTime_t";
3213 return "PositiveBignum";
3215 return "NegativeBignum";
3221 return "COSE_Encrypt0";
3225 return "COSE_Sign1";
3227 return "ExpectedBase64url";
3229 return "ExpectedBase64";
3231 return "ExpectedBase16";
3233 return "EncodedCbor";
3241 return "RegularExpression";
3243 return "MimeMessage";
3247 return "COSE_Encrypt";
3259#if !defined(QT_NO_DEBUG_STREAM)
3264 return dbg <<
v.toInteger();
3266 return dbg <<
"QByteArray(" <<
v.toByteArray() <<
')';
3268 return dbg <<
v.toString();
3270 return dbg <<
v.toArray();
3272 return dbg <<
v.toMap();
3277 dbg.nospace() <<
"QCborKnownTags::" <<
id <<
", ";
3279 dbg.nospace() <<
"QCborTag(" <<
quint64(
tag) <<
"), ";
3280 return dbg <<
v.taggedValue();
3287 return dbg <<
false;
3289 return dbg <<
"nullptr";
3294 if (convertDoubleTo(
v.toDouble(), &
i))
3295 return dbg <<
i <<
".0";
3297 return dbg <<
v.toDouble();
3300 return dbg <<
v.toDateTime();
3301#ifndef QT_BOOTSTRAPPED
3303 return dbg <<
v.toUrl();
3304#if QT_CONFIG(regularexpression)
3306 return dbg <<
v.toRegularExpression();
3309 return dbg <<
v.toUuid();
3312 return dbg <<
"<invalid>";
3316 if (
v.isSimpleType())
3317 return dbg <<
v.toSimpleType();
3318 return dbg <<
"<unknown type 0x" <<
Qt::hex << int(
v.type()) <<
Qt::dec <<
'>';
3323 dbg.nospace() <<
"QCborValue(";
3332 return dbg.nospace() <<
"QCborSimpleType::" <<
id;
3334 return dbg.nospace() <<
"QCborSimpleType(" <<
uint(st) <<
')';
3341 dbg.nospace() <<
"QCborTag(";
3343 dbg.nospace() <<
"QCborKnownTags::" <<
id;
3355 return dbg.nospace() <<
"QCborKnownTags::" <<
id;
3357 return dbg.nospace() <<
"QCborKnownTags(" << int(
tag) <<
')';
3361#ifndef QT_NO_DATASTREAM
3362#if QT_CONFIG(cborstreamwriter)
3375 value = QCborValue::fromCbor(
buffer, &parseError);
3376 if (parseError.error)
3377 stream.setStatus(QDataStream::ReadCorruptData);
3388#ifndef QT_NO_QOBJECT
3389#include "moc_qcborvalue.cpp"
void storeRelaxed(T newValue) noexcept
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
void reserve(qsizetype size)
Attempts to allocate memory for at least size bytes.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
static constexpr qsizetype max_size() noexcept
\inmodule QtCore\reentrant
int compare(const QCborArray &other) const noexcept Q_DECL_PURE_FUNCTION
Compares this array and other, comparing each element in sequence, and returns an integer that indica...
QCborArray() noexcept
Constructs an empty QCborArray.
QString stringAt(qsizetype idx) const
QByteArray::size_type usedData
const QtCbor::ByteData * byteData(QtCbor::Element e) const
void appendByteData(const char *data, qsizetype len, QCborValue::Type type, QtCbor::Element::ValueFlags extraFlags={})
static QCborContainerPrivate * grow(QCborContainerPrivate *d, qsizetype index)
Prepare for an insertion at position index.
static int compareElement_helper(const QCborContainerPrivate *c1, QtCbor::Element e1, const QCborContainerPrivate *c2, QtCbor::Element e2, QtCbor::Comparison mode) noexcept
static QCborContainerPrivate * detach(QCborContainerPrivate *d, qsizetype reserved)
QCborValueConstRef findCborMapKey(KeyType key)
QList< QtCbor::Element > elements
void appendNonAsciiString(QStringView s)
void append(QtCbor::Undefined)
static qptrdiff addByteDataImpl(QByteArray &target, QByteArray::size_type &targetUsed, const char *block, qsizetype len)
QByteArray byteArrayAt(qsizetype idx) const
static QCborValue makeValue(QCborValue::Type type, qint64 n, QCborContainerPrivate *d=nullptr, ContainerDisposition disp=CopyContainer)
static QCborValueRef findOrAddMapKey(QCborContainerPrivate *container, KeyType key)
QCborValue extractAt_complex(QtCbor::Element e)
void appendAsciiString(const QString &s)
qptrdiff addByteData(const char *block, qsizetype len)
static QtCbor::Element elementFromValue(const QCborValue &value)
void replaceAt_complex(QtCbor::Element &e, const QCborValue &value, ContainerDisposition disp)
QCborValue valueAt(qsizetype idx) const
static QCborContainerPrivate * clone(QCborContainerPrivate *d, qsizetype reserved=-1)
\inmodule QtCore\reentrant
QCborMap() noexcept
Constructs an empty CBOR Map object.
int compare(const QCborMap &other) const noexcept Q_DECL_PURE_FUNCTION
Compares this map and other, comparing each element in sequence, and returns an integer that indicate...
\inmodule QtCore\reentrant
StringResultCode
This enum is returned by readString() and readByteArray() and is used to indicate what the status of ...
Type
This enumeration contains all possible CBOR types as decoded by QCborStreamReader.
\inmodule QtCore\reentrant
static Q_CORE_EXPORT QString concreteString(QCborValueConstRef that, const QString &defaultValue)
static Q_CORE_EXPORT double concreteDouble(QCborValueConstRef that, double defaultValue) noexcept Q_DECL_PURE_FUNCTION
static Q_CORE_EXPORT QByteArray concreteByteArray(QCborValueConstRef that, const QByteArray &defaultValue)
static Q_CORE_EXPORT qint64 concreteIntegral(QCborValueConstRef that, qint64 defaultValue) noexcept Q_DECL_PURE_FUNCTION
static Q_CORE_EXPORT QCborValue::Type concreteType(QCborValueConstRef that) noexcept Q_DECL_PURE_FUNCTION
Q_CORE_EXPORT const QCborValue operator[](const QString &key) const
static Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool comparesEqual_helper(QCborValueConstRef lhs, QCborValueConstRef rhs) noexcept
QCborContainerPrivate * d
static Q_CORE_EXPORT Q_DECL_PURE_FUNCTION Qt::strong_ordering compareThreeWay_helper(QCborValueConstRef lhs, QCborValueConstRef rhs) noexcept
static Q_CORE_EXPORT bool concreteBoolean(QCborValueConstRef that, bool defaultValue) noexcept Q_DECL_PURE_FUNCTION
QCborValue concrete() const noexcept
\inmodule QtCore\reentrant
const QCborValue operator[](const QString &key) const
If this QCborValue is a QCborMap, searches elements for the value whose key matches key.
bool isSimpleType() const
Returns true if this QCborValue is of one of the CBOR simple types.
bool isDateTime() const
Returns true if this QCborValue is of the date/time type.
QCborValue & operator=(const QCborValue &other) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isString() const
Returns true if this QCborValue is of the string type.
QString toString(const QString &defaultValue={}) const
Returns the string value stored in this QCborValue, if it is of the string type.
QCborArray toArray() const
QUuid toUuid(const QUuid &defaultValue={}) const
Returns the UUID value stored in this QCborValue, if it is of the UUID extended type.
int compare(const QCborValue &other) const
Compares this value and other, and returns an integer that indicates whether this value should be sor...
bool isUrl() const
Returns true if this QCborValue is of the URL type.
bool isByteArray() const
Returns true if this QCborValue is of the byte array type.
Type
This enum represents the QCborValue type.
QUrl toUrl(const QUrl &defaultValue={}) const
Returns the URL value stored in this QCborValue, if it is of the URL extended type.
QCborValue()
Creates a QCborValue of the \l {Type}{Undefined} type.
bool isRegularExpression() const
Returns true if this QCborValue contains a regular expression's pattern.
bool isContainer() const
This convenience function returns true if the QCborValue is either an array or a map.
friend class QCborContainerPrivate
QByteArray toByteArray(const QByteArray &defaultValue={}) const
Returns the byte array value stored in this QCborValue, if it is of the byte array type.
Type type() const
Returns the type of this QCborValue.
QCborSimpleType toSimpleType(QCborSimpleType defaultValue=QCborSimpleType::Undefined) const
Returns the simple type this QCborValue is of, if it is a simple type.
bool isTag() const
Returns true if this QCborValue is of the tag type.
bool isArray() const
Returns true if this QCborValue is of the array type.
bool isUuid() const
Returns true if this QCborValue contains a UUID.
QCborTag tag(QCborTag defaultValue=QCborTag(-1)) const
Returns the tag of this extended QCborValue object, if it is of the tag type, defaultValue otherwise.
bool isMap() const
Returns true if this QCborValue is of the map type.
QDateTime toDateTime(const QDateTime &defaultValue={}) const
Returns the date/time value stored in this QCborValue, if it is of the date/time extended type.
QCborValue taggedValue(const QCborValue &defaultValue=QCborValue()) const
Returns the tagged value of this extended QCborValue object, if it is of the tag type,...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
static QDateTime fromMSecsSinceEpoch(qint64 msecs, const QTimeZone &timeZone)
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
\inmodule QtCore \reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toLatin1() const &
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
static constexpr qsizetype max_size() noexcept
qsizetype size() const noexcept
Returns the number of characters in this string.
QByteArray toUtf8() const &
bool isValid() const
Returns true if the URL is non-empty and valid; otherwise returns false.
static QUrl fromEncoded(QByteArrayView input, ParsingMode mode=TolerantMode)
Parses input and returns the corresponding QUrl.
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
static QUuid fromRfc4122(QByteArrayView) noexcept
Creates a QUuid object from the binary representation of the UUID, as specified by RFC 4122 section 4...
\inmodule QtCore \title Classes and helpers for defining comparison operators \keyword qtcompare
\keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16
QHash< int, QWidget * > hash
[35multi]
QMap< QString, QString > map
[6]
Combined button and popup list for selecting options.
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool isAscii(QLatin1StringView s) noexcept
QTextStream & hex(QTextStream &stream)
Calls QTextStream::setIntegerBase(16) on stream and returns stream.
QTextStream & dec(QTextStream &stream)
Calls QTextStream::setIntegerBase(10) on stream and returns stream.
constexpr Qt::strong_ordering compareThreeWay(LeftInt lhs, RightInt rhs) noexcept
QImageReader reader("image.png")
[1]
QCborStreamReader::StringResultCode qt_cbor_append_string_chunk(QCborStreamReader &reader, QByteArray *data)
void qt_cbor_stream_set_error(QCborStreamReaderPrivate *d, QCborError error)
static int typeOrder(QCborValue::Type e1, QCborValue::Type e2)
Q_CORE_EXPORT const char * qt_cbor_simpletype_id(QCborSimpleType st)
void qt_to_latin1_unchecked(uchar *dst, const char16_t *uc, qsizetype len)
static int compareStringsInUtf8(QStringView lhs, QStringView rhs, Comparison mode) noexcept
static bool shouldArrayRemainArray(qint64 key, QCborValue::Type t, QCborContainerPrivate *container)
static auto nextUtf32Character(const char16_t *&ptr, const char16_t *end) noexcept
static int compareContainer(const QCborContainerPrivate *c1, const QCborContainerPrivate *c2, Comparison mode) noexcept
QDebug operator<<(QDebug dbg, const QCborValue &v)
static QCborContainerPrivate * assignContainer(QCborContainerPrivate *&d, QCborContainerPrivate *x)
size_t qHash(const QCborValue &value, size_t seed)
static qsizetype stringLengthInUtf8(const char16_t *ptr, const char16_t *end) noexcept
static Q_DECL_UNUSED constexpr quint64 MaximumPreallocatedElementCount
static QCborValue::Type convertToExtendedType(QCborContainerPrivate *d)
Q_CORE_EXPORT const char * qt_cbor_tag_id(QCborTag tag)
bool comparesEqual(const QCborValue &lhs, const QCborValue &rhs) noexcept
static QCborContainerPrivate * maybeGrow(QCborContainerPrivate *container, qsizetype index)
static QDebug debugContents(QDebug &dbg, const QCborValue &v)
static int compareElementRecursive(const QCborContainerPrivate *c1, const Element &e1, const QCborContainerPrivate *c2, const Element &e2, Comparison mode) noexcept
static Q_DECL_UNUSED constexpr int MaximumRecursionDepth
static QT_BEGIN_NAMESPACE constexpr quint64 MaxAcceptableMemoryUse
QDataStream & operator>>(QDataStream &stream, QCborValue &value)
static void convertArrayToMap(QCborContainerPrivate *&array)
static int compareElementNoData(const Element &e1, const Element &e2) noexcept
#define QT_WARNING_DISABLE_MSVC(number)
AudioChannelLayoutTag tag
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
QT_BEGIN_NAMESPACE Q_ALWAYS_INLINE void qToUnaligned(const T src, void *dest)
static ControlElement< T > * ptr(QWidget *widget)
constexpr const T & qMin(const T &a, const T &b)
std::enable_if_t< std::is_unsigned_v< T >||std::is_signed_v< T >, bool > qMulOverflow(T v1, T v2, T *r)
static Q_DECL_CONST_FUNCTION bool qt_is_nan(double d)
constexpr static Q_DECL_CONST_FUNCTION double qt_qnan() noexcept
constexpr static Q_DECL_CONST_FUNCTION double qt_inf() noexcept
static Q_DECL_CONST_FUNCTION bool qt_is_inf(double d)
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLuint GLintptr offset
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
#define Q_ASSERT_X(cond, x, msg)
QStringView qToStringViewIgnoringNull(const QStringLike &s) noexcept
unsigned long long quint64
QUrl url("example.com")
[constructor-url-reference]
QCborValue(QCborTag(2), QByteArray("\x01\0\0\0\0\0\0\0\0", 9))
[0]
char * toString(const MyType &t)
[31]
\inmodule QtCore \inheaderfile QtCborCommon \reentrant
\inmodule QtCore\reentrant
static ValidUtf8Result isValidUtf8(QByteArrayView in)
QLatin1StringView asLatin1() const
QByteArray::size_type len
QByteArray asByteArrayView() const
QCborContainerPrivate * container