diff options
Diffstat (limited to 'src/corelib/text/qunicodetables_p.h')
-rw-r--r-- | src/corelib/text/qunicodetables_p.h | 91 |
1 files changed, 42 insertions, 49 deletions
diff --git a/src/corelib/text/qunicodetables_p.h b/src/corelib/text/qunicodetables_p.h index 1d6026229f..eabdc919cb 100644 --- a/src/corelib/text/qunicodetables_p.h +++ b/src/corelib/text/qunicodetables_p.h @@ -1,43 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* This file is autogenerated from the Unicode 13.0 database. Do not edit */ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: Unicode-DFS-2016 + +/* This file is autogenerated from the Unicode 15.1 database. Do not edit */ // // W A R N I N G @@ -59,7 +23,7 @@ QT_BEGIN_NAMESPACE -#define UNICODE_DATA_VERSION QChar::Unicode_13_0 +#define UNICODE_DATA_VERSION QChar::Unicode_15_1 namespace QUnicodeTables { @@ -79,7 +43,8 @@ struct Properties { ushort joining : 3; signed short digitValue : 5; signed short mirrorDiff : 16; - ushort unicodeVersion : 8; /* 5 used */ + ushort unicodeVersion : 5; /* 5 used */ + ushort eastAsianWidth : 3; /* 3 used */ ushort nfQuickCheck : 8; #ifdef Q_OS_WASM unsigned char : 0; //wasm 64 packing trick @@ -94,7 +59,8 @@ struct Properties { ushort graphemeBreakClass : 5; /* 5 used */ ushort wordBreakClass : 5; /* 5 used */ ushort lineBreakClass : 6; /* 6 used */ - ushort sentenceBreakClass : 8; /* 4 used */ + ushort sentenceBreakClass : 4; /* 4 used */ + ushort idnaStatus : 4; /* 3 used */ ushort script : 8; }; @@ -103,6 +69,15 @@ Q_CORE_EXPORT const Properties * QT_FASTCALL properties(char16_t ucs2) noexcept; static_assert(sizeof(Properties) == 20); +enum class EastAsianWidth : unsigned int { + A, + F, + H, + N, + Na, + W, +}; + enum GraphemeBreakClass { GraphemeBreak_Any, GraphemeBreak_CR, @@ -142,10 +117,6 @@ enum WordBreakClass { WordBreak_MidNum, WordBreak_Numeric, WordBreak_ExtendNumLet, - WordBreak_E_Base, - WordBreak_E_Modifier, - WordBreak_Glue_After_Zwj, - WordBreak_E_Base_GAZ, WordBreak_WSegSpace, NumWordBreakClasses @@ -171,9 +142,11 @@ enum SentenceBreakClass { }; // see http://www.unicode.org/reports/tr14/tr14-30.html -// we don't use the XX and AI classes and map them to AL instead. +// we don't use the XX, AK, AP, AS and AI classes and map them to AL instead. +// VI and VF classes are mapped to CM. enum LineBreakClass { - LineBreak_OP, LineBreak_CL, LineBreak_CP, LineBreak_QU, LineBreak_GL, + LineBreak_OP, LineBreak_CL, LineBreak_CP, + LineBreak_QU, LineBreak_QU_Pi, LineBreak_QU_Pf, LineBreak_GL, LineBreak_NS, LineBreak_EX, LineBreak_SY, LineBreak_IS, LineBreak_PR, LineBreak_PO, LineBreak_NU, LineBreak_AL, LineBreak_HL, LineBreak_ID, LineBreak_IN, LineBreak_HY, LineBreak_BA, LineBreak_BB, LineBreak_B2, @@ -186,6 +159,14 @@ enum LineBreakClass { NumLineBreakClasses }; +enum class IdnaStatus : unsigned int { + Disallowed, + Valid, + Ignored, + Mapped, + Deviation +}; + Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(char32_t ucs4) noexcept; inline GraphemeBreakClass graphemeBreakClass(QChar ch) noexcept { return graphemeBreakClass(ch.unicode()); } @@ -202,6 +183,18 @@ Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(char32_t ucs4) noexcept; inline LineBreakClass lineBreakClass(QChar ch) noexcept { return lineBreakClass(ch.unicode()); } +Q_CORE_EXPORT IdnaStatus QT_FASTCALL idnaStatus(char32_t ucs4) noexcept; +inline IdnaStatus idnaStatus(QChar ch) noexcept +{ return idnaStatus(ch.unicode()); } + +Q_CORE_EXPORT QStringView QT_FASTCALL idnaMapping(char32_t usc4) noexcept; +inline QStringView idnaMapping(QChar ch) noexcept +{ return idnaMapping(ch.unicode()); } + +Q_CORE_EXPORT EastAsianWidth QT_FASTCALL eastAsianWidth(char32_t ucs4) noexcept; +inline EastAsianWidth eastAsianWidth(QChar ch) noexcept +{ return eastAsianWidth(ch.unicode()); } + } // namespace QUnicodeTables QT_END_NAMESPACE |