aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-09-11 11:07:32 +0200
committerLars Knoll <lars.knoll@qt.io>2018-09-17 07:47:09 +0000
commit1dac47c1418b44cf4a56b42bfca2b277795fd213 (patch)
tree26727943c30628340662a66d7cbe9f52d75c5b58 /src/qml/qml/qqmlcomponent.cpp
parentd89d5cffe79bd060a1b04a2c47a3d728bffbe195 (diff)
Cleanups in Value/Primitive
Get rid of Primitive and move the corresponding methods directly into Value. Mark many methods in Value as constexpr and turn Value into a POD type again. Keep Primitive as a pure alias to Value for source compatibility of other modules that might be using it. Change-Id: Icb47458947dd3482c8852e95782123ea4346f5ec Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 45b0f18530..6dc8dd0ce7 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1271,7 +1271,7 @@ void QQmlComponent::createObject(QQmlV4Function *args)
QObject *parent = nullptr;
QV4::ExecutionEngine *v4 = args->v4engine();
QV4::Scope scope(v4);
- QV4::ScopedValue valuemap(scope, QV4::Primitive::undefinedValue());
+ QV4::ScopedValue valuemap(scope, QV4::Value::undefinedValue());
if (args->length() >= 1) {
QV4::Scoped<QV4::QObjectWrapper> qobjectWrapper(scope, (*args)[0]);
@@ -1386,7 +1386,7 @@ void QQmlComponent::incubateObject(QQmlV4Function *args)
QV4::Scope scope(v4);
QObject *parent = nullptr;
- QV4::ScopedValue valuemap(scope, QV4::Primitive::undefinedValue());
+ QV4::ScopedValue valuemap(scope, QV4::Value::undefinedValue());
QQmlIncubator::IncubationMode mode = QQmlIncubator::Asynchronous;
if (args->length() >= 1) {
@@ -1524,8 +1524,8 @@ QQmlComponentExtension::~QQmlComponentExtension()
void QV4::Heap::QmlIncubatorObject::init(QQmlIncubator::IncubationMode m)
{
Object::init();
- valuemap.set(internalClass->engine, QV4::Primitive::undefinedValue());
- statusChanged.set(internalClass->engine, QV4::Primitive::undefinedValue());
+ valuemap.set(internalClass->engine, QV4::Value::undefinedValue());
+ statusChanged.set(internalClass->engine, QV4::Value::undefinedValue());
parent.init();
qmlContext.set(internalClass->engine, nullptr);
incubator = new QQmlComponentIncubator(this, m);
@@ -1566,7 +1566,7 @@ void QV4::QmlIncubatorObject::statusChanged(QQmlIncubator::Status s)
if (f) {
QV4::JSCallData jsCallData(scope, 1);
*jsCallData->thisObject = this;
- jsCallData->args[0] = QV4::Primitive::fromUInt32(s);
+ jsCallData->args[0] = QV4::Value::fromUInt32(s);
f->call(jsCallData);
if (scope.hasException()) {
QQmlError error = scope.engine->catchExceptionAsQmlError();