aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4value_inl_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4value_inl_p.h')
-rw-r--r--src/qml/jsruntime/qv4value_inl_p.h7
1 files changed, 7 insertions, 0 deletions
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<typename T>
inline T *Value::as() const { Managed *m = isObject() ? managed() : 0; return m ? m->as<T>() : 0; }
+#endif
+
} // namespace QV4
QT_END_NAMESPACE