aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4value_inl_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-03-12 16:55:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-23 21:16:46 +0200
commita885d10a0289da85b8c966d2fa40fb10edae4fd7 (patch)
tree7c16b5abd88d436f6596d6a424126c1b1dd2aba8 /src/qml/jsruntime/qv4value_inl_p.h
parent937fdde5d3b26291d417f856ee05ba479a6ba730 (diff)
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 <lars.knoll@digia.com>
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