Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-27 09:43:04 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-29 11:50:52 +0200
commit6ab7d0b384b58c52faf924278f032e796ce42f07 (patch)
treee7b7e633bc3fec406c878a4d3614676ac064f701 /sources/pyside6/libpyside/dynamicqmetaobject.cpp
parent61589ef35ee2ee7af52359940822a9d5f298a69f (diff)
Replace QPair by std::pair
Pick-to: 6.6 6.5 Change-Id: Ic64a2a2c162c54fbbfb6ddc5004ffe1944bfd37a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/dynamicqmetaobject.cpp')
-rw-r--r--sources/pyside6/libpyside/dynamicqmetaobject.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/sources/pyside6/libpyside/dynamicqmetaobject.cpp b/sources/pyside6/libpyside/dynamicqmetaobject.cpp
index e7dc35fef..691e66ddc 100644
--- a/sources/pyside6/libpyside/dynamicqmetaobject.cpp
+++ b/sources/pyside6/libpyside/dynamicqmetaobject.cpp
@@ -654,7 +654,7 @@ void MetaObjectBuilderPrivate::parsePythonType(PyTypeObject *type)
AutoDecRef items(PyMapping_Items(members));
Py_ssize_t nr_items = PySequence_Length(items);
- QList<QPair<QByteArray, int> > entries;
+ QList<std::pair<QByteArray, int> > entries;
for (Py_ssize_t idx = 0; idx < nr_items; ++idx) {
AutoDecRef item(PySequence_GetItem(items, idx));
AutoDecRef key(PySequence_GetItem(item, 0));
@@ -662,8 +662,7 @@ void MetaObjectBuilderPrivate::parsePythonType(PyTypeObject *type)
AutoDecRef value(PyObject_GetAttr(member, Shiboken::PyName::value()));
auto ckey = String::toCString(key);
auto ivalue = PyLong_AsSsize_t(value);
- auto thing = QPair<QByteArray, int>(ckey, int(ivalue));
- entries.push_back(thing);
+ entries.push_back(std::make_pair(ckey, int(ivalue)));
}
addEnumerator(name, isFlag, true, entries);
}