summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-06-17 00:46:00 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-06-17 00:46:00 (GMT)
commita7a33c7ec0b6fff8822482c814d04b0d9735e85c (patch)
treee4e50059e200a518356b3b5851fd92bb7d853908 /src/declarative/qml
parent146171c3a393b18a0345d36461c2f276d39b980f (diff)
parent6f4779a7ac3dcfca23124f20bba6ab650e4a8a04 (diff)
downloadQt-a7a33c7ec0b6fff8822482c814d04b0d9735e85c.zip
Qt-a7a33c7ec0b6fff8822482c814d04b0d9735e85c.tar.gz
Qt-a7a33c7ec0b6fff8822482c814d04b0d9735e85c.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp2
-rw-r--r--src/declarative/qml/qmlvme.cpp12
2 files changed, 13 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index 6c2e3e0..fb7492d 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -628,6 +628,8 @@ bool ProcessAST::visit(AST::UiScriptBinding *node)
node->statement);
}
+ prop->location.range.length = prop->location.range.offset + prop->location.range.length - node->qualifiedId->identifierToken.offset;
+ prop->location.range.offset = node->qualifiedId->identifierToken.offset;
Value *v = new Value;
v->value = primitive;
v->location = location(node->statement->firstSourceLocation(),
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index ccf12b0..be09190 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -193,7 +193,17 @@ QObject *QmlVME::run(QStack<QObject *> &stack, QmlContext *ctxt, QmlCompiledComp
}
if (!stack.isEmpty()) {
QObject *parent = stack.top();
- o->setParent(parent);
+ if (o->isWidgetType()) {
+ QWidget *widget = static_cast<QWidget*>(o);
+ if (parent->isWidgetType()) {
+ QWidget *parentWidget = static_cast<QWidget*>(parent);
+ widget->setParent(parentWidget);
+ } else {
+ // TODO: parent might be a layout
+ }
+ } else {
+ o->setParent(parent);
+ }
}
stack.push(o);
}