diff options
Diffstat (limited to 'src/qml/jsruntime/qv4value_def_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4value_def_p.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4value_def_p.h b/src/qml/jsruntime/qv4value_def_p.h index ae176292da..188952bdd7 100644 --- a/src/qml/jsruntime/qv4value_def_p.h +++ b/src/qml/jsruntime/qv4value_def_p.h @@ -274,12 +274,6 @@ struct Q_QML_EXPORT Value } static Value emptyValue(); - static Value undefinedValue(); - static Value nullValue(); - static Value fromBoolean(Bool b); - static Value fromDouble(double d); - static Value fromInt32(int i); - static Value fromUInt32(uint i); static Value fromString(String *s); static Value fromObject(Object *o); static Value fromManaged(Managed *o); @@ -362,6 +356,19 @@ struct SafeValue : public Value Returned<T> *as(); }; +struct Primitive : public Value +{ + static Primitive fromBoolean(bool b); + static Primitive fromInt32(int i); + static Value undefinedValue(); + static Primitive nullValue(); + static Primitive fromDouble(double d); + static Primitive fromUInt32(uint i); + + inline operator ValueRef(); + Value asValue() const { return *this; } +}; + template <typename T> struct Safe : public SafeValue { |