I have made the following changes intended for :
  CE:MW:Shared / connman-qt

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/7526

Thank You,
rojkov

[This message was auto-generated]

---

Request # 7526:

Messages from BOSS:

State: review at 2012-12-12T16:31:55 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: home:rojkov:branches:CE:MW:Shared / connman-qt -> CE:MW:Shared / 
connman-qt
  
changes files:
--------------
--- connman-qt.changes
+++ connman-qt.changes
@@ -0,0 +1,3 @@
+* Wed Dec 12 2012 Dmitry Rozhkov <[email protected]> - 0.3.3
+- Fixes JB#4032 - implement proper DBus marshalling for Proxy.Configuration
+

old:
----
  connman-qt-0.3.2.tar.bz2

new:
----
  connman-qt-0.3.3.tar.bz2

spec files:
-----------
--- connman-qt.spec
+++ connman-qt.spec
@@ -9,7 +9,7 @@
 # << macros
 
 Summary:    qt bindings for connman
-Version:    0.3.2
+Version:    0.3.3
 Release:    1
 Group:      System/GUI/Other
 License:    Apache License

other changes:
--------------

++++++ connman-qt-0.3.2.tar.bz2 -> connman-qt-0.3.3.tar.bz2
--- README.rst
+++ README.rst
@@ -1,7 +1,7 @@
 Qt bindings for ConnMan
 =======================
 
-The Qt bindings are dirrect reflection of ConnMan's D-Bus interfaces:
+The Qt bindings are direct reflection of ConnMan's D-Bus interfaces:
 the class `NetworkManager` represents `net.connman.Manager`,
 `NetworkTechnology` represents `net.connman.Technology` and
 `NetworkService` represents `net.connman.Service`.
--- libconnman-qt/networkservice.cpp
+++ libconnman-qt/networkservice.cpp
@@ -12,6 +12,28 @@
 #include "networkservice.h"
 #include "debug.h"
 
+/*
+ * JS returns arrays as QVariantList or a(v) in terms of D-Bus,
+ * but ConnMan requires some properties to be lists of strings
+ * or a(s) thus this function.
+ */
+QVariantMap adaptToConnmanProperties(const QVariantMap &map)
+{
+    QVariantMap buffer;
+    foreach (const QString &key, map.keys()) {
+        if (map.value(key).type() == QVariant::List) {
+            QStringList strList;
+            foreach (const QVariant &value, map.value(key).toList()) {
+                strList.append(value.toString());
+            }
+            buffer.insert(key, strList);
+        } else {
+            buffer.insert(key, map.value(key));
+        }
+    }
+    return buffer;
+}
+
 const QString NetworkService::Name("Name");
 const QString NetworkService::State("State");
 const QString NetworkService::Type("Type");
@@ -193,7 +215,7 @@
 void NetworkService::setProxyConfig(const QVariantMap &proxy)
 {
     // QDBusPendingReply<void> reply =
-    m_service->SetProperty(ProxyConfig, QDBusVariant(QVariant(proxy)));
+    m_service->SetProperty(ProxyConfig, 
QDBusVariant(QVariant(adaptToConnmanProperties(proxy))));
 }
 
 /* this slot is used for debugging */

++++++ connman-qt.yaml
--- connman-qt.yaml
+++ connman-qt.yaml
@@ -1,6 +1,6 @@
 Name: connman-qt
 Summary: qt bindings for connman
-Version: 0.3.2
+Version: 0.3.3
 Release: 1
 Group: System/GUI/Other
 License: Apache License



Reply via email to