Change-Id: I14973b94f404f9e4fe06b192ef177f01e0f5ef01
Reviewed-on: http://codereview.qt.nokia.com/3801
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
instr.setType(QDeclarativeInstruction::StoreTime);
instr.storeTime.propertyIndex = prop->index;
Q_ASSERT(sizeof(instr.storeTime.time) == sizeof(QTime));
instr.setType(QDeclarativeInstruction::StoreTime);
instr.storeTime.propertyIndex = prop->index;
Q_ASSERT(sizeof(instr.storeTime.time) == sizeof(QTime));
- ::memcpy(&instr.storeTime.time, &time, sizeof(QTime)); }
+ ::memcpy(&instr.storeTime.time, &time, sizeof(QTime));
}
break;
case QVariant::DateTime:
}
break;
case QVariant::DateTime:
prop.resolvedCustomTypeName = pool->NewByteArray(typeName);
prop.typeRef = builder.newString(typeName.length());
prop.resolvedCustomTypeName = pool->NewByteArray(typeName);
prop.typeRef = builder.newString(typeName.length());
+ int propertyFlags = 0;
+ if (writable)
+ propertyFlags |= QFastMetaBuilder::Writable;
+ if (resettable)
+ propertyFlags |= QFastMetaBuilder::Resettable;
+
builder.setProperty(propIndex, prop.nameRef, prop.typeRef, (QMetaType::Type)type,
builder.setProperty(propIndex, prop.nameRef, prop.typeRef, (QMetaType::Type)type,
- (QFastMetaBuilder::PropertyFlag)(writable?int(QFastMetaBuilder::Writable):0),
+ (QFastMetaBuilder::PropertyFlag)propertyFlags,
-bool QDeclarativeMetaType::isAnyModule(const QByteArray &module)
-{
- QDeclarativeMetaTypeData *data = metaTypeData();
-
- QDeclarativeMetaTypeData::ModuleInfoHash::Iterator it = data->modules.begin();
- while (it != data->modules.end()) {
- if (it.key().first == module)
- return true;
- ++it;
- }
-
- return false;
-}
-
/*
Returns true if a module \a uri of any version is installed.
*/
/*
Returns true if a module \a uri of any version is installed.
*/
- signal.location = location(node->typeToken, node->semicolonToken);
+ signal->location = location(node->typeToken, node->semicolonToken);
_stateStack.top().object->dynamicSignals.append(signal);
} else {
const QStringRef &memberType = node->memberType;
_stateStack.top().object->dynamicSignals.append(signal);
} else {
const QStringRef &memberType = node->memberType;
v8engine->qobjectWrapper()->setProperty(ao, propertystring, value,
QV8QObjectWrapper::IgnoreRevision);
} else if (resource->typeNamespace) {
v8engine->qobjectWrapper()->setProperty(ao, propertystring, value,
QV8QObjectWrapper::IgnoreRevision);
} else if (resource->typeNamespace) {
- if (QDeclarativeMetaType::ModuleApiInstance *moduleApi = resource->typeNamespace->moduleApi()) {
+ if (QDeclarativeMetaType::ModuleApiInstance *moduleApi = resource->typeNamespace->moduleApi(resource->importNamespace)) {
if (moduleApi->scriptCallback) {
moduleApi->scriptApi = moduleApi->scriptCallback(v8engine->engine(), v8engine->engine());
moduleApi->scriptCallback = 0;
if (moduleApi->scriptCallback) {
moduleApi->scriptApi = moduleApi->scriptCallback(v8engine->engine(), v8engine->engine());
moduleApi->scriptCallback = 0;