aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-05-08 16:22:39 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-05-08 19:57:01 +0200
commit995d65f3f4f348757363ba2a3a3c3444aa281b4e (patch)
treecae5c176847609abc33f51c065aa38b38cd6b9b9 /src/quick/items/qquickitem.cpp
parent2b0d3bf812273e762e7aa27a58909ade59590c0f (diff)
Cleanup v8 dependencies from QQmlV8Function
... and rename it to QQmlV4Function Change-Id: Iad72347babf62691e26306877d4f229fda127eb7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r--src/quick/items/qquickitem.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 43328c3f96..10bdbe30ac 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -3751,9 +3751,9 @@ void QQuickItem::polish()
/*!
\internal
*/
-void QQuickItem::mapFromItem(QQmlV8Function *args) const
+void QQuickItem::mapFromItem(QQmlV4Function *args) const
{
- if (args->Length() != 0) {
+ if (args->length() != 0) {
v8::Handle<v8::Value> item = (*args)[0];
QV8Engine *engine = args->engine();
@@ -3768,14 +3768,14 @@ void QQuickItem::mapFromItem(QQmlV8Function *args) const
}
v8::Handle<v8::Object> rv = v8::Object::New();
- args->returnValue(rv);
+ args->setReturnValue(rv->v4Value());
- qreal x = (args->Length() > 1)?(*args)[1]->NumberValue():0;
- qreal y = (args->Length() > 2)?(*args)[2]->NumberValue():0;
+ qreal x = (args->length() > 1) ? (*args)[1].asDouble() : 0;
+ qreal y = (args->length() > 2) ? (*args)[2].asDouble() : 0;
- if (args->Length() > 3) {
- qreal w = (*args)[3]->NumberValue();
- qreal h = (args->Length() > 4)?(*args)[4]->NumberValue():0;
+ if (args->length() > 3) {
+ qreal w = (*args)[3].asDouble();
+ qreal h = (args->length() > 4) ? (*args)[4].asDouble() : 0;
QRectF r = mapRectFromItem(itemObj, QRectF(x, y, w, h));
@@ -3823,9 +3823,9 @@ QTransform QQuickItem::itemTransform(QQuickItem *other, bool *ok) const
/*!
\internal
*/
-void QQuickItem::mapToItem(QQmlV8Function *args) const
+void QQuickItem::mapToItem(QQmlV4Function *args) const
{
- if (args->Length() != 0) {
+ if (args->length() != 0) {
v8::Handle<v8::Value> item = (*args)[0];
QV8Engine *engine = args->engine();
@@ -3840,14 +3840,14 @@ void QQuickItem::mapToItem(QQmlV8Function *args) const
}
v8::Handle<v8::Object> rv = v8::Object::New();
- args->returnValue(rv);
+ args->setReturnValue(rv->v4Value());
- qreal x = (args->Length() > 1)?(*args)[1]->NumberValue():0;
- qreal y = (args->Length() > 2)?(*args)[2]->NumberValue():0;
+ qreal x = (args->length() > 1) ? (*args)[1].asDouble() : 0;
+ qreal y = (args->length() > 2) ? (*args)[2].asDouble() : 0;
- if (args->Length() > 3) {
- qreal w = (*args)[3]->NumberValue();
- qreal h = (args->Length() > 4)?(*args)[4]->NumberValue():0;
+ if (args->length() > 3) {
+ qreal w = (*args)[3].asDouble();
+ qreal h = (args->length() > 4) ? (*args)[4].asDouble() : 0;
QRectF r = mapRectToItem(itemObj, QRectF(x, y, w, h));