From a885d10a0289da85b8c966d2fa40fb10edae4fd7 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 12 Mar 2014 16:55:06 +0100 Subject: Extend the QML bootstrap library by the IR builders This is among other things needed to fix the qml import scanner to detect dependencies from .js files correctly. The patch also fixes the use of Q_QML_EXPORT towards Q_QML_PRIVATE_EXPORT where appropriate and corrects the wrong include path for the double conversion code to actually be relative to the file it is included from. This worked by accident because of other include paths present in the build. Change-Id: I338583dad2f76300819af8ab0dae8e5724c84430 Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4value_inl_p.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/qml/jsruntime/qv4value_inl_p.h') diff --git a/src/qml/jsruntime/qv4value_inl_p.h b/src/qml/jsruntime/qv4value_inl_p.h index 35508f442a..1fe9e1c165 100644 --- a/src/qml/jsruntime/qv4value_inl_p.h +++ b/src/qml/jsruntime/qv4value_inl_p.h @@ -180,14 +180,19 @@ inline bool Value::toBoolean() const case Value::Integer_Type: return (bool)int_32; case Value::Managed_Type: +#ifdef V4_BOOTSTRAP + Q_UNIMPLEMENTED(); +#else if (isString()) return stringValue()->toQString().length() > 0; +#endif return true; default: // double return doubleValue() && !std::isnan(doubleValue()); } } +#ifndef V4_BOOTSTRAP inline uint Value::asArrayIndex() const { #if QT_POINTER_SIZE == 8 @@ -278,6 +283,8 @@ inline ErrorObject *Value::asErrorObject() const template inline T *Value::as() const { Managed *m = isObject() ? managed() : 0; return m ? m->as() : 0; } +#endif + } // namespace QV4 QT_END_NAMESPACE -- cgit v1.2.3