summaryrefslogtreecommitdiff
path: root/qt
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@trolltech.com>2006-04-10 10:49:36 +0000
committerJohn Palmieri <johnp@remedyz.boston.redhat.com>2006-06-28 08:15:14 -0400
commit553a35623c284d0a90c35a5c2eac7a76f88c0f88 (patch)
treeb233e7593e786be96bc619d8917fdfa21a1831f6 /qt
parent2b0d8d90cb693254bc8a8c8ee800df55664dc628 (diff)
Merge from Subversion: * qt/qt-dbus.qdocconf: Update Trolltech's webpage link to something that exists (r526315) * qt/qdbusinternalfilters.cpp: Correctly detect non-scriptable slots/signals (r526316) * qt/qdbusinternalfilters.cpp: Fix the setProperty call and also return an unknown-method error if the parameters don't match for org.freedesktop.DBus.Properties. (r526842) * qt/examples/dbus.cpp: Allow passing of QVariants (r526843) * qt/qdbusintegrator.cpp: Restore the proper order of delivery: don't make method returns be delivered on priority (r528150)
Diffstat (limited to 'qt')
-rw-r--r--qt/examples/dbus.cpp12
-rw-r--r--qt/qdbusintegrator.cpp6
-rw-r--r--qt/qdbusinternalfilters.cpp12
-rw-r--r--qt/qt-dbus.qdocconf2
4 files changed, 23 insertions, 9 deletions
diff --git a/qt/examples/dbus.cpp b/qt/examples/dbus.cpp
index e011381..00172c6 100644
--- a/qt/examples/dbus.cpp
+++ b/qt/examples/dbus.cpp
@@ -213,11 +213,13 @@ void placeCall(const QString &service, const QString &path, const QString &inter
QVariantList params;
for (int i = 0; argc && i < types.count(); ++i) {
int id = QVariant::nameToType(types.at(i));
- if (id == QVariant::UserType || id == QVariant::Map) {
+ if ((id == QVariant::UserType || id == QVariant::Map) && types.at(i) != "QVariant") {
fprintf(stderr, "Sorry, can't pass arg of type %s yet\n",
types.at(i).constData());
exit(1);
}
+ if (id == QVariant::UserType)
+ id = QMetaType::type(types.at(i));
Q_ASSERT(id);
@@ -227,7 +229,13 @@ void placeCall(const QString &service, const QString &path, const QString &inter
else
p = QString::fromLocal8Bit(argv[0]);
- p.convert( QVariant::Type(id) );
+ if (id < QVariant::UserType)
+ // avoid calling it for QVariant
+ p.convert( QVariant::Type(id) );
+ else if (types.at(i) == "QVariant") {
+ QVariant tmp(id, p.constData());
+ p = tmp;
+ }
params += p;
--argc;
++argv;
diff --git a/qt/qdbusintegrator.cpp b/qt/qdbusintegrator.cpp
index 38f71a1..a9467c0 100644
--- a/qt/qdbusintegrator.cpp
+++ b/qt/qdbusintegrator.cpp
@@ -995,6 +995,9 @@ bool QDBusConnectionPrivate::activateInternalFilters(const ObjectTreeNode *node,
qDBusPropertyGet(node, msg);
else if (msg.method() == QLatin1String("Set") && msg.signature() == QLatin1String("ssv"))
qDBusPropertySet(node, msg);
+ else
+ return false;
+
return true;
}
@@ -1245,10 +1248,9 @@ void QDBusConnectionPrivate::messageResultReceived(DBusPendingCall *pending, voi
qDebug() << "got message: " << msg;
CallDeliveryEvent *e = prepareReply(call->receiver, call->methodIdx, call->metaTypes, msg);
if (e)
- connection->deliverCall(*e);
+ connection->postCallDeliveryEvent(e);
else
qDebug() << "Deliver failed!";
- delete e;
}
dbus_pending_call_unref(pending);
delete call;
diff --git a/qt/qdbusinternalfilters.cpp b/qt/qdbusinternalfilters.cpp
index e5a7fc9..7e93840 100644
--- a/qt/qdbusinternalfilters.cpp
+++ b/qt/qdbusinternalfilters.cpp
@@ -152,9 +152,13 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
.arg(isOutput ? QLatin1String("out") : QLatin1String("in"));
}
- if (!isScriptable &&
- !(flags & (QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals)))
- continue;
+ if (!isScriptable) {
+ // check if this was added by other means
+ if (isSignal && (flags & QDBusConnection::ExportAllSignals) != QDBusConnection::ExportAllSignals)
+ continue;
+ if (!isSignal && (flags & QDBusConnection::ExportAllSlots) != QDBusConnection::ExportAllSlots)
+ continue;
+ }
if (qDBusCheckAsyncTag(mm.tag()))
// add the no-reply annotation
@@ -359,7 +363,7 @@ void qDBusPropertySet(const QDBusConnectionPrivate::ObjectTreeNode *node, const
}
}
- if (!value.isValid() && node->flags & QDBusConnection::ExportProperties) {
+ if (node->flags & QDBusConnection::ExportProperties) {
// try the object itself
int pidx = node->obj->metaObject()->indexOfProperty(property_name);
if (pidx != -1) {
diff --git a/qt/qt-dbus.qdocconf b/qt/qt-dbus.qdocconf
index 5c5ef6c..db9fcd6 100644
--- a/qt/qt-dbus.qdocconf
+++ b/qt/qt-dbus.qdocconf
@@ -126,7 +126,7 @@ HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0
HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
- "<td width=\"30%\">Copyright &copy; 2006 <a href=\"trolltech.html\">Trolltech</a></td>\n" \
+ "<td width=\"30%\">Copyright &copy; 2006 <a href=\"http://www.trolltech.com\">Trolltech</a></td>\n" \
"<td width=\"40%\" align=\"center\">&nbsp;</td>\n" \
"<td width=\"30%\" align=\"right\"><div align=\"right\">QtDBus \\version</div></td>\n" \
"</tr></table></div></address>"