if (mm.methodType() != QMetaMethod::Slot && mm.methodType() != QMetaMethod::Method)
continue;
- const int returnType = qDBusNameToTypeId(mm.typeName());
+ const int returnType = QMetaType::type(mm.typeName());
if (returnType == QMetaType::Void) {
mode = QDBus::NoBlock;
break;
// in qdbusmisc.cpp
extern int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes);
-extern int qDBusNameToTypeId(const char *name);
extern bool qDBusInterfaceInObject(QObject *obj, const QString &interface_name);
extern QString qDBusInterfaceFromMetaObject(const QMetaObject *mo);
if (paren != name.length() || !slotname.startsWith(name))
continue;
- const int returnType = qDBusNameToTypeId(mm.typeName());
+ const int returnType = QMetaType::type(mm.typeName());
const bool isScriptable = mm.attributes() & QMetaMethod::Scriptable;
int inputCount = qDBusParametersForMethod(mm, metaTypes);
int id = mp.type();
if (id == QVariant::UserType) {
// dynamic type
- id = qDBusNameToTypeId(mp.typeName());
+ id = QMetaType::type(mp.typeName());
if (id == -1) {
// type not registered?
qWarning("QDBusConnection: Unable to handle unregistered datatype '%s' for property '%s::%s'",
continue;
// is it a registered property?
- int typeId = qDBusNameToTypeId(mp.typeName());
+ int typeId = QMetaType::type(mp.typeName());
if (!typeId)
continue;
const char *signature = QDBusMetaType::typeToSignature(typeId);
QT_BEGIN_NAMESPACE
-int qDBusNameToTypeId(const char *name)
-{
- int id = static_cast<int>( QVariant::nameToType(name) );
- if (id == QVariant::UserType)
- id = QMetaType::type(name);
- return id;
-}
-
QString qDBusInterfaceFromMetaObject(const QMetaObject *mo)
{
QString interface;
QByteArray basictype = type;
basictype.truncate(type.length() - 1);
- int id = qDBusNameToTypeId(basictype);
+ int id = QMetaType::type(basictype);
if (id == 0) {
//qWarning("Could not parse the method '%s'", mm.signature());
// invalid type in method parameter list
return -1; // not allowed
}
- int id = qDBusNameToTypeId(type);
+ int id = QMetaType::type(type);
if (id == 0) {
//qWarning("Could not parse the method '%s'", mm.signature());
// invalid type in method parameter list
if (mp.isWritable())
access |= 2;
- int typeId = qDBusNameToTypeId(mp.typeName());
+ int typeId = QMetaType::type(mp.typeName());
if (!typeId)
continue;
const char *signature = QDBusMetaType::typeToSignature(typeId);
.arg(QLatin1String(signature.left(paren)));
// check the return type first
- int typeId = qDBusNameToTypeId(mm.typeName());
+ int typeId = QMetaType::type(mm.typeName());
if (typeId) {
const char *typeName = QDBusMetaType::typeToSignature(typeId);
if (typeName) {