diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-12 16:55:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-23 21:16:46 +0200 |
commit | a885d10a0289da85b8c966d2fa40fb10edae4fd7 (patch) | |
tree | 7c16b5abd88d436f6596d6a424126c1b1dd2aba8 /src/qml/jsruntime/qv4value.cpp | |
parent | 937fdde5d3b26291d417f856ee05ba479a6ba730 (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.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4value.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp index fa16662b46..e9246f7a14 100644 --- a/src/qml/jsruntime/qv4value.cpp +++ b/src/qml/jsruntime/qv4value.cpp @@ -39,9 +39,11 @@ ** ****************************************************************************/ #include <qv4engine_p.h> +#ifndef V4_BOOTSTRAP #include <qv4object_p.h> #include <qv4objectproto_p.h> #include "qv4mm_p.h" +#endif #include <wtf/MathExtras.h> @@ -87,6 +89,9 @@ double Value::toNumberImpl() const case QV4::Value::Undefined_Type: return std::numeric_limits<double>::quiet_NaN(); case QV4::Value::Managed_Type: +#ifdef V4_BOOTSTRAP + Q_UNIMPLEMENTED(); +#else if (isString()) return RuntimeHelpers::stringToNumber(stringValue()->toQString()); { @@ -95,6 +100,7 @@ double Value::toNumberImpl() const ScopedValue prim(scope, RuntimeHelpers::toPrimitive(ValueRef::fromRawValue(this), NUMBER_HINT)); return prim->toNumber(); } +#endif case QV4::Value::Null_Type: case QV4::Value::Boolean_Type: case QV4::Value::Integer_Type: @@ -104,6 +110,7 @@ double Value::toNumberImpl() const } } +#ifndef V4_BOOTSTRAP QString Value::toQStringNoThrow() const { switch (type()) { @@ -192,6 +199,7 @@ QString Value::toQString() const } } // switch } +#endif // V4_BOOTSTRAP bool Value::sameValue(Value other) const { if (val == other.val) @@ -263,6 +271,7 @@ double Primitive::toInteger(double number) return std::signbit(number) ? -v : v; } +#ifndef V4_BOOTSTRAP String *Value::toString(ExecutionEngine *e) const { return toString(e->currentContext()); @@ -282,3 +291,4 @@ Object *Value::toObject(ExecutionContext *ctx) const return RuntimeHelpers::convertToObject(ctx, ValueRef::fromRawValue(this))->getPointer(); } +#endif // V4_BOOTSTRAP |