summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-12-23 15:33:52 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-01-03 18:46:27 +0000
commit5f542f3cca13f2da58b82aee2efbaffefeee00a7 (patch)
treeee0d5b8a20f00050356d29ae406aab7fc5e24522 /src/dbus
parent04e76ec857efea1c28322cd44cb04f15134944fe (diff)
QDBusArgument: remove useless op<< overloads
... and remove misleading comments (these are overloads, not specializations). The QList overloads do nothing different from the generic container overloads. Remove them. Only leave the QVariantList overload, because that converts to QDBusVariant before serializing. Which means that this should probably be templated on the container type, otherwise you get different behavior for QList<QVariant> and, say, QVector<QVariant>, which is surely wrong. Change-Id: I215ba9891235b51304c2ed4041d3dbd003d69581 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbusargument.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h
index a6bc396861..6305239bdf 100644
--- a/src/dbus/qdbusargument.h
+++ b/src/dbus/qdbusargument.h
@@ -255,35 +255,6 @@ inline const QDBusArgument &operator>>(const QDBusArgument &arg, Container<T> &l
return arg;
}
-// QList specializations
-template<typename T>
-inline QDBusArgument &operator<<(QDBusArgument &arg, const QList<T> &list)
-{
- int id = qMetaTypeId<T>();
- arg.beginArray(id);
- typename QList<T>::ConstIterator it = list.constBegin();
- typename QList<T>::ConstIterator end = list.constEnd();
- for ( ; it != end; ++it)
- arg << *it;
- arg.endArray();
- return arg;
-}
-
-template<typename T>
-inline const QDBusArgument &operator>>(const QDBusArgument &arg, QList<T> &list)
-{
- arg.beginArray();
- list.clear();
- while (!arg.atEnd()) {
- T item;
- arg >> item;
- list.push_back(item);
- }
- arg.endArray();
-
- return arg;
-}
-
inline QDBusArgument &operator<<(QDBusArgument &arg, const QVariantList &list)
{
int id = qMetaTypeId<QDBusVariant>();
@@ -296,7 +267,6 @@ inline QDBusArgument &operator<<(QDBusArgument &arg, const QVariantList &list)
return arg;
}
-// QMap specializations
template<typename Key, typename T>
inline QDBusArgument &operator<<(QDBusArgument &arg, const QMap<Key, T> &map)
{
@@ -345,7 +315,6 @@ inline QDBusArgument &operator<<(QDBusArgument &arg, const QVariantMap &map)
return arg;
}
-// QHash specializations
template<typename Key, typename T>
inline QDBusArgument &operator<<(QDBusArgument &arg, const QHash<Key, T> &map)
{