summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-11-27 14:40:33 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-11-28 11:04:39 +0100
commit65ea4948dc36af2dd9b8beb1263a0e6ccebd79d2 (patch)
tree1d43e956d2b8d21139e26d45ef80130f89c122ba
parent1a1718b3422291ffecdc0f882a9a6255b039d357 (diff)
Unicode tables: minor prettification
Put blank lines before the final Num*Classes entries in enums, to set them off visibly from the "real" members. Moved some oddly placed commas to the ends of preceding lines, so that later additions can just add lines (with comma on end) without having to modify the preceding line while doing so. Change-Id: I5188dc25af9e4c17a1882fd9dab070e88013060b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/text/qunicodetables_p.h4
-rw-r--r--util/unicode/main.cpp16
2 files changed, 14 insertions, 6 deletions
diff --git a/src/corelib/text/qunicodetables_p.h b/src/corelib/text/qunicodetables_p.h
index 49a28000e0..81efc09773 100644
--- a/src/corelib/text/qunicodetables_p.h
+++ b/src/corelib/text/qunicodetables_p.h
@@ -122,6 +122,7 @@ enum GraphemeBreakClass {
Graphemebreak_E_Modifier,
Graphemebreak_Glue_After_Zwj,
Graphemebreak_E_Base_GAZ,
+
NumGraphemeBreakClasses
};
@@ -149,6 +150,7 @@ enum WordBreakClass {
WordBreak_Glue_After_Zwj,
WordBreak_E_Base_GAZ,
WordBreak_WSegSpace,
+
NumWordBreakClasses
};
@@ -167,6 +169,7 @@ enum SentenceBreakClass {
SentenceBreak_SContinue,
SentenceBreak_STerm,
SentenceBreak_Close,
+
NumSentenceBreakClasses
};
@@ -182,6 +185,7 @@ enum LineBreakClass {
LineBreak_EB, LineBreak_EM, LineBreak_ZWJ,
LineBreak_SA, LineBreak_SG, LineBreak_SP,
LineBreak_CR, LineBreak_LF, LineBreak_BK,
+
NumLineBreakClasses
};
diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp
index 2fc49221dc..9826775034 100644
--- a/util/unicode/main.cpp
+++ b/util/unicode/main.cpp
@@ -193,9 +193,9 @@ enum Direction {
DirLRI = QChar::DirLRI,
DirRLI = QChar::DirRLI,
DirFSI = QChar::DirFSI,
- DirPDI = QChar::DirPDI
+ DirPDI = QChar::DirPDI,
- , Dir_Unassigned
+ Dir_Unassigned
};
static QHash<QByteArray, Direction> directionMap;
@@ -245,9 +245,9 @@ enum JoiningType {
Joining_Dual,
Joining_Right,
Joining_Left,
- Joining_Transparent
+ Joining_Transparent,
- , Joining_Unassigned
+ Joining_Unassigned
};
static QHash<QByteArray, JoiningType> joining_map;
@@ -294,6 +294,7 @@ static const char *grapheme_break_class_string =
" Graphemebreak_E_Modifier,\n"
" Graphemebreak_Glue_After_Zwj,\n"
" Graphemebreak_E_Base_GAZ,\n"
+ "\n"
" NumGraphemeBreakClasses\n"
"};\n\n";
@@ -381,6 +382,7 @@ static const char *word_break_class_string =
" WordBreak_Glue_After_Zwj,\n"
" WordBreak_E_Base_GAZ,\n"
" WordBreak_WSegSpace,\n"
+ "\n"
" NumWordBreakClasses\n"
"};\n\n";
@@ -469,6 +471,7 @@ static const char *sentence_break_class_string =
" SentenceBreak_SContinue,\n"
" SentenceBreak_STerm,\n"
" SentenceBreak_Close,\n"
+ "\n"
" NumSentenceBreakClasses\n"
"};\n\n";
@@ -486,9 +489,9 @@ enum SentenceBreakClass {
SentenceBreak_ATerm,
SentenceBreak_SContinue,
SentenceBreak_STerm,
- SentenceBreak_Close
+ SentenceBreak_Close,
- , SentenceBreak_Unassigned
+ SentenceBreak_Unassigned
};
static QHash<QByteArray, SentenceBreakClass> sentence_break_map;
@@ -537,6 +540,7 @@ static const char *line_break_class_string =
" LineBreak_EB, LineBreak_EM, LineBreak_ZWJ,\n"
" LineBreak_SA, LineBreak_SG, LineBreak_SP,\n"
" LineBreak_CR, LineBreak_LF, LineBreak_BK,\n"
+ "\n"
" NumLineBreakClasses\n"
"};\n\n";