diff options
Diffstat (limited to 'src/declarative/qml/qmlbindingvme.cpp')
-rw-r--r-- | src/declarative/qml/qmlbindingvme.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlbindingvme.cpp b/src/declarative/qml/qmlbindingvme.cpp index 493aeaf..81e05c1 100644 --- a/src/declarative/qml/qmlbindingvme.cpp +++ b/src/declarative/qml/qmlbindingvme.cpp @@ -472,6 +472,19 @@ static bool findproperty(QObject *obj, Register *output, void *args[] = { output->typeDataPtr(), 0 }; QMetaObject::metacall(obj, QMetaObject::ReadProperty, property->coreIndex, args); output->settype(QMetaType::QReal); + } else if (property->propType == QMetaType::Int) { + void *args[] = { output->typeDataPtr(), 0 }; + QMetaObject::metacall(obj, QMetaObject::ReadProperty, property->coreIndex, args); + output->settype(QMetaType::Int); + } else if (property->propType == QMetaType::Bool) { + void *args[] = { output->typeDataPtr(), 0 }; + QMetaObject::metacall(obj, QMetaObject::ReadProperty, property->coreIndex, args); + output->settype(QMetaType::Bool); + } else if (property->propType == QMetaType::QString) { + new (output->typeDataPtr()) QString(); + void *args[] = { output->typeDataPtr(), 0 }; + QMetaObject::metacall(obj, QMetaObject::ReadProperty, property->coreIndex, args); + output->settype(QMetaType::QString); } else { new (output->typeDataPtr()) QVariant(obj->metaObject()->property(property->coreIndex).read(obj)); @@ -623,6 +636,8 @@ inline static QUrl toUrl(Register *reg, int type, QmlContextPrivate *context, bo if (ok) *ok = false; return QUrl(); } + } else if (type == QMetaType::QString) { + base = QUrl(*reg->getstringptr()); } else { if (ok) *ok = false; return QUrl(); @@ -881,6 +896,8 @@ void QmlBindingVME::run(const char *programData, int instrIndex, int type = registers[instr->cleanup.reg].gettype(); if (type == qMetaTypeId<QVariant>()) { ((QVariant *)registers[instr->cleanup.reg].typeDataPtr())->~QVariant(); + } else if (type == QMetaType::QString) { + ((QString *)registers[instr->cleanup.reg].typeDataPtr())->~QString(); } } break; |