diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-05-13 00:21:49 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-05-13 00:21:49 (GMT) |
commit | ec6338c0a1177eef041282fc565e70744b381099 (patch) | |
tree | 4d1c5382fcde8fa6d3582e70fd9ffff594387c34 /src | |
parent | c81865eb5875f8664e423a209778e00f4951041c (diff) | |
parent | f2b0e6ed97b962f9d6412acaa473f51ba4e23da0 (diff) | |
download | Qt-ec6338c0a1177eef041282fc565e70744b381099.zip Qt-ec6338c0a1177eef041282fc565e70744b381099.tar.gz Qt-ec6338c0a1177eef041282fc565e70744b381099.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/declarative.pro | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxlayouts.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/qml.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmlcompiler.cpp | 16 | ||||
-rw-r--r-- | src/declarative/qml/qmlcomponent.cpp | 21 | ||||
-rw-r--r-- | src/declarative/qml/qmlcontext.cpp | 8 | ||||
-rw-r--r-- | src/declarative/qml/qmlparser.cpp | 1 | ||||
-rw-r--r-- | src/declarative/qml/qmlparser_p.h | 1 | ||||
-rw-r--r-- | src/declarative/qml/qmlvme.cpp | 6 |
9 files changed, 24 insertions, 37 deletions
diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro index fac7c08..8db22b2 100644 --- a/src/declarative/declarative.pro +++ b/src/declarative/declarative.pro @@ -11,7 +11,7 @@ LIBS += -lgcov unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtXml -QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage +# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage include(../qbase.pri) diff --git a/src/declarative/fx/qfxlayouts.cpp b/src/declarative/fx/qfxlayouts.cpp index e95998b..53b367a 100644 --- a/src/declarative/fx/qfxlayouts.cpp +++ b/src/declarative/fx/qfxlayouts.cpp @@ -378,11 +378,11 @@ void QFxBaseLayout::preLayout() if (d->aut & Horizontal) setWidth(int(width)); - else + else if (itemParent()) setImplicitWidth(itemParent()->width()); if (d->aut & Vertical) setHeight(int(height)); - else + else if (itemParent()) setImplicitHeight(itemParent()->height()); setLayoutItem(0); } diff --git a/src/declarative/qml/qml.h b/src/declarative/qml/qml.h index 1c662a7..b435e94 100644 --- a/src/declarative/qml/qml.h +++ b/src/declarative/qml/qml.h @@ -106,7 +106,7 @@ QObject *qmlAttachedPropertiesObject(const QObject *obj) if (idx == -1 || !obj) return 0; - return qmlAttachedPropertiesObjectById(obj, idx); + return qmlAttachedPropertiesObjectById(idx, obj); } QML_DECLARE_TYPE(QObject); diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index a703ec3..ed520c1 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -863,9 +863,9 @@ bool QmlCompiler::compileIdProperty(QmlParser::Property *prop, QmlParser::Object *obj) { if (prop->value) - COMPILE_EXCEPTION("The 'id' property cannot be fetched"); + COMPILE_EXCEPTION2(prop,"The id property cannot be fetched"); if (prop->values.count() > 1) - COMPILE_EXCEPTION("The 'id' property cannot be multiset"); + COMPILE_EXCEPTION2(prop, "The object id may only be set once"); if (prop->values.count() == 1) { if (prop->values.at(0)->object) @@ -1018,6 +1018,7 @@ bool QmlCompiler::compileListProperty(QmlParser::Property *prop, if (assignedBinding) COMPILE_EXCEPTION("Can only assign one binding to lists"); + assignedBinding = true; compileBinding(v->value.asScript(), prop, ctxt, obj->metaObject(), v->location.start.line); v->type = Value::PropertyBinding; @@ -1305,17 +1306,6 @@ bool QmlCompiler::compileDynamicMeta(QmlParser::Object *obj) p.defaultValue->isDefault = false; COMPILE_CHECK(compileProperty(p.defaultValue, obj, 0)); } - - if (!p.onValueChanged.isEmpty()) { - QmlInstruction assign; - assign.type = QmlInstruction::AssignSignal; - assign.line = obj->location.start.line; - assign.assignSignal.signal = - output->indexForByteArray(p.name + "Changed()"); - assign.assignSignal.value = - output->indexForString(p.onValueChanged); - output->bytecode << assign; - } } return true; diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index da8f26d..24b5dd2 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -482,18 +482,19 @@ QObject *QmlComponent::beginCreate(QmlContext *context) ctxt->deactivate(); + QmlEnginePrivate *ep = d->engine->d_func(); + if (ep->rootComponent == this) { + ep->rootComponent = 0; + + d->bindValues = ep->bindValues; + d->parserStatus = ep->parserStatus; + ep->bindValues.clear(); + ep->parserStatus.clear(); + d->completePending = true; + } + if (rv) { QFx_setParent_noEvent(ctxt, rv); - QmlEnginePrivate *ep = d->engine->d_func(); - if (ep->rootComponent == this) { - ep->rootComponent = 0; - - d->bindValues = ep->bindValues; - d->parserStatus = ep->parserStatus; - ep->bindValues.clear(); - ep->parserStatus.clear(); - d->completePending = true; - } } else { delete ctxt; } diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index 91bf1c0..fa36eb1 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -85,9 +85,11 @@ void QmlContextPrivate::destroyed(QObject *obj) notifies.append(ii); } } - for (int ii = 0; ii < notifies.count(); ++ii) { - QMetaObject::activate(q, notifies[ii] + notifyIndex, 0); - } + + // ### Work around bug in shutdown + // for (int ii = 0; ii < notifies.count(); ++ii) { + // QMetaObject::activate(q, notifies[ii] + notifyIndex, 0); + // } } void QmlContextPrivate::init() diff --git a/src/declarative/qml/qmlparser.cpp b/src/declarative/qml/qmlparser.cpp index bafdb02..10eec61 100644 --- a/src/declarative/qml/qmlparser.cpp +++ b/src/declarative/qml/qmlparser.cpp @@ -109,7 +109,6 @@ QmlParser::Object::DynamicProperty::DynamicProperty(const DynamicProperty &o) : isDefaultProperty(o.isDefaultProperty), type(o.type), name(o.name), - onValueChanged(o.onValueChanged), defaultValue(o.defaultValue) { } diff --git a/src/declarative/qml/qmlparser_p.h b/src/declarative/qml/qmlparser_p.h index f25a76b..a6894fb 100644 --- a/src/declarative/qml/qmlparser_p.h +++ b/src/declarative/qml/qmlparser_p.h @@ -133,7 +133,6 @@ namespace QmlParser bool isDefaultProperty; Type type; QByteArray name; - QString onValueChanged; QmlParser::Property *defaultValue; }; struct DynamicSignal { diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index 240dcc1..a0bce0a 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -282,11 +282,7 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in } if (!stack.isEmpty()) { QObject *parent = stack.top(); - if (o->isWidgetType()) { - qobject_cast<QWidget*>(o)->setParent(qobject_cast<QWidget*>(parent)); - } else { - o->setParent(parent); - } + o->setParent(parent); } stack.push(o); } |