summaryrefslogtreecommitdiffstats
path: root/src/script/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/bridge')
-rw-r--r--src/script/bridge/qscriptactivationobject.cpp2
-rw-r--r--src/script/bridge/qscriptclassobject.cpp6
-rw-r--r--src/script/bridge/qscriptqobject.cpp10
-rw-r--r--src/script/bridge/qscriptstaticscopeobject.cpp2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/script/bridge/qscriptactivationobject.cpp b/src/script/bridge/qscriptactivationobject.cpp
index 6a8ae56..85224d1 100644
--- a/src/script/bridge/qscriptactivationobject.cpp
+++ b/src/script/bridge/qscriptactivationobject.cpp
@@ -53,7 +53,7 @@ QScriptActivationObject::QScriptActivationObject(JSC::ExecState *callFrame, JSC:
QScriptActivationObject::~QScriptActivationObject()
{
- delete d;
+ delete d_ptr();
}
bool QScriptActivationObject::getOwnPropertySlot(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::PropertySlot& slot)
diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp
index dd229f1..28f7bd1 100644
--- a/src/script/bridge/qscriptclassobject.cpp
+++ b/src/script/bridge/qscriptclassobject.cpp
@@ -211,7 +211,7 @@ JSC::JSValue JSC_HOST_CALL ClassObjectDelegate::call(JSC::ExecState *exec, JSC::
eng_p->pushContext(exec, thisValue, args, callee);
QScriptContext *ctx = eng_p->contextForFrame(eng_p->currentFrame);
QScriptValue scriptObject = eng_p->scriptValueFromJSCValue(obj);
- QVariant result = scriptClass->extension(QScriptClass::Callable, qVariantFromValue(ctx));
+ QVariant result = scriptClass->extension(QScriptClass::Callable, QVariant::fromValue(ctx));
eng_p->popContext();
eng_p->currentFrame = oldFrame;
return QScriptEnginePrivate::jscValueFromVariant(exec, result);
@@ -239,7 +239,7 @@ JSC::JSObject* ClassObjectDelegate::construct(JSC::ExecState *exec, JSC::JSObjec
QScriptContext *ctx = eng_p->contextForFrame(eng_p->currentFrame);
QScriptValue defaultObject = ctx->thisObject();
- QScriptValue result = qvariant_cast<QScriptValue>(scriptClass->extension(QScriptClass::Callable, qVariantFromValue(ctx)));
+ QScriptValue result = qvariant_cast<QScriptValue>(scriptClass->extension(QScriptClass::Callable, QVariant::fromValue(ctx)));
if (!result.isObject())
result = defaultObject;
eng_p->popContext();
@@ -256,7 +256,7 @@ bool ClassObjectDelegate::hasInstance(QScriptObject* object, JSC::ExecState *exe
QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec);
QScript::SaveFrameHelper saveFrame(eng_p, exec);
args << eng_p->scriptValueFromJSCValue(object) << eng_p->scriptValueFromJSCValue(value);
- QVariant result = scriptClass()->extension(QScriptClass::HasInstance, qVariantFromValue(args));
+ QVariant result = scriptClass()->extension(QScriptClass::HasInstance, QVariant::fromValue(args));
return result.toBool();
}
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index 5e4f097..d24f2fe 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -664,7 +664,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
if (actual.isNumber()) {
int ival = QScriptEnginePrivate::toInt32(exec, actual);
if (m.valueToKey(ival) != 0) {
- qVariantSetValue(v, ival);
+ v.setValue(ival);
converted = true;
matchDistance += 10;
}
@@ -672,7 +672,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
JSC::UString sval = QScriptEnginePrivate::toString(exec, actual);
int ival = m.keyToValue(convertToLatin1(sval));
if (ival != -1) {
- qVariantSetValue(v, ival);
+ v.setValue(ival);
converted = true;
matchDistance += 10;
}
@@ -1668,7 +1668,7 @@ static JSC::JSValue JSC_HOST_CALL qobjectProtoFuncFindChild(JSC::ExecState *exec
QString name;
if (args.size() != 0)
name = args.at(0).toString(exec);
- QObject *child = qFindChild<QObject*>(obj, name);
+ QObject *child = obj->findChild<QObject*>(name);
QScriptEngine::QObjectWrapOptions opt = QScriptEngine::PreferExistingWrapperObject;
return engine->newQObject(child, QScriptEngine::QtOwnership, opt);
}
@@ -1709,10 +1709,10 @@ static JSC::JSValue JSC_HOST_CALL qobjectProtoFuncFindChildren(JSC::ExecState *e
}
} else {
const QString name(args.at(0).toString(exec));
- children = qFindChildren<QObject*>(obj, name);
+ children = obj->findChildren<QObject*>(name);
}
} else {
- children = qFindChildren<QObject*>(obj, QString());
+ children = obj->findChildren<QObject*>(QString());
}
// create the result array with the children
const int length = children.size();
diff --git a/src/script/bridge/qscriptstaticscopeobject.cpp b/src/script/bridge/qscriptstaticscopeobject.cpp
index 44548a4..940c859 100644
--- a/src/script/bridge/qscriptstaticscopeobject.cpp
+++ b/src/script/bridge/qscriptstaticscopeobject.cpp
@@ -87,7 +87,7 @@ QScriptStaticScopeObject::QScriptStaticScopeObject(WTF::NonNullPassRefPtr<JSC::S
QScriptStaticScopeObject::~QScriptStaticScopeObject()
{
- delete d;
+ delete d_ptr();
}
bool QScriptStaticScopeObject::getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot& slot)