From d96356334e4a83dd81cdfd1d9b6a18f86cb36619 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 22 Dec 2010 17:35:20 +0100 Subject: [PATCH] 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. --- .../qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); } } -- 2.11.0