diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-06-10 15:10:02 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-10 15:45:29 +0200 |
commit | 9969d6f3099bd0fc19668754a5d54c740c5e7fd8 (patch) | |
tree | 996957c94dcce034ed35b94c77ecba5af6d8a370 /src/quick/items/qquickdroparea.cpp | |
parent | edfc60f0497b7339a4776b10e2862e106c35f28b (diff) |
Remove two more places where we used v8
Change Value::isInt32() to convert to an integer if possible.
Use this to avoid casting doubles to ints twice. usage of
v8::Value::IsInt32() in two places.
Change-Id: I5b9d8be7d90b461c11440bf54660ceef7e8f0f1b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/quick/items/qquickdroparea.cpp')
-rw-r--r-- | src/quick/items/qquickdroparea.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/items/qquickdroparea.cpp b/src/quick/items/qquickdroparea.cpp index 3b8f02db8c..f930835bee 100644 --- a/src/quick/items/qquickdroparea.cpp +++ b/src/quick/items/qquickdroparea.cpp @@ -421,9 +421,9 @@ void QQuickDropEvent::accept(QQmlV4Function *args) Qt::DropAction action = event->dropAction(); if (args->length() >= 1) { - v8::Handle<v8::Value> v = (*args)[0]; - if (v->IsInt32()) - action = Qt::DropAction(v->Int32Value()); + QV4::Value v = (*args)[0]; + if (v.isInt32()) + action = Qt::DropAction(v.integerValue()); } // get action from arguments. event->setDropAction(action); |