summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* Adapt to reuse version 6Lucie Gérard9 days2-1/+4
| | | | | | | Task-number: QTBUG-140916 Pick-to: 6.8 6.10 Change-Id: I5f865a54efc505312ba4172398efea6d78f7a9a3 Reviewed-by: Alexandru Croitor <[email protected]>
* qt-testrunner: detect test filename for androidtestrunner --aabDimitrios Apostolou2025-10-062-16/+99
| | | | | | | | | | | | | | | | | Tests on android are wrapped by androidtestrunner. Previously the test was passed to it with --apk testname.apk. A new way was recently added: --aab testname.aab. qt-testrunner now supports these two ways to detect the filename. Additionally, it now exits with error if the testname is undetected. This way we'll avoid all tests being recorded as "androidtestrunner" in the future. Fixes: QTQAINFRA-7351 Pick-to: 6.10 6.9 6.8 Change-Id: I571b617b28cdb4ea51d0b61e629d9bc8ec8e1917 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
* util/unicode: use prinft-style syntax with qDebug()Ahmad Samir2025-10-041-12/+11
| | | | | | | | | | | | The QDebug streaming operators would expand to more code. We can also remove the qdebug.h include (with all the other transitive includes that brings) which may make compiling faster. Explicitly include qmap.h, which used to be included transitively. Pick-to: 6.10 6.8 6.5 Change-Id: Ic2039e7b18801876c42e043d56c34e2220f3a46f Reviewed-by: Marc Mutz <[email protected]>
* util/unicode: DRY terminating when unable to open a fileAhmad Samir2025-10-041-3/+9
| | | | | | Pick-to: 6.10 6.8 6.5 Change-Id: I1e85b7bf5124338abe1abbfd80182e2f2ddf2f8d Reviewed-by: Marc Mutz <[email protected]>
* util/unicode: format debug messages as <relative-path>:<lineNo>: <Msg>Ahmad Samir2025-10-041-105/+106
| | | | | | | | | | Like Linux standard tools, e.g. grep and gcc. It's a more familiar pattern, which makes it easier to read, also easier for tools to parse the output (some tools can turn these into a clickable link). Pick-to: 6.10 6.8 6.5 Change-Id: I28e16f1a3ac91e703bba270da36edc27b9457fa8 Reviewed-by: Marc Mutz <[email protected]>
* Change C locale's short date format to use two-digit monthEdward Welbourne2025-09-301-1/+1
| | | | | | | | | | | | | | | | | | It was previously the only locale using short month name in the short date format, where all others used two-digit or unpadded month number. Since this anomalous format was used by no other locale and wasn't even a substring of some locale's long format, but was one of the first in date_format_data[], most other locales' date formats have changed position within this block of character data, causing trivial changes to two columns of the main locale_data[] table. [ChangeLog][QtCore][QLocale] The C locale now, in line with all locales derived from CLDR data, uses numeric month rather than the abbreviated month name. Change-Id: I5451036fa170236d88a46bef93a37c299de53a63 Reviewed-by: Thiago Macieira <[email protected]>
* Remove seconds from C locale short time formatEdward Welbourne2025-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is for consistency with other locales, none of which include seconds in their short formats. Until Qt 5.0.0's update to CLDR 1.4 (commit 3bfb72b90151339d85af3d064839beb40a82f933 in the git-p4 history, 2006-09-15) the other locales did include seconds, but since then they have not. However, the C locale retained its seconds. Since the C locale is used as fall-back for locales for which we have no data, this affects all such locales as well. Since the resulting short time format is, like its prior longer form, a sub-string of the long time format, the change doesn't affect the time_format_data[] or trigger any consequent changes to other rows of the main locale_data[] table. Only the C locale's own row changes, just shortening the substring it reuses. [ChangeLog][QtCore][QLocale] The C locale now, in line with all locales derived from CLDR data, omits seconds from its short time format. Fixes: QTBUG-140643 Change-Id: Ic5f181dc581c70a28afdd3f8f32b78190e818131 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* Mark QUnicodeTables as security-significant (= default)Marc Mutz2025-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | This component does not process external data, so it is not security-critical. Yes, the characters presented to its functions may come from external sources, but that's not different from, say, a QRect being parsed from -geometry. The fact that there is code that parses a -geometry into a QRect doesn't make QRect a data-parser, or security-critical. It's just container for the result, and so is QUnicodeTables: a container for char32_t-indexed properties. This accompanying qt_attribution.json confirms that this component is not security-critical. Task-number: QTBUG-135195 Pick-to: 6.10 6.8 Change-Id: I565bd885220c0282ce7fb801411f12a80052465f Reviewed-by: Ivan Solovev <[email protected]>
* QUnicodeTables: remove "wasm 64 packing trick"Marc Mutz2025-09-181-6/+0
| | | | | | | | | | | | | | | | | | | | | | | It is expected that this is no longer needed. The upstream issue¹ is closed since 2016-09-05 (nine years ago at this point; even though the work-around was added to Qt still two years after upstream was fixed). Amends e59ba35f1b1954062266164f7b802076dc152c7b (for the generator) and a2efb8d94bb8e860d8616f56c4f40e7c41eb3810 (for the generated file; squashed into 29c0377f07f4942f9957ea87d59c252148dc9e5b for the linear history) ¹ https://github.com/emscripten-core/emscripten/issues/4540 Task-number: QTBUG-66621 Task-number: QTBUG-69421 Task-number: QTBUG-74511 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I9b08792aa4f5f18240d9425c44fa7a88e63e27da Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Lorn Potter <[email protected]>
* QUnicodeTables: abstract access to Properties::casesMarc Mutz2025-09-181-10/+20
| | | | | | | | | | | | | | | | | | | This is in preparation for storing this information in a separate array to save space by removing the many duplicates in there. Pick to all active branches to have the same internal API going forward, even if we don't pick the storage optimization back as far. Qt 6.5 doesn't have QSpan, yet (not even as private API), but returning a reference to const std::array<.,4> will be an adequate replacement. To enable that without casting, convert `cases` from a C array to a std::array. For some reason, this requires extra parentheses, so add them. Task-number: QTBUG-139427 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I5331fd6d71a6a447b0445d8235b5eb8e38178e2e Reviewed-by: Thiago Macieira <[email protected]>
* util/unicode: remove properties(char16_t) declaration here, tooMarc Mutz2025-09-161-2/+0
| | | | | | | | | | | | Amends 772b62c91e27d357048a1d2ae1962b5901862e76. The amended commit removed the definition from both the generator and the generated code, but only removed the declaration from the generated code, not the generator. Pick-to: 6.10.0 6.10 Change-Id: I2f41aad9777a8c27f80edb9b7ef7a97e1871ffbb Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: split and trim in readUnicodeFile() to save repetitionMarc Mutz2025-09-091-51/+45
| | | | | | | | | | | | | | | | | ... in all the lambdas, which now receive a span<QByteArrayView> instead. Of course, this isn't a 1:1 move, but ports to QStringTokenizer and QVarLengthArray as a drive-by. Since everything is now QByteArrayView, we're now implicitly depending on QHash heterogeneous lookup, a Qt 6.8 feature, so mention that in the QT_VERSION check comment (just FYI; we've already required 6.9, anyway). Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ide6bcce5e1cd28c42f0091b5bcefb89d6278b6a9 Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: prepare qFatal()s for being passed viewsMarc Mutz2025-09-091-25/+47
| | | | | | | | | | | | | | | | ... instead of QByteArrays. Define a new qPrinableView(x) macro that expands to x.size(), x.data(), suitably cast so "%.*s" will accept it, then apply it to all strings printed in qFatal()s that might become views soon. As a drive-by, improve the (touched) messages by mentioning the line number and using "" to delimit variable output. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I82434f6c8522a84daf18367a8ab5cafb74453f1c Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* util/unicode: fix typoAhmad Samir2025-09-071-1/+1
| | | | | | | | Amends 44da6f996a6d687caa2d1692e4b6125f330ee3e5. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I175f1db4ef8ee40d83dabd9e352167df5ec840c4 Reviewed-by: Marc Mutz <[email protected]>
* QChar: micro-optimization: force inlining of qGetProp()Thiago Macieira2025-09-071-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | Clang was already doing it, but GCC (at least in LTO mode) wasn't and was repeatedly calling qGetProp(). This has the benefit that, in most cases, the input character whose property we seek is UTF-16, so dead code-elimination removes the extra branch - this can happen when QString functions go through the QChar front-end, like QChar::isSpace() or isSymbol(), which route through the char32_t overload. This forced inling allows us to remove the UCS2 overloads of qGetProp() and properties(), because the same const-propagation will apply to all but one of the places where UTF-16 code units were being compared. The 16-bit qGetProp() was only used in qstring.cpp's convertCase_helper(), whose 16-bit overload was only used in foldCase(). The one exception to this is qtextengine.cpp's QBidiAlgorithm::resolveN0(): const QUnicodeTables::Properties *p = QUnicodeTables::properties(char16_t{text[pos].unicode()}); This will now call the full UTF-32 overload. Pick-to: 6.10 Change-Id: Ifa4f2d77475877f26be2fffd9a987ff994dc8ef1 Reviewed-by: Edward Welbourne <[email protected]>
* util/unicode: add missing assertions on field countsMarc Mutz2025-09-051-0/+2
| | | | | | | | | | | | | | | Two functions indexed into the split() fields without first checking whether there are sufficiently many fields to index into. Add the missing Q_ASSERT()s. Yes, a qFatal() with line-number would be nicer, but all other functions do it like this, so I'm asking for forgiveness that I do it here, too. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ief054796f2e058a331037540bc2a633ec7f64f2c Reviewed-by: Edward Welbourne <[email protected]>
* util/unicode: remove replace() calls from remaining read*() functionsMarc Mutz2025-09-051-30/+15
| | | | | | | | | | | | | | | | | | | | | | | Some users of the split()ed value handled intervening whitespace already: - the first field is piped through parseHexRange(), which does - the second field was missing the trimmed() call before lookup. Added. All looked-up values are space-free (cf. resp. init*() functions), so that's enough, too. As a consequence, we can accept the lines by reference to const QByteArray now and, now that all lambdas have the same signature, change readUnicodeFile() from a template to a regular function taking qxp::function_ref callbacks. Amends a794c5e287381bd056008b20ae55f9b1e0acf138 (readEmojiData()) and the start of the public history (rest). Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I442855a183552aa90d24810023793e6464b18162 Reviewed-by: Edward Welbourne <[email protected]>
* util/unicode: createNormalizationCorrections(): remove replace() callMarc Mutz2025-09-051-3/+2
| | | | | | | | | | | | | | | | | | | | Some users of the split()ed value handled intervening whitespace already: - fields[0..1] are piped through parseHex(), which does - fields[2] is unused - fields[3] needs to be trimmed, so do that. As a consequence, we can accept the line by reference to const QByteArray now. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I60371820cd143b980c81a1077d9c3e34528f1830 Reviewed-by: Edward Welbourne <[email protected]>
* util/unicode: readEastAsianWidth(): remove simplified() callMarc Mutz2025-09-051-3/+1
| | | | | | | | | | | | | | | | | | | All users of the split()ed value handle intervening whitespace already: - fields[0] is piped through parseHexRange(), which does - fields[1] has trimmed() called on it before lookup and all idnaStatusMap values are space-free (cf. initIdnaStatusMap()) As a consequence, we can accept the line by reference to const QByteArray now. Amends 838a7a01f388673c45af2dd60bc38992de1a2a05. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I53247332c624a192fcaca6009a3f20cb8c65786a Reviewed-by: Edward Welbourne <[email protected]>
* util/unicode: readArabicShaping(): remove replace() callMarc Mutz2025-09-051-3/+1
| | | | | | | | | | | | | | | | | | | All users of the split()ed value handle intervening whitespace already: - fields[0] is piped through parseHexRange(), which does - fields[1] has trimmed() called on it before lookup and all age_map values are space-free (cf. initAgeMap()) As a consequence, we can accept the line by reference to const QByteArray now. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I1d371af33bc0b1c1b2bf28bbd3cbaf6820f8b4e8 Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: remove replace('_', "") from readScripts()Marc Mutz2025-09-051-50/+49
| | | | | | | | | | | | | | | | | | | | | | | For some reason, the code stored the official Unicode script tags without their intervening underscores, removing underscores from the input before attempting to match, which works, as long as Unicode stays consistent in spelling properties "Like_This". Relying on that is brittle, though, seeing as a tag without intervening underscore (SignWriting) already slipped into the database, potentially matching a sought Sign_Writing. It's highly unlikely that Unicode will start to use property names that differ only by their use of underscore, but why risk it, and why confuse readers of code by using a different sought string, compared to what's in the files? Fix by storing the tags unaltered and leaving the underscores in the input alone, too. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I5870a35812cb3fc0b28888cb09e9f42661684a26 Reviewed-by: Mårten Nordheim <[email protected]>
* util/unicode: use new parseHexList() in readIdnaMappingTable()Marc Mutz2025-09-031-12/+3
| | | | | | | | | | | | | | | | | | | | This one is straight-forward. As a drive-by, use QString::append(QStringView) instead of iterating over the result of QChar::fromUcs4(). It may not be faster, in fact, I expect it to be slower, but it's much nicer to read, and this tool doesn't need to be optimized. Since every field is now clearly handled by functions that can handle extra whitespace (the values looked up unsurprisingly are space-free, too), we can drop the simplified() call and take the QByteArray 'line' by cref. Amends 2afe1a3c19239da0a7bf4dd578b334d8ff6903b3. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Id8900367d774ec4a6dccb89f6be73984caac2701 Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: assert no mirrored pairs exist outside BMPMarc Mutz2025-09-021-0/+6
| | | | | | | | | | | | | | | QTextEngine implicitly assumes this (it's looking up mirrored characters in UTF-16 space, without first decoding surrogates). Add a comment there, too. Amends 7f504283ef44c35dfca7198a80742063a940fabd. Fixes: QTBUG-139456 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ie79b33907e71cc455434127c1752898c40b128f9 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* util/unicode: error out with a meaningful message if Qt is too oldMarc Mutz2025-09-021-0/+5
| | | | | | | | | | | | | | | | | The Qt version against which this tool is build need not be the same as the Qt version for which this tool generates code. The advantage is that we can use the latest Qt features in this tool without having to worry about compat with older Qt versions. We might also use C++20 here in the future. Instead of greeting prospective users of the tool with random compile errors, check the Qt version and #error out with a descritive message instead. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I2a153ee4eb6ca1a1ea7ece39c9872f3f6d746fcd Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: Extract Method parseHexRange()Marc Mutz2025-09-021-130/+29
| | | | | | | | | | | | Wrapping parseHexList(), which gets extended to support QLatin1StringView separators, add parseHexRange() and use it around the code to parse HHHHH[..HHHHH] hex ranges. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I0372e5c239642988f0e920d95108657e276b19dd Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: Extract Method parseHexList() from readSpecialCasing()Marc Mutz2025-09-021-30/+14
| | | | | | | | | | | | | | | | | | | This function, too, is duplicated all over the place, so centralize it. Also use modern parsing techniques, like QStringTokenizer instead of split() and QVarLengthArray instead of QList, that make the function much more efficient. Use it in readCaseFolding(), too, which is straight-forward. There are many more potential users of this function; I'll port them one by one in follow-up patches, though most are reading hex ranges, so I'll add a function for that next. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I545a22d65a3baeaa850a7d658dcf466d2284b0fa Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: Extract Method parseHex()Marc Mutz2025-09-021-47/+33
| | | | | | | | | | | | | | | | | | | | | | | | This code is used all over the place, so put it into a convenience function where we can arguably put in a bit of effort to optimize things, to wit: use QByteArrayView, and provide a better error message than inline code could afford. E.g. the LastValidCodePoint check was previously only in readUnicodeData(). For use in readUnicodeData(), add lineNo tracking. In readBidiLine(), we can now drop the replace(' ', ""), because parseHex() already trims. As a consequence, the lambda can take the QByteArray by cref now. There are many more places where this could be used, but they represent higher-level constructs for which I'll add higher-level helper functions. Amends the start of the public history. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ic8f59f6509da1a0deb47a46cfaf160abb20c067e Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: port appendToSpecialCaseMap() from QList to QSpanMarc Mutz2025-09-021-6/+6
| | | | | | | | | | | | | | | | | | | | | This makes the function independent of the actual input container being passed, allowing us to port from QList to QVarLengthArray step-by-step. In readUnicodeData(), this allows to pass the single-element case using initializer_list instead of a temporary QList. Amends the start of the public history (but, to be fair, QSpan wasn't available then). As with readLineInto() in a previous patch, QSpan is not available in Qt 6.5, but that's not a problem because this tool doesn't need to compile with the Qt version it is generating code for, so we can use Qt-latest. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I10039af9d5b82a3d23fec451bf051a868db4c343 Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: Extract Method readUnicodeFile()Marc Mutz2025-08-291-275/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's about a dozen files this program reads, and in each of these cases, the code to read the file line-by-line, remove comments (or just LF) and trim the line before further handling is duplicated. It's also very inefficient, we have better APIs these days (readLineInto(), rvalue *this overloads, truncate() instead of = left(), ...). Besides, as Mårten pointed out in review, trimmed() already removes the LF, so we don't need to do it manually. So Extract Method readUnicodeFile() that does that, coroutine-style (but with function object for now), from all the readX() functions (except readUnicodeData() itself, which is using nested readLine()s. Also maintain a line number for later improving the error messages. Remove some isEmpty() checks in the lambdas that, after the refactoring, can never be true (because removing whitespace from a trimmed() string cannot make the string empty, ditto with simplified()). The extracted function could even pre-split the line along `;`, but for that, I would port each lambda to use QByteArrayView / qTokenizer first. Picking to all active branches, because a) this is a tool and b) we continue to update the Unicode tables in all active branches, so the tool to do so should not differ, unless the target branch requires it (changed data structures, e.g.). Note that readLineInto() is not in 6.5, but the tool is not required to be built against the Qt version it is building tables for, so we can use the latest Qt features here. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I3b699f213c98baa45bc8bbdb7ae2ac985d893798 Reviewed-by: Mårten Nordheim <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: fix format errorMarc Mutz2025-08-291-1/+2
| | | | | | | | | | | | | | | | | | Says GCC: main.cpp:3232:33: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 3 has type ‘long long unsigned int’ [-Wformat=] 3232 | qDebug(" memory usage: %zu bytes", specialCaseMap.size() * sizeof(unsigned short)); | ~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | long unsigned int long long unsigned int | %llu Fix by using %llu and an explicit cast to qulonglong (for the case of 32-bit platforms), as usual. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Idd8c83f05880ad5e12311829d8375baaec376ac6 Reviewed-by: Ahmad Samir <[email protected]>
* util/unicode: fix pointless qPrintable(QByteArray)Marc Mutz2025-08-281-3/+3
| | | | | | | | | | | | | | | | QByteArray doesn't need qPrintable(), we can just pass it's data()/constData() to %s. Also, don't output the "destroyed" field values (replace("..", '.')), but the original ones. Amends 2afe1a3c19239da0a7bf4dd578b334d8ff6903b3 and 838a7a01f388673c45af2dd60bc38992de1a2a05. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I5eb819f74075c6d6aa8989b30615c7955a60155c Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]>
* QUnicodeTools: fix attibute location on properties() functionsMarc Mutz2025-08-271-2/+4
| | | | | | | | | | | | | | The Q_DECL_CONST_FUNCTION needs to be on the declaration to have any effect on callers, but it was only on the (out-of-line) definition. Amends 2fe90a61bdf16bb1a08817ba544e2309b524a052. As a drive-by, also remove the export macros from the definitions; they, too, are only needed on the declaration. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Id69b58c50440b8b835f7be7ba873927d07b11219 Reviewed-by: Edward Welbourne <[email protected]>
* util/unicode: make buildSuperstring() take input by rvalue refMarc Mutz2025-08-271-2/+2
| | | | | | | | | | | The function's docs state that the function may destroy the input, so let the signature reflect that. Amends ca1eeb23fa1daf541aa9b7d966981cb4a59071d1. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I3668887c97893e7114827819d8aaef7a0b3528ce Reviewed-by: Edward Welbourne <[email protected]>
* QChar::isSpace: optimize by lowering the upper limit checkThiago Macieira2025-08-191-2/+11
| | | | | | | | | | | | | | | | Of all the Category categories, separators are the only to currently have assigned codepoints exclusively in the BMP. This allows us to lower the maximum check from the LastValidCodepoint to category-specific one. This will also cause the compiler to dead-code eliminate the check inside of qGetProperty and emit only the BMP check of the property tables: if (ucs4 < 0x11000) return uc_properties + uc_property_trie[uc_property_trie[ucs4 >> 5] + (ucs4 & 0x1f)]; Pick-to: 6.10 Change-Id: I31eda5d79cc2c3560d90fffd74a546d1e7cda7bb Reviewed-by: Edward Welbourne <[email protected]>
* wasm: Properly separate lines in test outputPiotr Wiercinski2025-07-171-2/+3
| | | | | | Change-Id: I4b0365038d44ebab91e2b00df8c0b4dc7962bf14 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Morten Johan Sørvig <[email protected]>
* wasm: Introduce wasmdeployqtPiotr Wiercinski2025-07-163-174/+0
| | | | | | | | | | | | | | | | | | | Introduce wasmdeployqt which is analogous to other deployment tools that we currently have like "windeployqt" or "androiddeployqt". Running wasmdeployqt makes it much easier to deploy and ship dynamically linked WebAssembly applications. In case of statically linked applications this tool does not provide any extra value as static apps are ready to be shipped by default. This commit also removes older python scripts which were supposed to serve this same goal as well as some cmake machinery arround it. Fixes: QTBUG-134580 Change-Id: Ib5c8ab128f49897f91c510bfec03b0b772e6548a Reviewed-by: Morten Johan Sørvig <[email protected]>
* Remove year from Qt Copyright in REUSE.tomlLucie Gérard2025-07-092-4/+4
| | | | | Change-Id: I2d5ec5fa766857e49dfca84838847ecdba8a6545 Reviewed-by: Joerg Bornemann <[email protected]>
* cldr2qlocalexml/localetools: Open files as UTF-8Mårten Nordheim2025-07-032-3/+3
| | | | | | | | | | To avoid errors like: 'charmap' codec can't encode character '\u02bc' in position <x> Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-137782 Change-Id: I100485c14121e5ffad7b0106e617b7f0afd7822e Reviewed-by: Edward Welbourne <[email protected]>
* Add the Json schema for the modules.jsonCristian Le2025-06-262-2/+300
| | | | | Change-Id: Id2c821a9e0abd067a8eb66348baff0f2f657bd75 Reviewed-by: Alexandru Croitor <[email protected]>
* Add a qt module json file schema validator utilityCristian Le2025-06-261-0/+48
| | | | | Change-Id: I4f85cee9957c0c8cf001417a61b61a57d7041dba Reviewed-by: Alexandru Croitor <[email protected]>
* PSL update script: Change to use direct upstream sourceMårten Nordheim2025-06-231-28/+23
| | | | | | | | | | | | | | | | | | | The upstream "Public Suffix List" .dat file has gained a comment line with a "// VERSION:" field, so the work to extract a git SHA is not needed, nor is it canonical with their new versioning. Though they also embed the SHA from which the file originated, which we continue to use for the PURL. Furthermore the file now warns that any other source of the PSL other than the one from publicsuffix.org is "not guaranteed to be supported". So in this patch we move to use their canonical upstream http download: https://publicsuffix.org/list/public_suffix_list.dat Pick-to: 6.10 6.9 6.8 6.5 5.15 Task-number: QTBUG-137782 Change-Id: I50ec8ed6a55738560d9108ad08517c243c1bb518 Reviewed-by: Alexandru Croitor <[email protected]>
* Update CLDR to v47Mårten Nordheim2025-06-191-2/+16
| | | | | | | | | | | | | | Some of the changes required updating the tests. Like spanish separators and (English,France) now returning France instead of United States for territory. [ChangeLog][Third-Party Code] Updated CLDR data, used by QLocale, to v47. Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-137782 Change-Id: Ic939666b9718d59ab28c51f65ac38cf84b97bf93 Reviewed-by: Ivan Solovev <[email protected]>
* PSL update script: Update pick-to branchesMårten Nordheim2025-06-191-1/+1
| | | | | | | | | Not picking back because prior branches should not be picking forward. Task-number: QTBUG-137782 Change-Id: I371f393c416b3be93eedb949bb2c78cab284c4f5 Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Marc Mutz <[email protected]>
* wasm: Fix Brotli compression in qtwasmserver.pyPiotr Wiercinski2025-03-263-17/+4
| | | | | | | | | There is not compress() function in brotli.Compressor API. Use process(). Use requirements.txt instead of Pipfile. Change-Id: I55a0263f16f36bcb4b96e443f85925b7d5dd15af Reviewed-by: Morten Johan Sørvig <[email protected]>
* qtwasmserver to serve assets from the provided path parameterJuha Vuolle2025-03-071-2/+10
| | | | | | | | | | | | | | | | qtwasmserver accepts a positional path argument which tells where to serve the assets from. The argument wasn't actually used, and this resulted in always using the cwd. In addition add a check for the path directory existence. Otherwise this becomes only visible as a 404 Not Found error. Amends: 156e5c8b690d01ad3043d2163168c4ea3608a046 Pick-to: 6.9 Fixes: QTBUG-134393 Change-Id: Iacfafe8a2fb2409169b09a17dbc9ffed0ad16fdf Reviewed-by: Morten Johan Sørvig <[email protected]>
* CMake: Remove pro2cmake and configurejson2cmakeAlexandru Croitor2025-02-1159-10603/+0
| | | | | | | | | | | | | | | | Most qt repos and modules are now ported from qmake to CMake. The CMake API for internal Qt modules has evolved, and these tools have not been kept up-to-date. It's time to remove them. Developers can still use qmake2cmake for their own user projects, which is hosted in a different repo. If we do end up needing the scripts again, they can be used from one of the older branches like 6.9. Fixes: QTBUG-133678 Change-Id: I8d9a765f2575a6c0fcfe9a0346a06a7eec302914 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* Update UCD to Unicode 16.0.0Mårten Nordheim2025-02-1018-9299/+15408
| | | | | | | | | | | | | | | | | | | | | | | | They added some new scripts. There were a few changes to the line break algorithm, most notably there is more rules that require more context than before. While not major, there was some shuffling and additions to our implementation to match the new rules. IDNA test data now disallows the trailing dot/empty root label, technically to be toggled off by an option that controls a few things, but we don't have options. For test-data they changed the format a little - "" is used to mean empty string, while a blank segment is null/no string, update the parser to read this. [ChangeLog][Third-Party Code] Updated the Unicode Character Database to UCD revision 34/Unicode 16. Fixes: QTBUG-132902 Task-number: QTBUG-132851 Pick-to: 6.9 6.8 6.5 Change-Id: I4569703659f6fd0f20943110a03301c1cf8cc1ed Reviewed-by: Edward Welbourne <[email protected]>
* Add terminal rows to various QtTimeZoneLocale tablesEdward Welbourne2025-02-101-4/+12
| | | | | | | | | | | | | | This fixes some read-past-end issues in assertions that verify the next row of a table after the last for a specific locale belong to a later locale. Since those assertions happen without sight of the table of which the locale's range is a part, they can't tell when the range's end is in fact the table's end - so they shouldn't have been reading from a row there. Fix by putting a row there, that belongs to a nominal locale with index out of range. Pick-to: 6.9 Change-Id: Ib9d227ca4f86c372c13f963a08a8d637eae63ed0 Reviewed-by: Ivan Solovev <[email protected]>
* Unicode tool: use unsigned values for the bitfieldsMårten Nordheim2025-02-041-4/+4
| | | | | | | | | | On MSVC the values stored end up as negative. Task-number: QTBUG-132902 Pick-to: 6.9 6.8 6.5 Change-Id: I963c57c34479041911c1364a1100d04998bdfaed Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* Unicode tool: print values using portable typesMårten Nordheim2025-02-041-2/+2
| | | | | | | | | | ssize_t is not universal; fails to compile in Windows. Task-number: QTBUG-132902 Pick-to: 6.9 Change-Id: I4b8f45cba32202329ac085c7caa0a8c19a11c621 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>