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 <alessandro.portale@digia.com>
This commit is contained in:
Thomas Hartmann
2014-03-17 14:22:00 +01:00
parent 71da9c4ac8
commit de7d2d7aa3

View File

@@ -28,6 +28,7 @@
****************************************************************************/
#include "propertyvaluecontainer.h"
#include <enumeration.h>
#include <QtDebug>
@@ -44,6 +45,8 @@ PropertyValueContainer::PropertyValueContainer(qint32 instanceId, const Property
m_value(value),
m_dynamicTypeName(dynamicTypeName)
{
if (m_value.canConvert<Enumeration>())
m_value = QVariant::fromValue(value.value<Enumeration>().nameToString());
}
qint32 PropertyValueContainer::instanceId() const