Fix merge errors introduced while rebasing.
authorRoberto Raggi <roberto.raggi@nokia.com>
Mon, 29 Aug 2011 09:52:17 +0000 (11:52 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 30 Aug 2011 11:18:28 +0000 (13:18 +0200)
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>
src/declarative/qml/qdeclarativecompiler.cpp
src/declarative/qml/qdeclarativemetatype.cpp
src/declarative/qml/qdeclarativescript.cpp
src/declarative/qml/v8/qv8typewrapper.cpp

index 4198e8c..79094b7 100644 (file)
@@ -476,7 +476,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr
             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:
@@ -3033,8 +3033,14 @@ bool QDeclarativeCompiler::compileAlias(QFastMetaBuilder &builder,
     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,
                         propIndex);
 
     return true;
                         propIndex);
 
     return true;
index 3bf04b3..5947a9a 100644 (file)
@@ -968,20 +968,6 @@ int QDeclarativePrivate::qmlregister(RegistrationType type, void *data)
     return -1;
 }
 
     return -1;
 }
 
-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.
 */
index e83e402..55a6b2b 100644 (file)
@@ -970,7 +970,7 @@ bool ProcessAST::visit(AST::UiPublicMember *node)
             index++;
         }
 
             index++;
         }
 
-        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;
index 6bd9a54..dc99cbb 100644 (file)
@@ -228,7 +228,7 @@ v8::Handle<v8::Value> QV8TypeWrapper::Setter(v8::Local<v8::String> property,
             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;