aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-01-31 12:18:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-03 14:38:03 +0100
commitfd52557b1f20a0464bb4b594d0e5897fa44e723b (patch)
tree55d522d4738e12439871458251d3a05216ee0d89 /src/qml/qml/qqmlobjectcreator.cpp
parent043acc2332056d087966d5723b26b0fa610d1375 (diff)
[new compiler] Try to resolve qualified enums at type compile time
... by taking some code from the old compiler. This speeds up some bindings and maintains compatibility. Change-Id: If80b1e28214cb655f70fff01a8c885edcb2d3030 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index e910b8d766..3530692c50 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -185,7 +185,7 @@ void QmlObjectCreator::setPropertyValue(QQmlPropertyData *property, const QV4::C
QV4::Scope scope(v4);
// ### This should be resolved earlier at compile time and the binding value should be changed accordingly.
- if (property->isEnum()) {
+ if (property->isEnum() && !(binding->flags & QV4::CompiledData::Binding::IsResolvedEnum)) {
QVariant value = binding->valueAsString(&qmlUnit->header);
bool ok = QQmlPropertyPrivate::write(_qobject, *property, value, context);
Q_ASSERT(ok);