Commit e8565890 authored by Christian Kamm's avatar Christian Kamm
Browse files

Teach QmlJS editor about QVector2D and QVector3D.

Used, for instance, in Rotation.axis or Rotation.origin.
parent 30763039
......@@ -296,7 +296,8 @@ const Value *QmlObjectValue::propertyValue(const QMetaProperty &prop) const
} break;
case QMetaType::QPoint:
case QMetaType::QPointF: {
case QMetaType::QPointF:
case QMetaType::QVector2D: {
// ### cache
ObjectValue *object = engine()->newObject(/*prototype =*/ 0);
object->setProperty("x", engine()->numberValue());
......@@ -315,6 +316,15 @@ const Value *QmlObjectValue::propertyValue(const QMetaProperty &prop) const
value = object;
} break;
case QMetaType::QVector3D: {
// ### cache
ObjectValue *object = engine()->newObject(/*prototype =*/ 0);
object->setProperty("x", engine()->numberValue());
object->setProperty("y", engine()->numberValue());
object->setProperty("z", engine()->numberValue());
value = object;
} break;
default:
break;
} // end of switch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment