diff options
| author | Lars Knoll <lars.knoll@qt.io> | 2020-04-02 11:07:14 +0200 |
|---|---|---|
| committer | Lars Knoll <lars.knoll@qt.io> | 2020-04-03 21:02:23 +0200 |
| commit | fb3552e0d152e963d74cccc7b36f4e618638b722 (patch) | |
| tree | 6f1bc18f3cc8e01387edc8c07ff5cde8993cb3a9 /src/qml/jsruntime/qv4engine.cpp | |
| parent | cc6c5ae70b1389ed86301bbfc156628e1d3abbcd (diff) | |
Remove QRegExp support from QtQml
Remove all code that supported converting between JS RegExp's and
QRegExp, as QRegExp is going away in Qt6.
Change-Id: I4863e68dd87a337d7e836d1b26c28ee3bb914e9f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 5edf2fdea7..d4f55f6e7f 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -1042,11 +1042,6 @@ Heap::RegExpObject *ExecutionEngine::newRegExpObject(RegExp *re) return memoryManager->allocate<RegExpObject>(re); } -Heap::RegExpObject *ExecutionEngine::newRegExpObject(const QRegExp &re) -{ - return memoryManager->allocate<RegExpObject>(re); -} - #if QT_CONFIG(regularexpression) Heap::RegExpObject *ExecutionEngine::newRegExpObject(const QRegularExpression &re) { @@ -1605,13 +1600,10 @@ static QVariant toVariant(QV4::ExecutionEngine *e, const QV4::Value &value, int QV4::ScopedObject o(scope, value); Q_ASSERT(o); - if (QV4::RegExpObject *re = o->as<QV4::RegExpObject>()) { #if QT_CONFIG(regularexpression) - if (typeHint != QMetaType::QRegExp) - return re->toQRegularExpression(); + if (QV4::RegExpObject *re = o->as<QV4::RegExpObject>()) + return re->toQRegularExpression(); #endif - return re->toQRegExp(); - } if (createJSValueForObjects) return QVariant::fromValue(QJSValuePrivate::fromReturnedValue(o->asReturnedValue())); @@ -1720,8 +1712,6 @@ QV4::ReturnedValue QV4::ExecutionEngine::fromVariant(const QVariant &variant) return QV4::Encode(newDateObject(QDateTime(*reinterpret_cast<const QDate *>(ptr), QTime(0, 0, 0), Qt::UTC))); case QMetaType::QTime: return QV4::Encode(newDateObjectFromTime(*reinterpret_cast<const QTime *>(ptr))); - case QMetaType::QRegExp: - return QV4::Encode(newRegExpObject(*reinterpret_cast<const QRegExp *>(ptr))); #if QT_CONFIG(regularexpression) case QMetaType::QRegularExpression: return QV4::Encode(newRegExpObject(*reinterpret_cast<const QRegularExpression *>(ptr))); @@ -2191,11 +2181,6 @@ bool ExecutionEngine::metaTypeFromJS(const Value &value, int type, void *data) *reinterpret_cast<QDate *>(data) = d->toQDateTime().date(); return true; } break; - case QMetaType::QRegExp: - if (const QV4::RegExpObject *r = value.as<QV4::RegExpObject>()) { - *reinterpret_cast<QRegExp *>(data) = r->toQRegExp(); - return true; - } break; #if QT_CONFIG(regularexpression) case QMetaType::QRegularExpression: if (const QV4::RegExpObject *r = value.as<QV4::RegExpObject>()) { |
