summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstring.h
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2022-12-30 13:41:40 +0100
committerMikolaj Boc <mikolaj.boc@qt.io>2023-01-13 21:07:14 +0100
commit2e97ccc8d0e3c1fa0fe34e01d1d3e6f8cd7465ba (patch)
tree4a5094bb2cc1b700c2884e2b1a32226110b7ba45 /src/corelib/text/qstring.h
parent4dbb07f614c914e78437aacf7a1716f632da5e8a (diff)
Add QString<->emscripten::val conversion functions
Following the QRect, add functions converting the QString to native emscripten::val and back: fromJsString, toJsString Change-Id: I2d0625ede3bbf7249e2e91b8de298b5b91df8ba2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/corelib/text/qstring.h')
-rw-r--r--src/corelib/text/qstring.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h
index bde7041eef..91a9c86994 100644
--- a/src/corelib/text/qstring.h
+++ b/src/corelib/text/qstring.h
@@ -806,6 +806,11 @@ public:
NSString *toNSString() const Q_DECL_NS_RETURNS_AUTORELEASED;
#endif
+#if defined(Q_OS_WASM) || defined(Q_QDOC)
+ static QString fromJsString(emscripten::val jsString);
+ emscripten::val toJsString() const;
+#endif
+
inline bool isNull() const { return d->isNull(); }