diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-12 07:02:14 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-12 07:02:14 (GMT) |
commit | 01fbf55727678509f87523ef2ddda1d21d4ac2ab (patch) | |
tree | fc35b33603c028ecbb378c3163676bef2cd8132e /src/declarative/qml/qdeclarativecompiler.cpp | |
parent | 9a45f780a24625f8f1104a6e2442f00874ab296f (diff) | |
download | Qt-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.cpp | 4 |
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(); |