Commit a0f17e00 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner.NodeInstances: Fix supported type because of qvariant changes

Change-Id: Iec63a16218420e546e612909380dcd4f5bdb4a30
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent c818858a
......@@ -964,9 +964,9 @@ InformationChangedCommand NodeInstanceServer::createAllInformationChangedCommand
return InformationChangedCommand(createInformationVector(instanceList, initial));
}
static bool supportedVariantType(QVariant::Type type)
static bool supportedVariantType(int type)
{
return type < QVariant::UserType && type != QVariant::Icon;
return type < QVariant::LastCoreType && type != QMetaType::QObjectStar;
}
ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QList<ServerNodeInstance> &instanceList) const
......@@ -976,7 +976,7 @@ ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QList<
foreach (const ServerNodeInstance &instance, instanceList) {
foreach (const QString &propertyName, instance.propertyNames()) {
QVariant propertyValue = instance.property(propertyName);
if (supportedVariantType(propertyValue.type()))
if (supportedVariantType(propertyValue.userType()))
valueVector.append(PropertyValueContainer(instance.instanceId(), propertyName, propertyValue, QString()));
}
}
......@@ -1005,8 +1005,9 @@ ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QVecto
if ( instance.isValid()) {
QVariant propertyValue = instance.property(propertyName);
if (supportedVariantType(propertyValue.type()))
if (QMetaType::isRegistered(propertyValue.userType()) && supportedVariantType(propertyValue.type())) {
valueVector.append(PropertyValueContainer(instance.instanceId(), propertyName, propertyValue, QString()));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment