diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /util | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'util')
-rwxr-xr-x | util/cmake/configurejson2cmake.py | 8 | ||||
-rwxr-xr-x | util/cmake/pro2cmake.py | 18 | ||||
-rw-r--r-- | util/corelib/qurl-generateTLDs/main.cpp | 164 | ||||
-rw-r--r-- | util/glgen/glgen.pro | 3 | ||||
-rw-r--r-- | util/gradientgen/tobinaryjson.pro | 3 | ||||
-rw-r--r-- | util/lexgen/README | 3 | ||||
-rw-r--r-- | util/lexgen/css3-simplified.lexgen | 2 | ||||
-rw-r--r-- | util/lexgen/generator.cpp | 15 | ||||
-rw-r--r-- | util/lexgen/main.cpp | 2 | ||||
-rw-r--r-- | util/local_database/xpathlite.py | 2 | ||||
-rw-r--r-- | util/unicode/README | 31 | ||||
-rw-r--r-- | util/unicode/main.cpp | 53 |
12 files changed, 187 insertions, 117 deletions
diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index f870637e15..58ab106555 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -728,6 +728,14 @@ def parseFeature(ctx, feature, data, cm_fh): 'msvc_mp': None, 'optimize_debug': None, 'optimize_size': None, + # special case to enable implicit feature on WIN32, until ANGLE is ported + 'opengl-desktop': { + 'autoDetect': '' + }, + # special case to disable implicit feature on WIN32, until ANGLE is ported + 'opengl-dynamic': { + 'autoDetect': 'OFF' + }, 'opengles2': { # special case to disable implicit feature on WIN32, until ANGLE is ported 'condition': 'NOT WIN32 AND ( NOT APPLE_WATCHOS AND NOT QT_FEATURE_opengl_desktop AND GLESv2_FOUND )' }, diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index e7bb4f3fa2..7801c4d103 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -139,6 +139,12 @@ def spaces(indent: int) -> str: return ' ' * indent +def trim_leading_dot(file: str) -> str: + while file.startswith('./'): + file = file[2:] + return file + + def map_to_file(f: str, scope: Scope, *, is_include: bool = False) -> str: assert('$$' not in f) @@ -148,9 +154,7 @@ def map_to_file(f: str, scope: Scope, *, is_include: bool = False) -> str: base_dir = scope.currentdir if is_include else scope.basedir f = os.path.join(base_dir, f) - while f.startswith('./'): - f = f[2:] - return f + return trim_leading_dot(f) def handle_vpath(source: str, base_dir: str, vpath: typing.List[str]) -> str: @@ -175,8 +179,7 @@ def handle_vpath(source: str, base_dir: str, vpath: typing.List[str]) -> str: for v in vpath: fullpath = os.path.join(v, source) if os.path.exists(fullpath): - relpath = os.path.relpath(fullpath, base_dir) - return relpath + return trim_leading_dot(os.path.relpath(fullpath, base_dir)) print(' XXXX: Source {}: Not found.'.format(source)) return '{}-NOTFOUND'.format(source) @@ -564,6 +567,9 @@ class Scope(object): # strip ${CMAKE_CURRENT_SOURCE_DIR}: result = list(map(lambda f: f[28:] if f.startswith('${CMAKE_CURRENT_SOURCE_DIR}/') else f, result)) + # strip leading ./: + result = list(map(lambda f: trim_leading_dot(f), result)) + return result def get_files(self, key: str, *, use_vpath: bool = False, @@ -1432,7 +1438,7 @@ def write_tool(cm_fh: typing.IO[str], scope: Scope, *, indent: int = 0) -> None: tool_name = scope.TARGET - extra = ['BOOTSTRAP'] if 'force_bootstrap' in scope.get('CONFIG', []) else [] + extra = ['BOOTSTRAP'] if 'force_bootstrap' in scope.get('CONFIG') else [] write_main_part(cm_fh, tool_name, 'Tool', 'add_qt_tool', scope, indent=indent, known_libraries={'Qt::Core', }, diff --git a/util/corelib/qurl-generateTLDs/main.cpp b/util/corelib/qurl-generateTLDs/main.cpp index 006eaf92b1..6fde287049 100644 --- a/util/corelib/qurl-generateTLDs/main.cpp +++ b/util/corelib/qurl-generateTLDs/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the utils of the Qt Toolkit. @@ -28,33 +28,66 @@ #include <QtCore> +const QString quadQuote = QStringLiteral("\"\""); // Closes one string, opens a new one. + static QString utf8encode(const QByteArray &array) // turns e.g. tranøy.no to tran\xc3\xb8y.no { QString result; result.reserve(array.length() + array.length() / 3); + bool wasHex = false; for (int i = 0; i < array.length(); ++i) { char c = array.at(i); // if char is non-ascii, escape it if (c < 0x20 || uchar(c) >= 0x7f) { result += "\\x" + QString::number(uchar(c), 16); + wasHex = true; } else { // if previous char was escaped, we need to make sure the next char is not // interpreted as part of the hex value, e.g. "äc.com" -> "\xabc.com"; this // should be "\xab""c.com" - QRegExp hexEscape("\\\\x[a-fA-F0-9][a-fA-F0-9]$"); bool isHexChar = ((c >= '0' && c <= '9') || - (c >= 'a' && c <= 'f') || - (c >= 'A' && c <= 'F')); - if (result.contains(hexEscape) && isHexChar) - result += "\"\""; + (c >= 'a' && c <= 'f') || + (c >= 'A' && c <= 'F')); + if (wasHex && isHexChar) + result += quadQuote; result += c; + wasHex = false; } } return result; } -int main(int argc, char **argv) { +/* + Digest public suffix data into efficiently-searchable form. + + Takes the public suffix list (see usage message), a list of DNS domains + whose child domains should not be presumed to trust one another, and + converts it to a form that lets qtbase/src/corelib/io/qtldurl.cpp's query + functions find entries efficiently. + + Each line of the suffix file (aside from comments and blanks) gives a suffix + (starting with a dot) with an optional prefix of '*' (to include every + immediate child) or of '!' (to exclude the suffix, e.g. from a '*' line for + a tail of it). A line with neither of these prefixes is an exact match. + + Each line is hashed and the hash is reduced modulo the number of lines + (tldCount); lines are grouped by reduced hash and separated by '\0' bytes + within each group. Conceptually, the groups are then emitted to a single + huge string, along with a table (tldIndices[tldCount]) of indices into that + string of the starts of the the various groups. + + However, that huge string would exceed the 64k limit at least one compiler + imposes on a single string literal, so we actually split up the huge string + into an array of chunks, each less than 64k in size. Each group is written + to a single chunk (so we start a new chunk if the next group would take the + present chunk over the limit). There are tldChunkCount chunks; their lengths + are saved in tldChunks[tldChunkCount]; the chunks themselves in + tldData[tldChunkCount]. See qtldurl.cpp's containsTLDEntry() for how to + search for a string in the resulting data. +*/ +int main(int argc, char **argv) +{ QCoreApplication app(argc, argv); if (argc < 3) { printf("\nusage: %s inputFile outputFile\n\n", argv[0]); @@ -68,14 +101,20 @@ int main(int argc, char **argv) { exit(1); } QFile file(argv[1]); - QFile outFile(argv[2]); - file.open(QIODevice::ReadOnly); - outFile.open(QIODevice::WriteOnly); + if (!file.open(QIODevice::ReadOnly)) { + fprintf("Failed to open input file (%s); see %s -usage", argv[1], argv[0]); + return 1; + } - QByteArray outIndicesBufferBA; - QBuffer outIndicesBuffer(&outIndicesBufferBA); - outIndicesBuffer.open(QIODevice::WriteOnly); + QFile outFile(argv[2]); + if (!outFile.open(QIODevice::WriteOnly)) { + file.close() + fprintf("Failed to open output file (%s); see %s -usage", argv[2], argv[0]); + return 1; + } + // Write tldData[] and tldIndices[] in one scan of the (input) file, but + // buffer tldData[] so we don'te interleave them in the outFile. QByteArray outDataBufferBA; QBuffer outDataBuffer(&outDataBufferBA); outDataBuffer.open(QIODevice::WriteOnly); @@ -85,74 +124,65 @@ int main(int argc, char **argv) { file.readLine(); lineCount++; } + outFile.write("static const quint16 tldCount = "); + outFile.write(QByteArray::number(lineCount)); + outFile.write(";\n"); + file.reset(); QVector<QString> strings(lineCount); while (!file.atEnd()) { - QString s = QString::fromUtf8(file.readLine()); - QString st = s.trimmed(); + QString st = QString::fromUtf8(file.readLine()).trimmed(); int num = qt_hash(st) % lineCount; + QString &entry = strings[num]; + st = utf8encode(st.toUtf8()); - QString utf8String = utf8encode(st.toUtf8()); + // For domain 1.com, we could get something like a.com\01.com, which + // would be misinterpreted as octal 01, so we need to separate such + // strings with quotes: + if (!entry.isEmpty() && st.at(0).isDigit()) + entry.append(quadQuote); - // for domain 1.com, we could get something like - // a.com\01.com, which would be interpreted as octal 01, - // so we need to separate those strings with quotes - QRegExp regexpOctalEscape(QLatin1String("^[0-9]")); - if (!strings.at(num).isEmpty() && st.contains(regexpOctalEscape)) - strings[num].append("\"\""); - - strings[num].append(utf8String); - strings[num].append("\\0"); + entry.append(st); + entry.append("\\0"); } - - outIndicesBuffer.write("static const quint16 tldCount = "); - outIndicesBuffer.write(QByteArray::number(lineCount)); - outIndicesBuffer.write(";\n"); - outIndicesBuffer.write("static const quint32 tldIndices["); -// outIndicesBuffer.write(QByteArray::number(lineCount+1)); // not needed - outIndicesBuffer.write("] = {\n"); + outFile.write("static const quint32 tldIndices[] = {\n"); + outDataBuffer.write("\nstatic const char *tldData[] = {\n"); int totalUtf8Size = 0; - int chunkSize = 0; - int stringUtf8Size = 0; + int chunkSize = 0; // strlen of the current chunk (sizeof is bigger by 1) QStringList chunks; for (int a = 0; a < lineCount; a++) { - bool lineIsEmpty = strings.at(a).isEmpty(); - if (!lineIsEmpty) { - strings[a].prepend("\""); - strings[a].append("\""); - } - int zeroCount = strings.at(a).count(QLatin1String("\\0")); - int utf8CharsCount = strings.at(a).count(QLatin1String("\\x")); - int quoteCount = strings.at(a).count('"'); - stringUtf8Size = strings.at(a).count() - (zeroCount + quoteCount + utf8CharsCount * 3); - chunkSize += stringUtf8Size; - if (chunkSize > 65535) { - static int chunkCount = 0; - qWarning() << "chunk" << ++chunkCount << "has length" << chunkSize - stringUtf8Size; - outDataBuffer.write(",\n\n"); - chunks.append(QByteArray::number(totalUtf8Size)); - chunkSize = 0; + outFile.write(QByteArray::number(totalUtf8Size)); + outFile.write(",\n"); + const QString &entry = strings.at(a); + if (!entry.isEmpty()) { + const int zeroCount = entry.count(QLatin1String("\\0")); + const int utf8CharsCount = entry.count(QLatin1String("\\x")); + const int quoteCount = entry.count('"'); + const int stringUtf8Size = entry.count() - (zeroCount + quoteCount + utf8CharsCount * 3); + chunkSize += stringUtf8Size; + // MSVC 2015 chokes if sizeof(a single string) > 0xffff + if (chunkSize >= 0xffff) { + static int chunkCount = 0; + qWarning() << "chunk" << ++chunkCount << "has length" << chunkSize - stringUtf8Size; + outDataBuffer.write(",\n\n"); + chunks.append(QString::number(totalUtf8Size)); + chunkSize = 0; + } + totalUtf8Size += stringUtf8Size; + + outDataBuffer.write("\""); + outDataBuffer.write(entry.toUtf8()); + outDataBuffer.write("\"\n"); } - outDataBuffer.write(strings.at(a).toUtf8()); - if (!lineIsEmpty) - outDataBuffer.write("\n"); - outIndicesBuffer.write(QByteArray::number(totalUtf8Size)); - outIndicesBuffer.write(",\n"); - totalUtf8Size += stringUtf8Size; } - chunks.append(QByteArray::number(totalUtf8Size)); - outIndicesBuffer.write(QByteArray::number(totalUtf8Size)); - outIndicesBuffer.write("};\n"); - outIndicesBuffer.close(); - outFile.write(outIndicesBufferBA); + chunks.append(QString::number(totalUtf8Size)); + outFile.write(QByteArray::number(totalUtf8Size)); + outFile.write("};\n"); + outDataBuffer.write("};\n"); outDataBuffer.close(); - outFile.write("\nstatic const char *tldData["); -// outFile.write(QByteArray::number(charSize)); // not needed - outFile.write("] = {\n"); outFile.write(outDataBufferBA); - outFile.write("};\n"); // write chunk information outFile.write("\nstatic const quint16 tldChunkCount = "); @@ -161,6 +191,6 @@ int main(int argc, char **argv) { outFile.write(chunks.join(", ").toLatin1()); outFile.write("};\n"); outFile.close(); - printf("data generated to %s . Now copy the data from this file to src/corelib/io/qurltlds_p.h in your Qt repo\n", argv[2]); - exit(0); + printf("Data generated to %s - now revise qtbase/src/corelib/io/qurltlds_p.h to use this data.\n", argv[2]); + return 0; } diff --git a/util/glgen/glgen.pro b/util/glgen/glgen.pro index 11018e942d..22c377e5f1 100644 --- a/util/glgen/glgen.pro +++ b/util/glgen/glgen.pro @@ -1,6 +1,5 @@ QT -= gui -CONFIG += console -CONFIG -= app_bundle +CONFIG += cmdline # Uncomment following to enable debug output #DEFINES += SPECPARSER_DEBUG diff --git a/util/gradientgen/tobinaryjson.pro b/util/gradientgen/tobinaryjson.pro index 8ed3509278..8aa9d0d008 100644 --- a/util/gradientgen/tobinaryjson.pro +++ b/util/gradientgen/tobinaryjson.pro @@ -1,4 +1,3 @@ SOURCES += tobinaryjson.cpp QT = core -CONFIG += console -CONFIG -= app_bundle +CONFIG += cmdline diff --git a/util/lexgen/README b/util/lexgen/README index 435c7f31ee..005b77b81c 100644 --- a/util/lexgen/README +++ b/util/lexgen/README @@ -11,6 +11,5 @@ you want. But I like that it generates code that operates on QChar and friends. Use at your own risk ;-) - -- -Simon Hausmann <simon.hausmann@digia.com> +Simon Hausmann <simon.hausmann@qt.io> diff --git a/util/lexgen/css3-simplified.lexgen b/util/lexgen/css3-simplified.lexgen index 99463d524e..d86a4786be 100644 --- a/util/lexgen/css3-simplified.lexgen +++ b/util/lexgen/css3-simplified.lexgen @@ -5,7 +5,7 @@ classname = QCssScanner_Generated [Code Generator Options] MapToCode[a-z] = (ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256 TokenPrefix = QCss:: -FileHeader = ../../src/tools/moc/util/licenseheader.txt +FileHeader = ../../header.LGPL [Macros] escape = \\[^\r\n\f0-9a-f] diff --git a/util/lexgen/generator.cpp b/util/lexgen/generator.cpp index edd2b603e7..481d586e73 100644 --- a/util/lexgen/generator.cpp +++ b/util/lexgen/generator.cpp @@ -29,6 +29,7 @@ #include "generator.h" #include <QFile> +#include <QDir> void Function::printDeclaration(CodeBlock &block, const QString &funcNamePrefix) const { @@ -505,14 +506,16 @@ QString Generator::generate() klass.addMember(Class::PublicMember, lexFunc); QString header; - QFile headerFile(headerFileName); - if (!headerFileName.isEmpty() - && headerFile.exists() - && headerFile.open(QIODevice::ReadOnly)) { - header = QString::fromUtf8(headerFile.readAll()); + if (!headerFileName.isEmpty()) { + QString self(QDir::fromNativeSeparators(QStringLiteral(__FILE__))); + int lastSep = self.lastIndexOf(QChar('/')); + QDir here(lastSep < 0 ? QStringLiteral(".") : self.left(lastSep)); + QFile headerFile(QDir::cleanPath(here.filePath(headerFileName))); + if (headerFile.exists() && headerFile.open(QIODevice::ReadOnly)) + header = QString::fromUtf8(headerFile.readAll()); } - header += QLatin1String("// auto generated. DO NOT EDIT.\n"); + header += QLatin1String("// auto generated by qtbase/util/lexgen/. DO NOT EDIT.\n"); return header + klass.declaration() + klass.definition(); } diff --git a/util/lexgen/main.cpp b/util/lexgen/main.cpp index 22b99b633c..517629f4c1 100644 --- a/util/lexgen/main.cpp +++ b/util/lexgen/main.cpp @@ -256,7 +256,7 @@ int main(int argc, char **argv) } if (ruleFile.isEmpty()) { - qWarning("usage: lexgen [-test rulefile"); + qWarning("usage: lexgen [-debug] [-cache] [-test] rulefile"); qWarning(" "); qWarning(" the -test option will cause lexgen to interpret standard input"); qWarning(" according to the specified rules and print out pairs of token and"); diff --git a/util/local_database/xpathlite.py b/util/local_database/xpathlite.py index b3f8325569..218135d7a7 100644 --- a/util/local_database/xpathlite.py +++ b/util/local_database/xpathlite.py @@ -257,7 +257,7 @@ def findEntry(base, path, draft=None, attribute=None): if result: return result if not aliaspath: - raise Error("findEntry: fatal error: %s: can not find key %s" % (filename, path)) + raise Error("findEntry: fatal error: %s: cannot find key %s" % (filename, path)) path = aliaspath return result diff --git a/util/unicode/README b/util/unicode/README index ca34266a36..e52f26175a 100644 --- a/util/unicode/README +++ b/util/unicode/README @@ -1 +1,32 @@ Unicode is used to generate the unicode data in src/corelib/tools. + +To update: +* Find the data (UAX #44, UCD; not the XML version) at + ftp://www.unicode.org/Public/zipped/$Version/ +* Unpack the zip file; for each file in data/, replace with the new + version; find the *BreakProperty.txt in auxiliary/. (These last are + only in the zip, not in the web-space's unpacked versions.) +* If needed, add an entry to enum QChar::UnicodeVersion for the new + Unicode version +* In that case, also update main.cpp's initAgeMap and DATA_VERSION_S* + to match +* Build this project. Its binary, unicode, ignores command-line + options and assumes it is being run from this directory. When run, + it produces lots of output. Hopefully that doesn't matter. +* Assertions may trigger: if so, study code and understand what's more + complicated about this update; talk to folk named in the git logs, + maybe push a WIP to gerrit to solicit advice. Some bit-field may + need to be expanded, for example. In some cases QChar may need + additions to some of its enums. +* Build with the modified code, fix any compilation issues. +* That may have updated qtbase/src/corelib/tools/qunicodetables.cpp; + if so the update matters; be sure to commit the changes to data/ at + the same time and update tools/qt_attribution.json to match; use the + UCD Revision number, rather than the Unicode standard number, as the + Version, for all that qunicodetables.cpp uses the latter. + +The script writingSystems.sh generates a list of writing systems, +ostensibly as a the basis for updating QFontDatabase::WritingSystem +enum; however, the Release 20 output of it contains many more writing +systems than are present in that enum, suggesting it has not been run +in a very long time. Further research needed. diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index 0c3c0b2ee1..8576f00e35 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -78,7 +78,6 @@ static void initAgeMap() } } - static QHash<QByteArray, QChar::Category> categoryMap; static void initCategoryMap() @@ -778,7 +777,6 @@ static void initScriptMap() { QChar::Script_Soyombo, "Soyombo" }, { QChar::Script_ZanabazarSquare, "ZanabazarSquare" }, - // unhandled { QChar::Script_Unknown, 0 } }; @@ -789,7 +787,6 @@ static void initScriptMap() } } - // Keep this one in sync with the code in createPropertyInfo static const char *property_string = "struct Properties {\n" @@ -801,6 +798,9 @@ static const char *property_string = " signed short mirrorDiff : 16;\n" " ushort lowerCaseSpecial : 1;\n" " signed short lowerCaseDiff : 15;\n" + "#ifdef Q_OS_WASM\n" + " unsigned char : 0; //wasm 64 packing trick\n" + "#endif\n" " ushort upperCaseSpecial : 1;\n" " signed short upperCaseDiff : 15;\n" " ushort titleCaseSpecial : 1;\n" @@ -809,14 +809,17 @@ static const char *property_string = " signed short caseFoldDiff : 15;\n" " ushort unicodeVersion : 8; /* 5 used */\n" " ushort nfQuickCheck : 8;\n" // could be narrowed + "#ifdef Q_OS_WASM\n" + " unsigned char : 0; //wasm 64 packing trick\n" + "#endif\n" " ushort graphemeBreakClass : 5; /* 5 used */\n" " ushort wordBreakClass : 5; /* 5 used */\n" " ushort sentenceBreakClass : 8; /* 4 used */\n" " ushort lineBreakClass : 6; /* 6 used */\n" " ushort script : 8;\n" "};\n\n" - "Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4) Q_DECL_NOTHROW;\n" - "Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2) Q_DECL_NOTHROW;\n" + "Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4) noexcept;\n" + "Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2) noexcept;\n" "\n" "struct LowercaseTraits\n" "{\n" @@ -852,20 +855,20 @@ static const char *property_string = "\n"; static const char *methods = - "Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(uint ucs4) Q_DECL_NOTHROW;\n" - "inline GraphemeBreakClass graphemeBreakClass(QChar ch) Q_DECL_NOTHROW\n" + "Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(uint ucs4) noexcept;\n" + "inline GraphemeBreakClass graphemeBreakClass(QChar ch) noexcept\n" "{ return graphemeBreakClass(ch.unicode()); }\n" "\n" - "Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass(uint ucs4) Q_DECL_NOTHROW;\n" - "inline WordBreakClass wordBreakClass(QChar ch) Q_DECL_NOTHROW\n" + "Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass(uint ucs4) noexcept;\n" + "inline WordBreakClass wordBreakClass(QChar ch) noexcept\n" "{ return wordBreakClass(ch.unicode()); }\n" "\n" - "Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass(uint ucs4) Q_DECL_NOTHROW;\n" - "inline SentenceBreakClass sentenceBreakClass(QChar ch) Q_DECL_NOTHROW\n" + "Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass(uint ucs4) noexcept;\n" + "inline SentenceBreakClass sentenceBreakClass(QChar ch) noexcept\n" "{ return sentenceBreakClass(ch.unicode()); }\n" "\n" - "Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(uint ucs4) Q_DECL_NOTHROW;\n" - "inline LineBreakClass lineBreakClass(QChar ch) Q_DECL_NOTHROW\n" + "Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(uint ucs4) noexcept;\n" + "inline LineBreakClass lineBreakClass(QChar ch) noexcept\n" "{ return lineBreakClass(ch.unicode()); }\n" "\n"; @@ -2473,10 +2476,6 @@ static QByteArray createPropertyInfo() out += ", "; out += QByteArray::number( p.lowerCaseDiff ); out += ", "; - out += "#ifdef Q_OS_WASM \n" -// " unsigned char : 0; //wasm 64 packing trick QTBUG-65259\n" - out += "#endif \n" - out += ", "; // " ushort upperCaseSpecial : 1;\n" // " signed short upperCaseDiff : 15;\n" out += QByteArray::number( p.upperCaseSpecial ); @@ -2501,10 +2500,6 @@ static QByteArray createPropertyInfo() // " ushort nfQuickCheck : 8;\n" out += QByteArray::number( p.nfQuickCheck ); out += ", "; - out += "#ifdef Q_OS_WASM \n" -// " unsigned char : 0; //wasm 64 packing trick QTBUG-65259\n" - out += "#endif \n" - out += ", "; // " ushort graphemeBreakClass : 5; /* 5 used */\n" // " ushort wordBreakClass : 5; /* 5 used */\n" // " ushort sentenceBreakClass : 8; /* 4 used */\n" @@ -2526,42 +2521,42 @@ static QByteArray createPropertyInfo() out += "\n};\n\n"; - out += "Q_DECL_CONST_FUNCTION static inline const Properties *qGetProp(uint ucs4) Q_DECL_NOTHROW\n" + out += "Q_DECL_CONST_FUNCTION static inline const Properties *qGetProp(uint ucs4) noexcept\n" "{\n" " return uc_properties + GET_PROP_INDEX(ucs4);\n" "}\n" "\n" - "Q_DECL_CONST_FUNCTION static inline const Properties *qGetProp(ushort ucs2) Q_DECL_NOTHROW\n" + "Q_DECL_CONST_FUNCTION static inline const Properties *qGetProp(ushort ucs2) noexcept\n" "{\n" " return uc_properties + GET_PROP_INDEX_UCS2(ucs2);\n" "}\n" "\n" - "Q_DECL_CONST_FUNCTION Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4) Q_DECL_NOTHROW\n" + "Q_DECL_CONST_FUNCTION Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4) noexcept\n" "{\n" " return qGetProp(ucs4);\n" "}\n" "\n" - "Q_DECL_CONST_FUNCTION Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2) Q_DECL_NOTHROW\n" + "Q_DECL_CONST_FUNCTION Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2) noexcept\n" "{\n" " return qGetProp(ucs2);\n" "}\n\n"; - out += "Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(uint ucs4) Q_DECL_NOTHROW\n" + out += "Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(uint ucs4) noexcept\n" "{\n" " return static_cast<GraphemeBreakClass>(qGetProp(ucs4)->graphemeBreakClass);\n" "}\n" "\n" - "Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass(uint ucs4) Q_DECL_NOTHROW\n" + "Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass(uint ucs4) noexcept\n" "{\n" " return static_cast<WordBreakClass>(qGetProp(ucs4)->wordBreakClass);\n" "}\n" "\n" - "Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass(uint ucs4) Q_DECL_NOTHROW\n" + "Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass(uint ucs4) noexcept\n" "{\n" " return static_cast<SentenceBreakClass>(qGetProp(ucs4)->sentenceBreakClass);\n" "}\n" "\n" - "Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(uint ucs4) Q_DECL_NOTHROW\n" + "Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(uint ucs4) noexcept\n" "{\n" " return static_cast<LineBreakClass>(qGetProp(ucs4)->lineBreakClass);\n" "}\n" |