From de7d2d7aa3ef6595ee1f80bdd08f2d09d705302c Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 17 Mar 2014 14:22:00 +0100 Subject: [PATCH] QmlDesigner: Hotfix for older puppets Older puppets crashes if we send enumerations so we convert them before. This patch has to be reverted in master. Change-Id: Id33e776616ea6e74c7b14799e3aed130c39f8fed Hotfix: 3.1 Reviewed-by: Alessandro Portale --- .../qml/qmlpuppet/container/propertyvaluecontainer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp index 137e3af21d9..1e56b9b2d63 100644 --- a/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/propertyvaluecontainer.cpp @@ -28,6 +28,7 @@ ****************************************************************************/ #include "propertyvaluecontainer.h" +#include #include @@ -44,6 +45,8 @@ PropertyValueContainer::PropertyValueContainer(qint32 instanceId, const Property m_value(value), m_dynamicTypeName(dynamicTypeName) { + if (m_value.canConvert()) + m_value = QVariant::fromValue(value.value().nameToString()); } qint32 PropertyValueContainer::instanceId() const