--- qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp 2014-02-01 12:38:02.000000000 -0800 +++ qtdeclarative-opensource-src-5.2.1/src/qml/jsruntime/qv4qobjectwrapper.cpp 2014-11-19 17:53:04.536100259 -0800 @@ -160,6 +160,7 @@ static QV4::ReturnedValue LoadProperty(Q if (property.isQObject()) { QObject *rv = 0; + object->objectName().toLocal8Bit(); ReadFunction(object, property, &rv, notifier); return QV4::QObjectWrapper::wrap(v4, rv); } else if (property.isQList()) { @@ -628,7 +629,15 @@ ReturnedValue QObjectWrapper::getPropert Q_ASSERT(cache); QQmlPropertyData *property = cache->property(propertyIndex); Q_ASSERT(property); // We resolved this property earlier, so it better exist! - return getProperty(object, ctx, property, captureRequired); + + ReturnedValue retVal = getProperty(object, ctx, property, captureRequired); + + if (property->isQObject()) { + QV4::ScopedValue value(QV4::Scope(ctx), retVal); + retVal = value.asReturnedValue(); + } + + return retVal; } void QObjectWrapper::setProperty(ExecutionContext *ctx, int propertyIndex, const ValueRef value)