QtDBus: port away from QPair

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>
(cherry picked from commit 400426acb2955447704821ab03df502dd5705be2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2023-12-12 10:39:23 +01:00 committed by Qt Cherry-pick Bot
parent 8dab969c97
commit ce87ff291a
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;