summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-12-29 15:56:33 +0100
committerLars Knoll <lars.knoll@qt.io>2017-12-30 12:09:53 +0100
commitdb92f2f3aac60218756a1aa8811cf192acc0b0e6 (patch)
treef28a47aebb2f08e221fe7bffafce62a0a96cf7fd /util
parentdd61a1d98ea9fbffeaf0e2adcd0ddd58105f6a75 (diff)
parent44da5b863597e761df3545dc7ff02a9b53bbb13d (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
Diffstat (limited to 'util')
-rw-r--r--util/unicode/main.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp
index c995a40343..fe6d4fbca1 100644
--- a/util/unicode/main.cpp
+++ b/util/unicode/main.cpp
@@ -1293,6 +1293,18 @@ static void readArabicShaping()
{
qDebug("Reading ArabicShaping.txt");
+ // Initialize defaults:
+ // Code points that are not explicitly listed in ArabicShaping.txt are either of joining type T or U:
+ // - Those that not explicitly listed that are of General Category Mn, Me, or Cf have joining type T.
+ // - All others not explicitly listed have joining type U.
+ for (int codepoint = 0; codepoint <= QChar::LastValidCodePoint; ++codepoint) {
+ UnicodeData &d = UnicodeData::valueRef(codepoint);
+ if (d.p.joining == QChar::Joining_None) {
+ if (d.p.category == QChar::Mark_NonSpacing || d.p.category == QChar::Mark_Enclosing || d.p.category == QChar::Other_Format)
+ d.p.joining = QChar::Joining_Transparent;
+ }
+ }
+
QFile f("data/ArabicShaping.txt");
if (!f.exists())
qFatal("Couldn't find ArabicShaping.txt");
@@ -1338,17 +1350,6 @@ static void readArabicShaping()
break;
}
}
-
- // Code points that are not explicitly listed in ArabicShaping.txt are either of joining type T or U:
- // - Those that not explicitly listed that are of General Category Mn, Me, or Cf have joining type T.
- // - All others not explicitly listed have joining type U.
- for (int codepoint = 0; codepoint <= QChar::LastValidCodePoint; ++codepoint) {
- UnicodeData &d = UnicodeData::valueRef(codepoint);
- if (d.p.joining == QChar::Joining_None) {
- if (d.p.category == QChar::Mark_NonSpacing || d.p.category == QChar::Mark_Enclosing || d.p.category == QChar::Other_Format)
- d.p.joining = QChar::Joining_Transparent;
- }
- }
}
static void readDerivedAge()
@@ -2525,7 +2526,7 @@ static QByteArray createSpecialCaseMap()
out.chop(1);
out += "\n};\n\n";
- qDebug(" memory usage: %d bytes", specialCaseMap.size()*sizeof(unsigned short));
+ qDebug(" memory usage: %ld bytes", specialCaseMap.size()*sizeof(unsigned short));
return out;
}
@@ -3021,7 +3022,7 @@ int main(int, char **)
"****************************************************************************/\n\n";
QByteArray note =
- "/* This file is autogenerated from the Unicode "DATA_VERSION_S" database. Do not edit */\n\n";
+ "/* This file is autogenerated from the Unicode " DATA_VERSION_S " database. Do not edit */\n\n";
QByteArray warning =
"//\n"
@@ -3062,9 +3063,10 @@ int main(int, char **)
f.write(warning);
f.write("#ifndef QUNICODETABLES_P_H\n"
"#define QUNICODETABLES_P_H\n\n"
+ "#include <QtCore/private/qglobal_p.h>\n\n"
"#include <QtCore/qchar.h>\n\n"
"QT_BEGIN_NAMESPACE\n\n");
- f.write("#define UNICODE_DATA_VERSION "DATA_VERSION_STR"\n\n");
+ f.write("#define UNICODE_DATA_VERSION " DATA_VERSION_STR "\n\n");
f.write("namespace QUnicodeTables {\n\n");
f.write(property_string);
f.write(grapheme_break_class_string);