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/types | |
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/types')
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 6 | ||||
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 2 | ||||
-rw-r--r-- | src/qml/types/qquickworkerscript.cpp | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 130ed291c5..708dd8dbb2 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -78,7 +78,7 @@ struct DelegateModelGroupFunction: QV4::FunctionObject static QV4::ReturnedValue construct(QV4::Managed *m, QV4::CallData *) { m->engine()->current->throwTypeError(); - return QV4::Value::undefinedValue().asReturnedValue(); + return QV4::Primitive::undefinedValue().asReturnedValue(); } static QV4::ReturnedValue call(QV4::Managed *that, QV4::CallData *callData) @@ -90,7 +90,7 @@ struct DelegateModelGroupFunction: QV4::FunctionObject if (!o) v4->current->throwTypeError(QStringLiteral("Not a valid VisualData object")); - QV4::Value v = callData->argc ? callData->args[0] : QV4::Value::undefinedValue(); + QV4::Value v = callData->argc ? callData->args[0] : QV4::Primitive::undefinedValue(); return f->code(o->item, f->flag, v); } }; @@ -3188,7 +3188,7 @@ public: if (index >= array->count()) { if (hasProperty) *hasProperty = false; - return QV4::Value::undefinedValue().asReturnedValue(); + return QV4::Primitive::undefinedValue().asReturnedValue(); } const QQmlChangeSet::Change &change = array->at(index); diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index ad23bc14d9..e16c8d819a 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -2115,7 +2115,7 @@ QQmlV4Handle QQmlListModel::get(int index) const { QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine()); QV4::Scope scope(v4); - QV4::ScopedValue result(scope, QV4::Value::undefinedValue()); + QV4::ScopedValue result(scope, QV4::Primitive::undefinedValue()); if (index >= 0 && index < count()) { diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp index c666372739..43732332c9 100644 --- a/src/qml/types/qquickworkerscript.cpp +++ b/src/qml/types/qquickworkerscript.cpp @@ -255,7 +255,7 @@ QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::WorkerEngine::sendFunction(i QV4::ScopedValue v(scope); try { QV4::ScopedCallData callData(scope, 1); - callData->args[0] = QV4::Value::fromInt32(id); + callData->args[0] = QV4::Primitive::fromInt32(id); callData->thisObject = global(); v = f->call(callData); } catch (QV4::Exception &e) { @@ -288,7 +288,7 @@ QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::method_sendMessage(QV4::Simp int id = ctx->callData->argc > 1 ? ctx->callData->args[1].toInt32() : 0; - QByteArray data = QV4::Serialize::serialize(ctx->callData->argc > 2 ? ctx->callData->args[2] : QV4::Value::undefinedValue(), engine); + QByteArray data = QV4::Serialize::serialize(ctx->callData->argc > 2 ? ctx->callData->args[2] : QV4::Primitive::undefinedValue(), engine); QMutexLocker locker(&engine->p->m_lock); WorkerScript *script = engine->p->workers.value(id); @@ -683,7 +683,7 @@ void QQuickWorkerScript::sendMessage(QQmlV4Function *args) } QV4::Scope scope(args->v4engine()); - QV4::ScopedValue argument(scope, QV4::Value::undefinedValue()); + QV4::ScopedValue argument(scope, QV4::Primitive::undefinedValue()); if (args->length() != 0) argument = (*args)[0]; |