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>
This commit is contained in:
parent
d40f88e8d2
commit
06ffb912ca
@ -55,15 +55,10 @@ QT_BEGIN_NAMESPACE
|
|||||||
// to lacking stdlib support. But QStringLiteral only needs the
|
// to lacking stdlib support. But QStringLiteral only needs the
|
||||||
// core language feature, so just use u"" here unconditionally:
|
// 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 QT_UNICODE_LITERAL(str) u"" str
|
||||||
#define QStringLiteral(str) \
|
#define QStringLiteral(str) \
|
||||||
(QString(QStringPrivate(nullptr, \
|
(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))) \
|
sizeof(QT_UNICODE_LITERAL(str))/2 - 1))) \
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user