QCbor/QJson: s/QPair/std::pair/

Also port qMakePair() to just braced initialization and CTAD.

Pick-to: 6.7
Task-number: QTBUG-115841
Change-Id: I9eafb20ebc63bd33eb52661f4f14ad2db9fc0f00
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This commit is contained in:
Marc Mutz 2023-12-12 10:06:19 +01:00
parent b6fdef44e4
commit 4be8755151
3 changed files with 10 additions and 10 deletions

View File

@ -20,7 +20,7 @@ class QCborContainerPrivate;
class Q_CORE_EXPORT QCborMap
{
public:
typedef QPair<QCborValue, QCborValue> value_type;
typedef std::pair<QCborValue, QCborValue> value_type;
typedef QCborValue key_type;
typedef QCborValue mapped_type;
typedef qsizetype size_type;
@ -34,9 +34,9 @@ public:
public:
typedef std::random_access_iterator_tag iterator_category;
typedef qsizetype difference_type;
typedef QPair<QCborValueConstRef, QCborValueRef> value_type;
typedef QPair<QCborValueConstRef, QCborValueRef> reference;
typedef QPair<QCborValueConstRef, QCborValueRef> pointer;
typedef std::pair<QCborValueConstRef, QCborValueRef> value_type;
typedef std::pair<QCborValueConstRef, QCborValueRef> reference;
typedef std::pair<QCborValueConstRef, QCborValueRef> pointer;
constexpr Iterator() = default;
constexpr Iterator(const Iterator &) = default;
@ -94,9 +94,9 @@ public:
public:
typedef std::random_access_iterator_tag iterator_category;
typedef qsizetype difference_type;
typedef QPair<QCborValueConstRef, QCborValueConstRef> value_type;
typedef QPair<QCborValueConstRef, QCborValueConstRef> reference;
typedef QPair<QCborValueConstRef, QCborValueConstRef> pointer;
typedef std::pair<QCborValueConstRef, QCborValueConstRef> value_type;
typedef std::pair<QCborValueConstRef, QCborValueConstRef> reference;
typedef std::pair<QCborValueConstRef, QCborValueConstRef> pointer;
constexpr ConstIterator() = default;
constexpr ConstIterator(const ConstIterator &) = default;

View File

@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE
QJsonObject::QJsonObject() = default;
/*!
\fn QJsonObject::QJsonObject(std::initializer_list<QPair<QString, QJsonValue> > args)
\fn QJsonObject::QJsonObject(std::initializer_list<std::pair<QString, QJsonValue> > args)
\since 5.4
Constructs a QJsonObject instance initialized from \a args initialization list.
For example:
@ -111,7 +111,7 @@ QJsonObject::QJsonObject(QCborContainerPrivate *object)
*/
QJsonObject::~QJsonObject() = default;
QJsonObject::QJsonObject(std::initializer_list<QPair<QString, QJsonValue> > args)
QJsonObject::QJsonObject(std::initializer_list<std::pair<QString, QJsonValue> > args)
{
for (const auto &arg : args)
insert(arg.first, arg.second);

View File

@ -21,7 +21,7 @@ class Q_CORE_EXPORT QJsonObject
public:
QJsonObject();
QJsonObject(std::initializer_list<QPair<QString, QJsonValue> > args);
QJsonObject(std::initializer_list<std::pair<QString, QJsonValue> > args);
~QJsonObject();