diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-05-14 14:05:53 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-05-16 23:50:40 +0200 |
commit | c7d3ab0d058ce71079c2f49ab20fcbe8ddcde072 (patch) | |
tree | bdc88b959f975ed57bf332b4854794527d43757c /src/qml/jsapi | |
parent | 30d2ad639b446c87802be8477115bad5754ba170 (diff) |
QJSEngine: support char16_t
Now that char16_t is used in Qt (for instance in QChar::unicode()), we
need to support it.
Change-Id: I527a70795524bfd883fc4d729aac714708b51181
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/qml/jsapi')
-rw-r--r-- | src/qml/jsapi/qjsengine.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp index 3bcb12a8b6..70c07e4cb7 100644 --- a/src/qml/jsapi/qjsengine.cpp +++ b/src/qml/jsapi/qjsengine.cpp @@ -802,6 +802,9 @@ bool QJSEngine::convertV2(const QJSValue &value, int type, void *ptr) case QMetaType::QChar: *reinterpret_cast<QChar*>(ptr) = QV4::Value::toUInt32(d); return true; + case QMetaType::Char16: + *reinterpret_cast<char16_t *>(ptr) = QV4::Value::toUInt32(d); + return true; default: return false; } |