diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/serialization/qcbormap.h | 16 | ||||
-rw-r--r-- | src/corelib/serialization/qcborvalue.cpp | 9 | ||||
-rw-r--r-- | src/corelib/serialization/qcborvalue.h | 8 |
3 files changed, 18 insertions, 15 deletions
diff --git a/src/corelib/serialization/qcbormap.h b/src/corelib/serialization/qcbormap.h index a3eddfea20..63bfa154fa 100644 --- a/src/corelib/serialization/qcbormap.h +++ b/src/corelib/serialization/qcbormap.h @@ -269,28 +269,28 @@ public: const_iterator find(const QString & key) const { return constFind(key); } const_iterator find(const QCborValue &key) const { return constFind(key); } - iterator insert(qint64 key, const QCborValue &value) + iterator insert(qint64 key, const QCborValue &value_) { QCborValueRef v = operator[](key); // detaches - v = value; + v = value_; return { d.data(), v.i }; } - iterator insert(QLatin1String key, const QCborValue &value) + iterator insert(QLatin1String key, const QCborValue &value_) { QCborValueRef v = operator[](key); // detaches - v = value; + v = value_; return { d.data(), v.i }; } - iterator insert(const QString &key, const QCborValue &value) + iterator insert(const QString &key, const QCborValue &value_) { QCborValueRef v = operator[](key); // detaches - v = value; + v = value_; return { d.data(), v.i }; } - iterator insert(const QCborValue &key, const QCborValue &value) + iterator insert(const QCborValue &key, const QCborValue &value_) { QCborValueRef v = operator[](key); // detaches - v = value; + v = value_; return { d.data(), v.i }; } iterator insert(value_type v) { return insert(v.first, v.second); } diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp index c61a7f7eae..96d3feaf1b 100644 --- a/src/corelib/serialization/qcborvalue.cpp +++ b/src/corelib/serialization/qcborvalue.cpp @@ -1832,17 +1832,20 @@ QCborValue::QCborValue(const QCborMap &m) } /*! + \fn QCborValue::QCborValue(QCborTag t, const QCborValue &tv) + \fn QCborValue::QCborValue(QCborKnownTags t, const QCborValue &tv) + Creates a QCborValue for the extended type represented by the tag value \a - tag, tagging value \a tv. The tag can later be retrieved using tag() and + t, tagging value \a tv. The tag can later be retrieved using tag() and the tagged value using taggedValue(). \sa isTag(), tag(), taggedValue(), QCborKnownTags */ -QCborValue::QCborValue(QCborTag tag, const QCborValue &tv) +QCborValue::QCborValue(QCborTag t, const QCborValue &tv) : n(-1), container(new QCborContainerPrivate), t(Tag) { container->ref.store(1); - container->append(tag); + container->append(t); container->append(tv); } diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h index 2f0d4d7957..64db66bc28 100644 --- a/src/corelib/serialization/qcborvalue.h +++ b/src/corelib/serialization/qcborvalue.h @@ -141,8 +141,8 @@ public: QCborValue(const QCborArray &a); QCborValue(const QCborMap &m); QCborValue(QCborTag tag, const QCborValue &taggedValue = QCborValue()); - QCborValue(QCborKnownTags tag, const QCborValue &taggedValue = QCborValue()) - : QCborValue(QCborTag(tag), taggedValue) + QCborValue(QCborKnownTags t_, const QCborValue &tv = QCborValue()) + : QCborValue(QCborTag(t_), tv) {} explicit QCborValue(const QDateTime &dt); @@ -342,8 +342,8 @@ public: return type() == QCborValue::type_helper(st); } - QCborTag tag(QCborTag tag = QCborTag(-1)) const - { return concrete().tag(tag); } + QCborTag tag(QCborTag defaultValue = QCborTag(-1)) const + { return concrete().tag(defaultValue); } QCborValue taggedValue(const QCborValue &defaultValue = QCborValue()) const { return concrete().taggedValue(defaultValue); } |