Replace QPair with std::pair in the docs

QPair _is_ std::pair. It's confusing that debuggers consistently show
the real name, std::pair, while the API and docs continue to maintain
the illusion that there is such a thing as QPair.

Use std::pair everywhere.

Pick-to: 6.5
Task-number: QTBUG-115841
Change-Id: I009e2fc415a79a74b583a13cf11e4ff9483a7f6b
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit ec67d0c942a7756afbb6e21c76e835efd3557427)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8cba66e91dcfa9de7c286cbca214d9d5a0ab8669)
This commit is contained in:
Marc Mutz 2023-12-12 09:52:14 +01:00 committed by Qt Cherry-pick Bot
parent 9995e90519
commit 8aad42ea47
3 changed files with 3 additions and 3 deletions

View File

@ -183,7 +183,7 @@ using namespace Qt::StringLiterals;
//! [21]
//! [22]
void appendMap(QCborStreamWriter &writer, const QList<QPair<int, QString>> &values)
void appendMap(QCborStreamWriter &writer, const QList<std::pair<int, QString>> &values)
{
writer.startMap();
for (const auto pair : values) {

View File

@ -46,7 +46,7 @@
\li QMap<Key, T>
\li QMargins
\li QMatrix4x4
\li QPair<T1, T2>
\li std::pair<T1, T2>
\li QPalette
\li QPen
\li QPicture

View File

@ -31,7 +31,7 @@
\snippet code/doc_src_containers.cpp 16
Unless the data type contains a comma (e.g., \c{QPair<int,
Unless the data type contains a comma (e.g., \c{std::pair<int,
int>}), the variable used for iteration can be defined within the
\c foreach statement: