summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstring.h
diff options
context:
space:
mode:
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 f14644d956..b77c6134d5 100644
--- a/src/corelib/text/qstring.h
+++ b/src/corelib/text/qstring.h
@@ -658,6 +658,11 @@ public:
{
return fromUtf8_helper(str, (str && size == -1) ? int(strlen(str)) : size);
}
+#ifdef __cpp_char8_t
+ Q_WEAK_OVERLOAD
+ static inline QString fromUtf8(const char8_t *str, qsizetype size = -1)
+ { return fromUtf8(reinterpret_cast<const char *>(str), int(size)); }
+#endif
static inline QString fromLocal8Bit(const char *str, int size = -1)
{
return fromLocal8Bit_helper(str, (str && size == -1) ? int(strlen(str)) : size);