# define DBUS_TYPE_UNIX_FD_AS_STRING "h"
#endif
-Q_DECLARE_METATYPE(QList<bool>)
-Q_DECLARE_METATYPE(QList<short>)
-Q_DECLARE_METATYPE(QList<ushort>)
-Q_DECLARE_METATYPE(QList<int>)
-Q_DECLARE_METATYPE(QList<uint>)
-Q_DECLARE_METATYPE(QList<qlonglong>)
-Q_DECLARE_METATYPE(QList<qulonglong>)
-Q_DECLARE_METATYPE(QList<double>)
-
QT_BEGIN_NAMESPACE
class QDBusCustomTypeInfo
// 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
qDBusRegisterMetaType<QList<QDBusUnixFileDescriptor> >();
#endif
-#if QT_BOOTSTRAPPED
+#ifdef QT_BOOTSTRAPPED
const int lastId = qDBusRegisterMetaType<QList<QDBusUnixFileDescriptor> >();
message = lastId + 1;
error = lastId + 2;
/*!
\class QDBusMetaType
+ \inmodule QtDBus
\brief Meta-type registration system for the QtDBus module.
\internal
Q_DECLARE_METATYPE() macro, and then registered as in the
following example:
- \snippet doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp 0
+ \snippet code/src_qdbus_qdbusmetatype.cpp 0
If \c{T} isn't a type derived from one of
Qt's \l{container classes}, the \c{operator<<} and