diff options
| author | Lars Knoll <lars.knoll@digia.com> | 2013-09-25 12:24:36 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-28 13:33:24 +0200 |
| commit | cf2a253f2f60c9f0c61682527d80143e72b355d4 (patch) | |
| tree | d60e8be50437e6f15513e25155817b902a2062c7 /src/qml/jsruntime/qv4mathobject.cpp | |
| parent | 7872b380063d0497ba62fecfdc92148f1ea947af (diff) | |
Move Value::fromBool, ... to a new Primitive class
This will simplify finding the remaining direct usages of
QV4::Value that need fixing.
Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4mathobject.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4mathobject.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4mathobject.cpp b/src/qml/jsruntime/qv4mathobject.cpp index 57a84d008a..fcff9e4aca 100644 --- a/src/qml/jsruntime/qv4mathobject.cpp +++ b/src/qml/jsruntime/qv4mathobject.cpp @@ -55,14 +55,14 @@ MathObject::MathObject(ExecutionEngine *engine) { type = Type_MathObject; - defineReadonlyProperty(QStringLiteral("E"), Value::fromDouble(::exp(1.0))); - defineReadonlyProperty(QStringLiteral("LN2"), Value::fromDouble(::log(2.0))); - defineReadonlyProperty(QStringLiteral("LN10"), Value::fromDouble(::log(10.0))); - defineReadonlyProperty(QStringLiteral("LOG2E"), Value::fromDouble(1.0/::log(2.0))); - defineReadonlyProperty(QStringLiteral("LOG10E"), Value::fromDouble(1.0/::log(10.0))); - defineReadonlyProperty(QStringLiteral("PI"), Value::fromDouble(qt_PI)); - defineReadonlyProperty(QStringLiteral("SQRT1_2"), Value::fromDouble(::sqrt(0.5))); - defineReadonlyProperty(QStringLiteral("SQRT2"), Value::fromDouble(::sqrt(2.0))); + defineReadonlyProperty(QStringLiteral("E"), Primitive::fromDouble(::exp(1.0))); + defineReadonlyProperty(QStringLiteral("LN2"), Primitive::fromDouble(::log(2.0))); + defineReadonlyProperty(QStringLiteral("LN10"), Primitive::fromDouble(::log(10.0))); + defineReadonlyProperty(QStringLiteral("LOG2E"), Primitive::fromDouble(1.0/::log(2.0))); + defineReadonlyProperty(QStringLiteral("LOG10E"), Primitive::fromDouble(1.0/::log(10.0))); + defineReadonlyProperty(QStringLiteral("PI"), Primitive::fromDouble(qt_PI)); + defineReadonlyProperty(QStringLiteral("SQRT1_2"), Primitive::fromDouble(::sqrt(0.5))); + defineReadonlyProperty(QStringLiteral("SQRT2"), Primitive::fromDouble(::sqrt(2.0))); defineDefaultProperty(QStringLiteral("abs"), method_abs, 1); defineDefaultProperty(QStringLiteral("acos"), method_acos, 1); |
