From f73e294472906077556e13ca10df185300c2450f Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 10 Jan 2022 16:53:05 +0100 Subject: Remove the qml_sequence_object feature flag QML sequences are required for named lists of value types. The original reason for the introduction of this feature was the template code explosion caused by the way the sequence types were registered in Qt5. As we register them differently now, the code size overhead should be smaller. It makes very little sense to switch sequence types off these days. [ChangeLog][QtQml][Important Behavior Changes] The qml_sequence_object feature flag has been removed. Omitting sequences from the QML language does not make much sense now that we use them for lists of value types. The original reason to allow it was that the sequence support took up a lot of space in the binary. This is not the case anymore since 6.0. Change-Id: I2f1d43cdd29ba63853316b06113cb49ed30aa410 Reviewed-by: Joerg Bornemann Reviewed-by: Fabian Kosmale --- src/qmlworkerscript/qv4serialize.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/qmlworkerscript/qv4serialize.cpp') diff --git a/src/qmlworkerscript/qv4serialize.cpp b/src/qmlworkerscript/qv4serialize.cpp index 39adaa715b..126ebe5e41 100644 --- a/src/qmlworkerscript/qv4serialize.cpp +++ b/src/qmlworkerscript/qv4serialize.cpp @@ -42,9 +42,7 @@ #include #include #include -#if QT_CONFIG(qml_sequence_object) #include -#endif #include #include @@ -82,9 +80,7 @@ enum Type { WorkerRegexp, WorkerListModel, WorkerUrl, -#if QT_CONFIG(qml_sequence_object) WorkerSequence -#endif }; static inline quint32 valueheader(Type type, quint32 size = 0) @@ -245,7 +241,6 @@ void Serialize::serialize(QByteArray &data, const QV4::Value &v, ExecutionEngine // No other QObject's are allowed to be sent push(data, valueheader(WorkerUndefined)); } else if (const Object *o = v.as()) { -#if QT_CONFIG(qml_sequence_object) if (o->isListType()) { // valid sequence. we generate a length (sequence length + 1 for the sequence type) uint seqLength = ScopedValue(scope, o->get(engine->id_length()))->toUInt32(); @@ -263,7 +258,6 @@ void Serialize::serialize(QByteArray &data, const QV4::Value &v, ExecutionEngine return; } -#endif const QVariant variant = engine->toVariant(v, QMetaType::fromType(), false); if (variant.userType() == QMetaType::QUrl) { serializeString(data, variant.value().toString(), WorkerUrl); @@ -419,7 +413,6 @@ ReturnedValue Serialize::deserialize(const char *&data, ExecutionEngine *engine) agent->setProperty("engine", QVariant::fromValue(engine)); return rv->asReturnedValue(); } -#if QT_CONFIG(qml_sequence_object) case WorkerSequence: { ScopedValue value(scope); @@ -438,7 +431,6 @@ ReturnedValue Serialize::deserialize(const char *&data, ExecutionEngine *engine) QVariant seqVariant = QV4::SequencePrototype::toVariant(array, QMetaType(sequenceType), &succeeded); return QV4::SequencePrototype::fromVariant(engine, seqVariant, &succeeded); } -#endif } Q_ASSERT(!"Unreachable"); return QV4::Encode::undefined(); -- cgit v1.2.3