diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-01-10 16:53:05 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-01-15 14:22:42 +0100 |
commit | f73e294472906077556e13ca10df185300c2450f (patch) | |
tree | fece290b38c3d3d4b047b90692a296eabc345905 /src/qmlworkerscript | |
parent | 2715d67f53efc916f212022572fa639d7704b43c (diff) |
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 <joerg.bornemann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlworkerscript')
-rw-r--r-- | src/qmlworkerscript/qv4serialize.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
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 <private/qv4value_p.h> #include <private/qv4dateobject_p.h> #include <private/qv4regexpobject_p.h> -#if QT_CONFIG(qml_sequence_object) #include <private/qv4sequenceobject_p.h> -#endif #include <private/qv4objectproto_p.h> #include <private/qv4qobjectwrapper_p.h> @@ -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<Object>()) { -#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<QUrl>(), false); if (variant.userType() == QMetaType::QUrl) { serializeString(data, variant.value<QUrl>().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(); |