diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-01-12 03:24:36 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-01-12 03:24:36 (GMT) |
commit | b328136a920ec57ca13db5a39310293c4eaef27c (patch) | |
tree | d0f926735992ae75ae6be5bbb5185a2151b72e81 /src/declarative/qml/qmlbindingvme.cpp | |
parent | a53008073216540bb5cfd40563e4b33ba139832c (diff) | |
parent | 57198878ba5300aac4cd9e1481c9b8d2e372a267 (diff) | |
download | Qt-b328136a920ec57ca13db5a39310293c4eaef27c.zip Qt-b328136a920ec57ca13db5a39310293c4eaef27c.tar.gz Qt-b328136a920ec57ca13db5a39310293c4eaef27c.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml/qmlbindingvme.cpp')
-rw-r--r-- | src/declarative/qml/qmlbindingvme.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlbindingvme.cpp b/src/declarative/qml/qmlbindingvme.cpp index 29391a6..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)); @@ -570,7 +583,6 @@ inline static qreal toReal(Register *reg, int type, bool *ok = 0) if (type == QMetaType::QReal) { return reg->getqreal(); } else if (type == qMetaTypeId<QVariant>()) { - *ok = true; return reg->getvariantptr()->toReal(); } else { if (ok) *ok = false; @@ -624,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(); @@ -882,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; |