+2006-04-10 Thiago Macieira <thiago.macieira@trolltech.com>
+
+ 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)
+
2006-03-28 Thiago Macieira <thiago.macieira@trolltech.com>
* configure.in qt/Makefile.am: add qt/examples
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);
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;
qDBusPropertyGet(node, msg);
else if (msg.method() == QLatin1String("Set") && msg.signature() == QLatin1String("ssv"))
qDBusPropertySet(node, msg);
+ else
+ return false;
+
return true;
}
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;
.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
}
}
- 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) {
HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
- "<td width=\"30%\">Copyright © 2006 <a href=\"trolltech.html\">Trolltech</a></td>\n" \
+ "<td width=\"30%\">Copyright © 2006 <a href=\"http://www.trolltech.com\">Trolltech</a></td>\n" \
"<td width=\"40%\" align=\"center\"> </td>\n" \
"<td width=\"30%\" align=\"right\"><div align=\"right\">QtDBus \\version</div></td>\n" \
"</tr></table></div></address>"