summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcompiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlcompiler.cpp')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 5e6a8aa..8856892 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -2253,10 +2253,13 @@ bool QmlCompiler::compileAlias(QMetaObjectBuilder &builder,
data.append((const char *)&idObject->idIndex, sizeof(idObject->idIndex));
data.append((const char *)&propIdx, sizeof(propIdx));
+ const char *typeName = aliasProperty.typeName();
+ if (aliasProperty.isEnumType())
+ typeName = "int"; // Avoid introducing a dependency on the aliased metaobject
+
builder.addSignal(prop.name + "Changed()");
QMetaPropertyBuilder propBuilder =
- builder.addProperty(prop.name, aliasProperty.typeName(),
- builder.methodCount() - 1);
+ builder.addProperty(prop.name, typeName, builder.methodCount() - 1);
propBuilder.setScriptable(true);
return true;
}