QmlDesigner.NodeInstances: Fix supported type because of qvariant changes

Change-Id: Iec63a16218420e546e612909380dcd4f5bdb4a30
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2012-09-24 17:01:37 +02:00
parent c818858a37
commit a0f17e00e4

View File

@@ -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()));
}
}
}