summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecompiler.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-05-12 07:02:14 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-05-12 07:02:14 (GMT)
commit01fbf55727678509f87523ef2ddda1d21d4ac2ab (patch)
treefc35b33603c028ecbb378c3163676bef2cd8132e /src/declarative/qml/qdeclarativecompiler.cpp
parent9a45f780a24625f8f1104a6e2442f00874ab296f (diff)
downloadQt-01fbf55727678509f87523ef2ddda1d21d4ac2ab.zip
Qt-01fbf55727678509f87523ef2ddda1d21d4ac2ab.tar.gz
Qt-01fbf55727678509f87523ef2ddda1d21d4ac2ab.tar.bz2
Correctly assign bool to variant properties
QTBUG-10623
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiler.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 6d420a7..a43b9ac 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -352,6 +352,10 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop,
instr.storeDouble.propertyIndex = prop.propertyIndex();
instr.storeDouble.value = n;
}
+ } else if(v->value.isBoolean()) {
+ instr.type = QDeclarativeInstruction::StoreVariantBool;
+ instr.storeBool.propertyIndex = prop.propertyIndex();
+ instr.storeBool.value = v->value.asBoolean();
} else {
instr.type = QDeclarativeInstruction::StoreVariant;
instr.storeString.propertyIndex = prop.propertyIndex();