forked from qt-creator/qt-creator
QmlDesigner.qmlPuppet: fixes a bug when dragging in a WebView on KDE
WebView object contains a QIcon property ("reload.icon"), which fails to be streamed from the puppet (client) to Qt Creator (server). The QIcon is created by a 'KIconEngine' in the KDE case. which isn't found on the QtCreator side. This leads operator>> in qicon.cpp to not read anything from the buffer at all ... leading to all following properties being invalid, since read from the wrong bytes in the stream. Solution: Since QIcon leads to problems and we have no current use case for a QIcon property in Bauhaus we just ignore properties of type QIcon. Reviewed-by: Marco Bubke Task-number: QTCREATORBUG-4596
This commit is contained in:
@@ -865,6 +865,11 @@ InformationChangedCommand NodeInstanceServer::createAllInformationChangedCommand
|
|||||||
return InformationChangedCommand(informationVector);
|
return InformationChangedCommand(informationVector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool supportedVariantType(QVariant::Type type)
|
||||||
|
{
|
||||||
|
return type < QVariant::UserType && type != QVariant::Icon;
|
||||||
|
}
|
||||||
|
|
||||||
ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QList<ServerNodeInstance> &instanceList) const
|
ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QList<ServerNodeInstance> &instanceList) const
|
||||||
{
|
{
|
||||||
QVector<PropertyValueContainer> valueVector;
|
QVector<PropertyValueContainer> valueVector;
|
||||||
@@ -872,7 +877,7 @@ ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QList<
|
|||||||
foreach(const ServerNodeInstance &instance, instanceList) {
|
foreach(const ServerNodeInstance &instance, instanceList) {
|
||||||
foreach(const QString &propertyName, instance.propertyNames()) {
|
foreach(const QString &propertyName, instance.propertyNames()) {
|
||||||
QVariant propertyValue = instance.property(propertyName);
|
QVariant propertyValue = instance.property(propertyName);
|
||||||
if (propertyValue.type() < QVariant::UserType)
|
if (supportedVariantType(propertyValue.type()))
|
||||||
valueVector.append(PropertyValueContainer(instance.instanceId(), propertyName, propertyValue, QString()));
|
valueVector.append(PropertyValueContainer(instance.instanceId(), propertyName, propertyValue, QString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -901,7 +906,7 @@ ValuesChangedCommand NodeInstanceServer::createValuesChangedCommand(const QVecto
|
|||||||
|
|
||||||
if( instance.isValid()) {
|
if( instance.isValid()) {
|
||||||
QVariant propertyValue = instance.property(propertyName);
|
QVariant propertyValue = instance.property(propertyName);
|
||||||
if (propertyValue.type() < QVariant::UserType)
|
if (supportedVariantType(propertyValue.type()))
|
||||||
valueVector.append(PropertyValueContainer(instance.instanceId(), propertyName, propertyValue, QString()));
|
valueVector.append(PropertyValueContainer(instance.instanceId(), propertyName, propertyValue, QString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user