forked from qt-creator/qt-creator
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:
@@ -28,6 +28,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "propertyvaluecontainer.h"
|
#include "propertyvaluecontainer.h"
|
||||||
|
#include <enumeration.h>
|
||||||
|
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
@@ -44,6 +45,8 @@ PropertyValueContainer::PropertyValueContainer(qint32 instanceId, const Property
|
|||||||
m_value(value),
|
m_value(value),
|
||||||
m_dynamicTypeName(dynamicTypeName)
|
m_dynamicTypeName(dynamicTypeName)
|
||||||
{
|
{
|
||||||
|
if (m_value.canConvert<Enumeration>())
|
||||||
|
m_value = QVariant::fromValue(value.value<Enumeration>().nameToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32 PropertyValueContainer::instanceId() const
|
qint32 PropertyValueContainer::instanceId() const
|
||||||
|
|||||||
Reference in New Issue
Block a user