QtDBus: port away from QPair

Pick-to: 6.7
Task-number: QTBUG-115841
Change-Id: I1eaba630f003df695412dbb2353ce4870f9b9782
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
bb10
Marc Mutz 2023-12-12 10:39:23 +01:00
parent 2a0b9f0b90
commit 400426acb2
2 changed files with 3 additions and 2 deletions

View File

@ -46,6 +46,7 @@ qt_internal_add_module(DBus
DBUS_API_SUBJECT_TO_CHANGE
QT_NO_CONTEXTLESS_CONNECT
QT_NO_FOREACH
QT_NO_QPAIR
LIBRARIES
Qt::CorePrivate
PUBLIC_LIBRARIES

View File

@ -304,7 +304,7 @@ inline QDBusArgument &operator<<(QDBusArgument &arg, const QVariantHash &map)
}
template <typename T1, typename T2>
inline QDBusArgument &operator<<(QDBusArgument &arg, const QPair<T1, T2> &pair)
inline QDBusArgument &operator<<(QDBusArgument &arg, const std::pair<T1, T2> &pair)
{
arg.beginStructure();
arg << pair.first << pair.second;
@ -313,7 +313,7 @@ inline QDBusArgument &operator<<(QDBusArgument &arg, const QPair<T1, T2> &pair)
}
template <typename T1, typename T2>
inline const QDBusArgument &operator>>(const QDBusArgument &arg, QPair<T1, T2> &pair)
inline const QDBusArgument &operator>>(const QDBusArgument &arg, std::pair<T1, T2> &pair)
{
arg.beginStructure();
arg >> pair.first >> pair.second;