QDBusPendingCallPrivate: save 8 bytes on 64-bit archs
[profile/ivi/qtbase.git] / src / dbus / qdbusmetatype.cpp
index 0359b4d..e75aff4 100644 (file)
 # define DBUS_TYPE_UNIX_FD_AS_STRING "h"
 #endif
 
 # 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
 QT_BEGIN_NAMESPACE
 
 class QDBusCustomTypeInfo
@@ -114,15 +105,15 @@ void QDBusMetaTypeId::init()
     // set the guard variable at the end
     if (!initialized) {
 #ifndef QT_BOOTSTRAPPED
     // 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
 #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
 
 #ifndef QDBUS_NO_SPECIALTYPES
         // and register QtCore's with us
@@ -154,7 +145,7 @@ void QDBusMetaTypeId::init()
         qDBusRegisterMetaType<QList<QDBusUnixFileDescriptor> >();
 #endif
 
         qDBusRegisterMetaType<QList<QDBusUnixFileDescriptor> >();
 #endif
 
-#if QT_BOOTSTRAPPED
+#ifdef QT_BOOTSTRAPPED
         const int lastId = qDBusRegisterMetaType<QList<QDBusUnixFileDescriptor> >();
         message = lastId + 1;
         error = lastId + 2;
         const int lastId = qDBusRegisterMetaType<QList<QDBusUnixFileDescriptor> >();
         message = lastId + 1;
         error = lastId + 2;
@@ -168,6 +159,7 @@ Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock)
 
 /*!
     \class QDBusMetaType
 
 /*!
     \class QDBusMetaType
+    \inmodule QtDBus
     \brief Meta-type registration system for the QtDBus module.
     \internal
 
     \brief Meta-type registration system for the QtDBus module.
     \internal
 
@@ -200,7 +192,7 @@ Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock)
     Q_DECLARE_METATYPE() macro, and then registered as in the
     following example:
 
     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
 
     If \c{T} isn't a type derived from one of
     Qt's \l{container classes}, the \c{operator<<} and