aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsapi')
-rw-r--r--src/qml/jsapi/qjsengine.cpp18
-rw-r--r--src/qml/jsapi/qjsvalue.cpp4
2 files changed, 11 insertions, 11 deletions
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index f96414ea3f..4aa7c4b45d 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -726,16 +726,16 @@ bool QJSEngine::convertV2(const QJSValue &value, int type, void *ptr)
double d = QV4::RuntimeHelpers::stringToNumber(string);
switch (type) {
case QMetaType::Int:
- *reinterpret_cast<int*>(ptr) = QV4::Primitive::toInt32(d);
+ *reinterpret_cast<int*>(ptr) = QV4::Value::toInt32(d);
return true;
case QMetaType::UInt:
- *reinterpret_cast<uint*>(ptr) = QV4::Primitive::toUInt32(d);
+ *reinterpret_cast<uint*>(ptr) = QV4::Value::toUInt32(d);
return true;
case QMetaType::LongLong:
- *reinterpret_cast<qlonglong*>(ptr) = QV4::Primitive::toInteger(d);
+ *reinterpret_cast<qlonglong*>(ptr) = QV4::Value::toInteger(d);
return true;
case QMetaType::ULongLong:
- *reinterpret_cast<qulonglong*>(ptr) = QV4::Primitive::toInteger(d);
+ *reinterpret_cast<qulonglong*>(ptr) = QV4::Value::toInteger(d);
return true;
case QMetaType::Double:
*reinterpret_cast<double*>(ptr) = d;
@@ -744,19 +744,19 @@ bool QJSEngine::convertV2(const QJSValue &value, int type, void *ptr)
*reinterpret_cast<float*>(ptr) = d;
return true;
case QMetaType::Short:
- *reinterpret_cast<short*>(ptr) = QV4::Primitive::toInt32(d);
+ *reinterpret_cast<short*>(ptr) = QV4::Value::toInt32(d);
return true;
case QMetaType::UShort:
- *reinterpret_cast<unsigned short*>(ptr) = QV4::Primitive::toUInt32(d);
+ *reinterpret_cast<unsigned short*>(ptr) = QV4::Value::toUInt32(d);
return true;
case QMetaType::Char:
- *reinterpret_cast<char*>(ptr) = QV4::Primitive::toInt32(d);
+ *reinterpret_cast<char*>(ptr) = QV4::Value::toInt32(d);
return true;
case QMetaType::UChar:
- *reinterpret_cast<unsigned char*>(ptr) = QV4::Primitive::toUInt32(d);
+ *reinterpret_cast<unsigned char*>(ptr) = QV4::Value::toUInt32(d);
return true;
case QMetaType::QChar:
- *reinterpret_cast<QChar*>(ptr) = QV4::Primitive::toUInt32(d);
+ *reinterpret_cast<QChar*>(ptr) = QV4::Value::toUInt32(d);
return true;
default:
return false;
diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp
index bf8000bdd8..9671e82187 100644
--- a/src/qml/jsapi/qjsvalue.cpp
+++ b/src/qml/jsapi/qjsvalue.cpp
@@ -569,7 +569,7 @@ qint32 QJSValue::toInt() const
if (!val) {
QVariant *variant = QJSValuePrivate::getVariant(this);
if (variant->userType() == QMetaType::QString)
- return QV4::Primitive::toInt32(RuntimeHelpers::stringToNumber(variant->toString()));
+ return QV4::Value::toInt32(RuntimeHelpers::stringToNumber(variant->toString()));
else
return variant->toInt();
}
@@ -603,7 +603,7 @@ quint32 QJSValue::toUInt() const
if (!val) {
QVariant *variant = QJSValuePrivate::getVariant(this);
if (variant->userType() == QMetaType::QString)
- return QV4::Primitive::toUInt32(RuntimeHelpers::stringToNumber(variant->toString()));
+ return QV4::Value::toUInt32(RuntimeHelpers::stringToNumber(variant->toString()));
else
return variant->toUInt();
}