summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusmisc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus/qdbusmisc.cpp')
-rw-r--r--src/dbus/qdbusmisc.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp
index 7d68bf1185..fa9b74199e 100644
--- a/src/dbus/qdbusmisc.cpp
+++ b/src/dbus/qdbusmisc.cpp
@@ -41,14 +41,16 @@
#include <string.h>
+#ifndef QT_BOOTSTRAPPED
#include <QtCore/qcoreapplication.h>
#include <QtCore/qvariant.h>
#include <QtCore/qmetaobject.h>
#include "qdbusutil_p.h"
#include "qdbusconnection_p.h"
-#include "qdbusmetatype_p.h"
#include "qdbusabstractadaptor_p.h" // for QCLASSINFO_DBUS_*
+#endif
+#include "qdbusmetatype_p.h"
#ifndef QT_NO_DBUS
@@ -69,6 +71,8 @@ bool qDBusCheckAsyncTag(const char *tag)
return false;
}
+#ifndef QT_BOOTSTRAPPED
+
QString qDBusInterfaceFromMetaObject(const QMetaObject *mo)
{
QString interface;
@@ -128,9 +132,14 @@ bool qDBusInterfaceInObject(QObject *obj, const QString &interface_name)
// sig must be the normalised signature for the method
int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes)
{
- QDBusMetaTypeId::init();
+ return qDBusParametersForMethod(mm.parameterTypes(), metaTypes);
+}
+
+#endif // QT_BOOTSTRAPPED
- QList<QByteArray> parameterTypes = mm.parameterTypes();
+int qDBusParametersForMethod(const QList<QByteArray> &parameterTypes, QList<int>& metaTypes)
+{
+ QDBusMetaTypeId::init();
metaTypes.clear();
metaTypes.append(0); // return type
@@ -141,7 +150,7 @@ int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes)
for ( ; it != end; ++it) {
const QByteArray &type = *it;
if (type.endsWith('*')) {
- //qWarning("Could not parse the method '%s'", mm.signature());
+ //qWarning("Could not parse the method '%s'", mm.methodSignature().constData());
// pointer?
return -1;
}
@@ -152,7 +161,7 @@ int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes)
int id = QMetaType::type(basictype);
if (id == 0) {
- //qWarning("Could not parse the method '%s'", mm.signature());
+ //qWarning("Could not parse the method '%s'", mm.methodSignature().constData());
// invalid type in method parameter list
return -1;
} else if (QDBusMetaType::typeToSignature(id) == 0)
@@ -164,14 +173,14 @@ int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes)
}
if (seenMessage) { // && !type.endsWith('&')
- //qWarning("Could not parse the method '%s'", mm.signature());
+ //qWarning("Could not parse the method '%s'", mm.methodSignature().constData());
// non-output parameters after message or after output params
return -1; // not allowed
}
int id = QMetaType::type(type);
- if (id == 0) {
- //qWarning("Could not parse the method '%s'", mm.signature());
+ if (id == QMetaType::UnknownType) {
+ //qWarning("Could not parse the method '%s'", mm.methodSignature().constData());
// invalid type in method parameter list
return -1;
}