Change-Id: I7360e37e34756e26f3e8936751c6b65a9d0a2167
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
#include "qv4dateobject_p.h"
#include "qv4runtime_p.h"
#include "qv4v8_p.h"
+#include "qv8variantwrapper_p.h"
/*!
\since 5.0
*/
bool QJSValue::isVariant() const
{
- // ###
- return false;
+ QV4::ExecutionEngine *e = d->engine();
+ if (!e)
+ return false;
+
+ return QV8VariantWrapper::isVariant(d->value);
}
/*!
*/
QVariant QJSValue::toVariant() const
{
- // ###
- return QVariant();
+ return QV8VariantWrapper::toVariant(d->value);
}
/*!
void destroy();
v8::Handle<v8::Object> newVariant(const QVariant &);
- bool isVariant(v8::Handle<v8::Value>);
+ static bool isVariant(v8::Handle<v8::Value>);
static QVariant toVariant(v8::Handle<v8::Object>);
static QVariant toVariant(QV8ObjectResource *);
QVariant &variantValue(v8::Handle<v8::Value>);