forked from qt-creator/qt-creator
Add check for correct color string in Qml.
This commit is contained in:
@@ -326,6 +326,10 @@ const Value *QmlObjectValue::propertyValue(const QMetaProperty &prop) const
|
||||
value = object;
|
||||
} break;
|
||||
|
||||
case QMetaType::QColor: {
|
||||
value = engine()->colorValue();
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
} // end of switch
|
||||
@@ -610,6 +614,10 @@ void ValueVisitor::visit(const EasingCurveNameValue *)
|
||||
{
|
||||
}
|
||||
|
||||
void ValueVisitor::visit(const ColorValue *)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Value
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -671,6 +679,11 @@ const EasingCurveNameValue *Value::asEasingCurveNameValue() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
const ColorValue *Value::asColorValue() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Values
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -977,6 +990,16 @@ const EasingCurveNameValue *EasingCurveNameValue::asEasingCurveNameValue() const
|
||||
return this;
|
||||
}
|
||||
|
||||
void ColorValue::accept(ValueVisitor *visitor) const
|
||||
{
|
||||
visitor->visit(this);
|
||||
}
|
||||
|
||||
const ColorValue *ColorValue::asColorValue() const
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
MemberProcessor::MemberProcessor()
|
||||
{
|
||||
}
|
||||
@@ -1621,6 +1644,11 @@ const EasingCurveNameValue *Engine::easingCurveNameValue() const
|
||||
return &_easingCurveNameValue;
|
||||
}
|
||||
|
||||
const ColorValue *Engine::colorValue() const
|
||||
{
|
||||
return &_colorValue;
|
||||
}
|
||||
|
||||
const Value *Engine::newArray()
|
||||
{
|
||||
return arrayCtor()->construct();
|
||||
|
Reference in New Issue
Block a user