diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-04-20 10:43:11 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-04-22 22:15:36 +0200 |
commit | 3c9339f3c817c985f9ff3410f1f0ef864554687a (patch) | |
tree | 05305a6a503b35f9627456435cc2523f5c9909ed /src/qml/jsruntime/qv4engine_p.h | |
parent | e44a949f9028df1d4750dad2925b074c9c59efcc (diff) |
Support native transformation between UrlObject and QVariant/QUrl
URL has become a builtin type. We should support it on the same level as
QString/String and QDateTime/Date.
In order to continue support for comparing URL properties with the
JavaScript equality operators, we still pass URLs as variants when
using them in JavaScript. However, we now create proper URL objects for
QJSValue and QJSManagedValue, and we allow transforming the URL-carrying
variant objects back into QUrls.
Change-Id: I78cb2d7d51ac720877217d2d4b4d0ab17cdd2a4b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4engine_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index 96aad5ee72..e3e0a481cf 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -601,6 +601,7 @@ public: #endif Heap::UrlObject *newUrlObject(); + Heap::UrlObject *newUrlObject(const QUrl &url); Heap::UrlSearchParamsObject *newUrlSearchParamsObject(); Heap::Object *newErrorObject(const Value &value); |