\value InvalidInterface The interface is invalid.
*/
+/*!
+ \internal
+ Constructs a QDBusError that represents no error.
+*/
+QDBusError::QDBusError()
+ : code(NoError)
+{
+
+}
+
#ifndef QT_BOOTSTRAPPED
/*!
\internal
#endif
};
+ QDBusError();
#ifndef QT_BOOTSTRAPPED
- explicit QDBusError(const DBusError *error = 0);
+ explicit QDBusError(const DBusError *error);
/*implicit*/ QDBusError(const QDBusMessage& msg);
#endif
QDBusError(ErrorType error, const QString &message);
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QDBusError)
+
QT_END_HEADER
#endif // QT_NO_DBUS
// set the guard variable at the end
if (!initialized) {
#ifndef QT_BOOTSTRAPPED
- // register our types with QtCore
- message = qRegisterMetaType<QDBusMessage>("QDBusMessage");
- error = qRegisterMetaType<QDBusError>("QDBusError");
+ // register our types with QtCore (calling qMetaTypeId<T>() does this implicitly)
+ message = qMetaTypeId<QDBusMessage>();
+ error = qMetaTypeId<QDBusError>();
#endif
- argument = qRegisterMetaType<QDBusArgument>("QDBusArgument");
- variant = qRegisterMetaType<QDBusVariant>("QDBusVariant");
- objectpath = qRegisterMetaType<QDBusObjectPath>("QDBusObjectPath");
- signature = qRegisterMetaType<QDBusSignature>("QDBusSignature");
- unixfd = qRegisterMetaType<QDBusUnixFileDescriptor>("QDBusUnixFileDescriptor");
+ argument = qMetaTypeId<QDBusArgument>();
+ variant = qMetaTypeId<QDBusVariant>();
+ objectpath = qMetaTypeId<QDBusObjectPath>();
+ signature = qMetaTypeId<QDBusSignature>();
+ unixfd = qMetaTypeId<QDBusUnixFileDescriptor>();
#ifndef QDBUS_NO_SPECIALTYPES
// and register QtCore's with us
void (*mf)(QDBusArgument &, const T *) = qDBusMarshallHelper<T>;
void (*df)(const QDBusArgument &, T *) = qDBusDemarshallHelper<T>;
- int id = qRegisterMetaType<T>(); // make sure it's registered
+ int id = qMetaTypeId<T>(); // make sure it's registered
QDBusMetaType::registerMarshallOperators(id,
reinterpret_cast<QDBusMetaType::MarshallFunction>(mf),
reinterpret_cast<QDBusMetaType::DemarshallFunction>(df));