summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringliteral.h
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-08-13 17:47:44 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-08-14 13:17:11 +0200
commit06ffb912ca824ad98ae3685363c2e8087fc347b9 (patch)
tree66b19930a061b96efe43512389cb60f8bb93b6ce /src/corelib/text/qstringliteral.h
parentd40f88e8d23f9d5fdb08ff9a394d9697a0d86fc8 (diff)
Drop qunicodechar
It's unused except in the definition of QStringLiteral, where we can just use char16_t. The static_assert can also go as it's already checked in qglobal.cpp. Change-Id: I06e8a87b4dea1582cd84957efca1b8ad0d2e0266 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qstringliteral.h')
-rw-r--r--src/corelib/text/qstringliteral.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/corelib/text/qstringliteral.h b/src/corelib/text/qstringliteral.h
index 4d24937eb7..d86e6eafd9 100644
--- a/src/corelib/text/qstringliteral.h
+++ b/src/corelib/text/qstringliteral.h
@@ -55,15 +55,10 @@ QT_BEGIN_NAMESPACE
// to lacking stdlib support. But QStringLiteral only needs the
// core language feature, so just use u"" here unconditionally:
-typedef char16_t qunicodechar;
-
-static_assert(sizeof(qunicodechar) == 2,
- "qunicodechar must typedef an integral type of size 2");
-
#define QT_UNICODE_LITERAL(str) u"" str
#define QStringLiteral(str) \
(QString(QStringPrivate(nullptr, \
- reinterpret_cast<char16_t *>(const_cast<qunicodechar *>(QT_UNICODE_LITERAL(str))), \
+ const_cast<char16_t *>(QT_UNICODE_LITERAL(str)), \
sizeof(QT_UNICODE_LITERAL(str))/2 - 1))) \
/**/