[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/dbus-qt4-qt3backport
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2007-02-01 2:32:05
Message-ID: 1170297125.170308.4458.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 628962 by krake:

Added Makefile targets for dbus-test cross binding tests.

Fixed struct conversion in QDBusData.

Implemented struct demarshalling.

Fixed boolean marshalling.

Fixed connection closing: shared connections are only uref'ed and closed by
base lib


 M  +10 -0     Makefile.am  
 M  +0 -4      TODO  
 M  +1 -1      qdbusdata.cpp  
 M  +3 -1      qdbusintegrator.cpp  
 M  +15 -1     qdbusmarshall.cpp  
 M  +6 -0      qdbusmessage.cpp  


--- branches/work/dbus-qt4-qt3backport/Makefile.am #628961:628962
@@ -60,3 +60,13 @@
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = dbus-1-qt3.pc
+
+# targets required for cross-binding test script
+cross-test-compile:
+	cd test/cross-test; $(MAKE) cross-test-compile
+
+cross-test-server:
+	cd test/cross-test; $(MAKE) cross-test-server
+
+cross-test-client:
+	cd test/cross-test; $(MAKE) cross-test-client
--- branches/work/dbus-qt4-qt3backport/TODO #628961:628962
@@ -8,8 +8,4 @@
 - Check possibility of a QObject adapter implementation of QDBusObjectBase,
   i.e. a making an QObject's slots callable through D-BUS
 
-- Check why closeConnection() currently does not close the underlying
-  connection
 
-- Check improvements of the Qt4 bindings marshalling code done by qbast
-
--- branches/work/dbus-qt4-qt3backport/qdbusdata.cpp #628961:628962
@@ -578,7 +578,7 @@
         if ((*it).d->type == Invalid) return data;
     }
 
-    data.d->type = QDBusData::List;
+    data.d->type = QDBusData::Struct;
     data.d->value.pointer = new QValueList<QDBusData>(memberList);
 
     return data;
--- branches/work/dbus-qt4-qt3backport/qdbusintegrator.cpp #628961:628962
@@ -304,10 +304,12 @@
         }
     } else if (oldMode == ClientMode) {
         if (connection) {
+            // closing shared connections is forbidden
+#if 0
             dbus_connection_close(connection);
             // send the "close" message
             while (dbus_connection_dispatch(connection) == DBUS_DISPATCH_DATA_REMAINS);
-
+#endif
             dbus_connection_unref(connection);
             connection = 0;
         }
--- branches/work/dbus-qt4-qt3backport/qdbusmarshall.cpp #628961:628962
@@ -389,6 +389,20 @@
 
         return QDBusData::fromVariant(dvariant);
     }
+    case DBUS_TYPE_STRUCT: {
+        QValueList<QDBusData> memberList;
+
+        DBusMessageIter subIt;
+        dbus_message_iter_recurse(it, &subIt);
+
+        while (dbus_message_iter_get_arg_type(&subIt) != DBUS_TYPE_INVALID) {
+            memberList << qFetchParameter(&subIt);
+
+            dbus_message_iter_next(&subIt);
+        }
+
+        return QDBusData::fromStruct(memberList);
+    }
 #if 0
     case DBUS_TYPE_DICT: {
         QMap<QString, QVariant> map;
@@ -780,7 +794,7 @@
     {
         case QDBusData::Bool:
         {
-            bool value = var.toBool();
+            dbus_bool_t value = var.toBool();
             dbus_message_iter_append_basic(it, DBUS_TYPE_BOOLEAN, &value);
             break;
         }
--- branches/work/dbus-qt4-qt3backport/qdbusmessage.cpp #628961:628962
@@ -88,6 +88,12 @@
     Q_ASSERT(other.d->msg);
 
     QDBusMessage message;
+    if (!error.isValid())
+    {
+        qWarning("QDBusMessage: error passed to methodError() is not valid!");
+        return message;
+    }
+
     message.d->type = DBUS_MESSAGE_TYPE_ERROR;
     message.d->reply = dbus_message_ref(other.d->msg);
     message.d->error = error;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic