Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
KDE:KDE3
libdbus-1-qt3-0
gentoo-140659d46b44b18c311d8d6f0cb7c96cbc43c6b5...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gentoo-140659d46b44b18c311d8d6f0cb7c96cbc43c6b5.patch of Package libdbus-1-qt3-0
From 140659d46b44b18c311d8d6f0cb7c96cbc43c6b5 Mon Sep 17 00:00:00 2001 From: Serghei Amelian <serghei.amelian@gmail.com> Date: Wed, 11 Apr 2012 15:58:40 +0300 Subject: [PATCH] fix de-marshalling array of ObjectPath --- dbus/src/qdbusmarshall.cpp | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/dbus/src/qdbusmarshall.cpp b/dbus/src/qdbusmarshall.cpp index 8951090..de44a27 100644 --- a/dbus/src/qdbusmarshall.cpp +++ b/dbus/src/qdbusmarshall.cpp @@ -342,6 +342,19 @@ void qFetchStringKeyMapEntry(QDBusDataMap<QString>& map, DBusMessageIter* it) map.insert(key, qFetchParameter(&itemIter)); } +void qFetchObjectPathKeyMapEntry(QDBusDataMap<QDBusObjectPath>& map, DBusMessageIter* it) +{ + DBusMessageIter itemIter; + dbus_message_iter_recurse(it, &itemIter); + Q_ASSERT(dbus_message_iter_has_next(&itemIter)); + + QDBusObjectPath key = qFetchParameter(&itemIter).toObjectPath(); + + dbus_message_iter_next(&itemIter); + + map.insert(key, qFetchParameter(&itemIter)); +} + static QDBusData qFetchMap(DBusMessageIter *it, const QDBusData& prototype) { if (dbus_message_iter_get_arg_type(it) == DBUS_TYPE_INVALID) @@ -417,7 +430,6 @@ static QDBusData qFetchMap(DBusMessageIter *it, const QDBusData& prototype) } case DBUS_TYPE_STRING: // fall through - case DBUS_TYPE_OBJECT_PATH: // fall through case DBUS_TYPE_SIGNATURE: { QDBusDataMap<QString> map = prototype.toStringKeyMap(); do { @@ -427,6 +439,14 @@ static QDBusData qFetchMap(DBusMessageIter *it, const QDBusData& prototype) return QDBusData::fromStringKeyMap(map); } + case DBUS_TYPE_OBJECT_PATH: { + QDBusDataMap<QDBusObjectPath> map = prototype.toObjectPathKeyMap(); + do { + qFetchObjectPathKeyMapEntry(map, it); + } while (dbus_message_iter_next(it)); + return QDBusData::fromObjectPathKeyMap(map); + } + default: break; } -- 1.7.5.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor