From: Thomas Hartmann Date: Wed, 22 Dec 2010 16:35:20 +0000 (+0100) Subject: QmlDesigner.propertyEditor: read gradient data from model X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d96356334e4a83dd81cdfd1d9b6a18f86cb36619;p=qt-creator-jp%2Fqt-creator-jp.git QmlDesigner.propertyEditor: read gradient data from model We are reading gradient data from the model instead of the instances now. This avoids problems with asynchronous implementation and is feature wise the same. --- diff --git a/src/plugins/qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp b/src/plugins/qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp index 1fa1714d77..09403f77b0 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp @@ -61,8 +61,8 @@ void GradientLineQmlAdaptor::setupGradient() foreach (const ModelNode &stopNode, stopList) { QmlObjectNode stopObjectNode = stopNode; if (stopObjectNode.isValid()) { - qreal position = stopObjectNode.instanceValue("position").toReal(); - QColor color = stopObjectNode.instanceValue("color").value(); + qreal position = stopNode.variantProperty("position").value().toReal(); + QColor color = stopNode.variantProperty("color").value().value(); stops.append( QPair(position, color)); } }