Commit Graph

56585 Commits

Author SHA1 Message Date
Thiago Macieira
e390ff050a QFileSystemEngine/Win: simplify code
We don't need two or even three buffers for the current directory. In
the worst case, we had a 260-byte buffer on the stack, a larger one on
the heap (new[]/delete[]) and then a copy of it in QString.

Now, we shall have only one and it could be "gifted" to QFileSystemEntry
via std::move() (requires separate patch to take the QString by rvalue-
ref).

Pick-to: 6.3
Change-Id: Ibcde9b9795ad42ac9978fffd16f2bb2a443697d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-05-30 15:55:35 -07:00
Thiago Macieira
e21522b8bf QFileSystemEngine/Win: fix incorrect buffer size in currentPath()
We've just allocated a buffer of 'size' size, which is bigger than
PATH_MAX, but told GetCurrentDirectory() that its size is PATH_MAX.

Fixes: QTBUG-103852
Pick-to: 5.15 6.2 6.3
Change-Id: Ibcde9b9795ad42ac9978fffd16f2ba2cd8712cb7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-05-30 15:55:33 -07:00
Laszlo Papp
51ac14a4f7 Drag and Drop: Fix the broken XDND protocol link
Change-Id: I74b985d9198223891bb977e367f1265bfc148f95
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-05-30 20:57:51 +01:00
Topi Reinio
7ecbac21ff Doc: Link to page documenting Qt trademarks in the copyright footer
Use an unversioned link to the online documentation, ensuring we
link to the latest version of this page.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102787
Change-Id: I285356687a3873fb861a54d003185f2b751c1b72
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-05-30 21:33:07 +02:00
Kai Köhne
d9b9cded92 Doc: Fix documentation for vulkan licenses
[ChangeLog][Third-Party Code] Vulkan API Registry is available not only
under MIT License, but also Apache License 2.0. Make this explicit in
the license documentation.

Pick-to: 6.2 6.3
Change-Id: I6f07a7970319aef0a26f291de1eff7c316195802
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-05-30 21:20:19 +02:00
Mårten Nordheim
50cff232ce Remove mentions of SSL 3 in documentation
And some s,SSL,TLS, in the same paragraphs.
Changing SSL to TLS in the whole codebase looks odd given classes are
still called QSsl*, but may be worth considering at some point.

Pick-to: 6.3 6.2
Change-Id: I06dfcd99c1f6ac9e029e1914363344b3705d871f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-05-30 19:46:14 +02:00
Albert Astals Cid
f5f8c2cbe1 QSlider::mouseMoveEvent: Remove code that does nothing
Change-Id: If3aea2559051564916e00d8d13fa195fa88e1bab
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-05-30 16:57:22 +02:00
Bartlomiej Moskal
5398eb55ed Android: Extend make_apk target with the sign option
Commit contains the new QT_ANDROID_SIGN_APK variable. It extends
*make_apk target by signing the package with the specified key.

For key setup these environment variables must be set:
    - QT_ANDROID_KEYSTORE_PATH
    - QT_ANDROID_KEYSTORE_STORE_PASS
    - QT_ANDROID_KEYSTORE_ALIAS
    - QT_ANDROID_KEYSTORE_KEY_PASS

Task-number: QTBUG-97107
Change-Id: If42c74298c1b385889b32517ab7f1f5b0628b487
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-05-30 16:27:38 +02:00
Joni Poikelin
296c3776a8 Remove unnecessary dependency to OpenGL
The example does not use OpenGL in Qt6 anymore so the dependency is not
necessary.

Change-Id: I6189a93eb65bd283ea7e85664582ab0b12a41639
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-05-30 11:03:19 +03:00
Giuseppe D'Angelo
f69005687c QMap: remove more docs referring to multiple values for the same key
Such semantics have been dropped from Qt 6.

Change-Id: I12f3478833afafa34f9075faf9ed030d06cd86f9
Pick-to: 6.2 6.3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-29 13:44:10 +02:00
Laszlo Papp
ee61ea399b QOpenGLWidget: Fix a typo in the public documentation
Change-Id: I964f5c6a8901bf93e5e3a5afb33cb456217caf39
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-05-27 22:47:28 +01:00
Thiago Macieira
23184fb6cd qglobal.h: use the GCC attribute for nothrow in C mode
There's exactly one use in Qt: the qVersion() function.

Change-Id: Ieb9a2aa1ea914b1b956bfffd16eff4b3b9e2119a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-27 14:12:07 -07:00
Thiago Macieira
d02e1eaae0 qglobal.h: reorganize and simplify the C++11 keyword macros
For the C side, I don't think any of the constexpr macros have ever been
in use, but I'm leaving them.

Change-Id: Ieb9a2aa1ea914b1b956bfffd16eff47db2d26e4e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-27 14:12:07 -07:00
Thiago Macieira
50fc00e489 qglobal.h: remove superfluous C++11 check from Qt 5.6
Superseded by the C++17 check in qglobal.h applicable to 6.0, but only
added for 6.2 (commit 647c0e80ed).

Change-Id: Ieb9a2aa1ea914b1b956bfffd16effa512e6f1e4a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-27 14:12:07 -07:00
Volker Hilsheimer
31f98957cf Add compile-time generation of JNI class names
As with method signatures, register class names using template function
specialization in the QtJniTypes namespace, and then declare C++ types
as JNI classes with a class name string. Such classes implicitly get
registered as JNI types as well.

Add a QJniObject construct method (since C++ constructors that are
templates cannot be explicitly instantiated with a type), and a
QJniEnvironment::findClass overload.

Add test coverage, also for the recently added macros for native
methods.

As a drive-by, change the name of the Q_JNI_DECLARE_NATIVE_METHOD
macro to Q_DECLARE_JNI_NATIVE_METHOD for consistency.

Change-Id: Ic19562d78da726f202b3bdf4e9354e8ad24d8bd9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-05-27 22:27:13 +02:00
Paul Olav Tvete
9614f4d434 Make it possible to create QTextureFileData from images
Currently it is only possible to create a cube map texture from a single
compressed texture file. In many cases, the cubemap asset is available
as a set of individual image files. Making it possible to use these
images directly will make the development process more efficient, and
will reduce the size of the assets needed to be shipped with demos and
examples.

Task-number: QTBUG-103191
Change-Id: Icd12548e2dab55ec2123804cb28353cbf29926ce
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-05-27 20:54:44 +02:00
Ville Voutilainen
5431b40ee8 Avoid some new clang 14 warnings on Android NDK 24 build
Task-number: QTBUG-99663
Change-Id: I1aa408ba468342e2fac2323ae91ff650b871c563
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-27 17:28:37 +03:00
Volker Hilsheimer
fb9b452f18 Fix documentation that claims that QStyleHints is read only
Most properties are, but some properties (such as useHoverEffects or
showShortcutsInContextMenus) can be set by the application.

Pick-to: 6.3 6.2
Change-Id: Ia6e0563a892f26456d595026f6c82502a9e888da
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2022-05-27 16:10:22 +02:00
David Skoland
1a0eb4fa01 Adjust installing and running wasm-testrunner
Added a small helper function that also installs the script to
prefix builds. Additionally, leveraging the cmake option
CROSSCOMPILING_EMULATOR for the testrunner fits neatly in the rest
of our cmake code.

Change-Id: I75288e97c81b250ac3997f2e7a22bc7bd82b7b69
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-05-27 14:50:17 +02:00
Lorn Potter
e3757df526 wasm: update emscripten to 3.1.10
Qt 6.4 will require Emscripten 3.1.10

Change-Id: I34d6288489b6674f6fd75134dd1855ae931c79c2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-05-27 17:46:29 +10:00
Iikka Eklund
a536734b9c Conan: Fix how conans.model.options.PackageOption value is evaluated
The default value None returned by tools.get_safe is not the Python's
built-in None value. The value returned by tools.get_safe() is wrapped
into conans.model.options.PackageOption and to check against 'None'
it needs to follow pattern:

  if not <value>:

Pick-to: 6.3
Change-Id: Idacfdde92958a46d399246239d12cd887916c4f1
Reviewed-by: Toni Saario <toni.saario@qt.io>
2022-05-27 07:17:21 +03:00
Yuhang Zhao
42fe677584 Core: make CLDR data constexpr
Task-number: QTBUG-100485
Pick-to: 6.3 6.2
Change-Id: Ib8c5160ca0994662a5fdc2293dc734c1bdcac4f2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-27 09:33:28 +08:00
Marc Mutz
fda8eb1741 Optimize QThreadPrivate::addObjectWithPendingBindingStatusChange()
... and bindingStatus()

QBindingStatus* is the final state of the value chain in
m_statusOrPendingObjects, so we can use the Double-Checked Locking
Pattern to avoid locking the mutex when we already have a status - it
won't go away again, unlike the vector in the List state.

To enable the change, make the data member an atomic<>. All loads and
stores can continue to use memory_order::relaxed, except the loads of
a potential status, which have to acquire, and the store of the
status, which has to release. This creates the necessary
synchronizes-with relation. So even though we synchronize out of
middle of the mutex critical section in QThread::exec() this way,
there's no data race between QThread::exec() and a potential
bindingStatus() call.

Change-Id: I0e0b7bd305649fa5f56a0f8723fb75f2577b90dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-26 16:43:11 +00:00
David Faure
09c7457f4a QTextDocument: add setLayoutEnabled()
This allows to set up everything first - without paying for the layout
calculation at every step - and only then trigger the layout once.

Results:
 0.065 msecs to create a QGraphicsTextItem with some text (layouted)
 0.036 msecs to set everything up in a QGraphicsTextItem with 0 width

Change-Id: I138bd1d58941d029bc0a36d2730216778f1fbd97
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-05-26 16:58:42 +02:00
Volker Hilsheimer
2996ca031e macOS: create application menu as QCocoaNSMenu with delegate
This way we can handle keyboard shortcuts for actions in that menu as
well in our menuHasKeyEquivalent implementation. This allows the focus
widget to accept the override, and e.g. a QKeySequenceEdit to record
Cmd+Q which with a plain NSMenu will just quit the application.

Pick-to: 6.3 6.2
Fixes: QTBUG-103590
Change-Id: I84597307aef8f0ab65d97d78e5aa15e5cf2e707d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-05-26 12:44:22 +02:00
Allan Sandfeld Jensen
734c9f2df2 Expand QColorTransform
Add comparison operators and an isIdentity() method to detect (1-1)
transforms.

[ChangeLog][QtGui] Added QColorTransform::isIdentity() method. Added QImage::colorTransformed() transitive method.

Change-Id: I5fbcd14e75f2179e43e94e8c5f42cd0a5600790b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-05-26 09:06:45 +02:00
Yuhang Zhao
34c21d0407 Core: make Unicode Database constexpr
Task-number: QTBUG-100485
Pick-to: 6.3 6.2
Change-Id: I41480a34b14fd86a68a5c10b7e0f3d250e785d0f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-26 12:42:36 +08:00
Yuhang Zhao
182ac2ced4 Fix Windows display version
The "ReleaseId" key's value stopped updating since
Windows 10 20H2, so we should query the new "DisplayVersion"
key when running on Windows 10 20H2 and onwards.

Change-Id: Ifaa8287f9812126bde0390337af0cda23ff8e529
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-05-26 09:26:10 +08:00
Allan Sandfeld Jensen
f4b7401cdb Add test of QColorTransform
Before it was only tested indirectly as part of the qcolorspace
tests. This also fixes a rounding for maximum RGB64 values.

Pick-to: 6.3
Change-Id: I6106e662c0f9d00c0b3a0c13213cb051ea39e14e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-05-26 02:08:38 +02:00
Thiago Macieira
fdd7227c67 CMake: Test the linker too for -mno-direct-extern-access
The GNU binutils ld linker needed a patch after the tagging of 2.38 to
make the new feature work. Before this patch, the linker will fail to
link when protected visibility symbols are used in the library, so don't
enable the feature unless the linker is recent enough.

GNU binutils gold from that version passes this test.

LLVM lld is unknown (I didn't test), but LLVM was consulted in
developing the feature.

Fixes: QTBUG-103493
Change-Id: Ibcde9b9795ad42ac9978fffd16f1c80ca20953ff
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-25 16:29:31 -07:00
Thiago Macieira
845491ed3b QFileSystemModelPrivate: de-inline ctor and dtor
This class is dllexport'ed and has members that refer to classes that
are only forward-declared in the header (such as QRegularExpression,
used in std::vector). GCC and MSVC appear to emit the destructor at the
point where it is used, which I guess is the vtable, which probably
means where the constructor was inlined because I don't see any virtual
overrides. Clang (at least in the form of ICX) appears to emit it at the
class declaration point.

C:\Qt\qt-everywhere-src-6.3.0\qtbase\src\gui\itemmodels/qfilesystemmodel_p.h(94,20): note: in instantiation of member function 'std::vector<QRegularExpression>::~vector' requested here
class Q_GUI_EXPORT QFileSystemModelPrivate : public QAbstractItemModelPrivate
                   ^
C:\Qt\qt-everywhere-src-6.3.0\qtbase\src\gui\itemmodels/qfilesystemmodel_p.h(94,20): note: in implicit destructor for 'QFileSystemModelPrivate' first required here
C:\Qt\qt-everywhere-src-6.3.0\qtbase\src\gui\itemmodels/qfilesystemmodel_p.h(94,7): note: due to 'QFileSystemModelPrivate' being dllexported

Fix by defining both the default ctor and the dtor out-of-line.

Task-number: QTBUG-45582
Fixes: QTBUG-103605
Pick-to: 5.15 6.2 6.3
Change-Id: I77c8221eb2824c369feffffd16f08ee39004a825
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-25 22:42:26 +00:00
Friedemann Kleint
613b52bfee uic: Fix string list properties for Python
Use the opportunity to modernize the code to use an
initializer list instead of stream operators.
This then makes it easier to generate a comma-delimited
list that works for Python as well.

Fixes: PYSIDE-1942
Change-Id: I5291b55bd0685e06ad62e52c7ebccffce98e9c23
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-26 00:11:40 +02:00
Marc Mutz
1e39b86bdc Short live q20::remove_cvref{,_t}!
C++20 added this as a more light-weight alternative to std::decay.

Task-number: QTBUG-103739
Change-Id: Icbb973d9500a0d1425859f8f104b7aef1ec917f1
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-05-26 00:11:40 +02:00
Marc Mutz
e61b7574e0 q20functional.h: transitively include <functional>
We don't want to require users to say

  #include <functional>
  #include <q20functional.h>

because that would leave duplicated <functional> includes after a
mechanical s/q20functional.h/functional/. Mechanical transformation is
the major design goal of the qNN namespaces, so fix this before we use
the header in ever more places.

Pick-to: 6.3
Change-Id: Id258c36a042214f41b737fb7ab60906cc8e76ca6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-05-26 00:11:40 +02:00
Giuseppe D'Angelo
e4f2f0e125 QMap: fix values() documentation
The body was still referring to the Qt 5 QMap where the same key could
be mapping to multiple values. That's no longer the case in Qt 6.

Change-Id: Idb1786ac45f328c318878fa52bf5d43d79c0178a
Pick-to: 6.2 6.3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-05-25 22:23:39 +02:00
Shawn Rutledge
f53e4b5860 doc: cross-link markdown functions in QTextDocumentFragment, QTextCursor
Followup to 7c76064604

Task-number: QTBUG-76105
Change-Id: I15ec22fb2bb40dc7b0f6f685cb2dc77a08c89918
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-05-25 20:14:34 +02:00
Tor Arne Vestbø
057cce5e85 macOS: Add private API to ensure that a process is responsible/disclaimed
Useful for tests that request permissions and need to ensure these
are requested on behalf of the app itself, and not its parent process,
regardless of how it's invoked.

Change-Id: Iac493e95440a3a04df4fa466c1d700ba1233e393
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-05-25 16:49:59 +02:00
Fabian Kosmale
c46ee7df57 QStringConverter: Do not crash if invalid
Attempting to use an invalid QStringConverter would so far have resulted
in a crash, as we would dereference the null iface pointer.
Fix this by inserting adequate checks, and ensure that hasError returns
true if we attempt to en/decode with an invalid converter.

Pick-to: 6.2 6.3
Change-Id: Icf74bb88cd8c95685481cc0bd512da99b62f33e6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-05-25 16:38:35 +02:00
Laszlo Papp
d83441340c QKeySequence: Add missing modifier names
The issue is that when someone is trying to use the following code:

QKeySequence keySequence(Qt::Key_Shift);
qDebug() << keySequence.toString();

This will print seemingly gibberish output. It is unicode in practice. For
Qt::Key_Shift, this would be: "�_@\uDC20"

The reason why this is happening is because we have platform-specific ways to
handle this due to Mac glyphs which are not available on Linux or Windows. This
works fine on Mac.

But for the Linux and Windows codepaths, there is not really any mapping like
for other keys. It seems that modifiers were left out.

The solution is to simply amend the list of mapping from these modifier key
codes to raw strings for Linux and Windows like it is done for other key codes.
So, now, modifiers will also be included in the list.

So, the expected output will be generated for the above code, as: "Shift".

[ChangeLog][QtGui][QKeySequence] Added missing modifier names

Fixes: QTBUG-69715
Fixes: QTBUG-40030
Change-Id: I460d54bc8e593b350ff95894f23c5b4a7c819a44
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-05-25 13:00:02 +00:00
Thiago Macieira
121ddac2ed tst_qpainter: change the FP exception block-list to a pass-list
We should prefer to test this unless we know it won't work, but this is
very hardware and implementation-dependent anyway. So I declare that
we'll only guarantee FP exception cleanliness on a best-effort basis for
a few platforms.

The notable difference in this commit is the removal of QNX. I don't
know why it began producing an FP exception with one of my changes, but
since the toolchain isn't public, I can't debug and will not devote any
time to figuring it out. If users of QNX require this, then someone with
interest in that OS will need to spend time after my changes integrate.

Change-Id: Ibcde9b9795ad42ac9978fffd16f1cb9c03a0ff66
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-05-24 23:42:53 -07:00
Ievgenii Meshcheriakov
0e64d97cc1 tst_qtextboundaryfinder: Remove full copies of data files
There are no commented out test cases remaining, so the normal
test vectors are identical to full test vectors.

Fixes: QTBUG-97537
Pick-to: 6.3
Change-Id: I987f178f192e1c8e2d998d36499fdce84f237e77
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:43 +02:00
Ievgenii Meshcheriakov
4d4d8dac94 QUnicodeTools: Fix line breaking before open parentheses
UAX #14, revision 45 (Unicode 13) has changed rule LB30 to only
trigger if the open parentheses is non-wide:

    (AL | HL | NU) × [OP-[\p{ea=F}\p{ea=W}\p{ea=H}]]

This fixes the remaining 24 line break tests.

Task-number: QTBUG-97537
Pick-to: 6.3
Change-Id: I9870588c04bf0f6ae0a98289739bef8490f67f69
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:43 +02:00
Ievgenii Meshcheriakov
838a7a01f3 Unicode: Extract EastAsianWidth property
This property is needed to properly implement the line breaking
algorithm from UAX #14.

Task-number: QTBUG-97537
Pick-to: 6.3
Change-Id: Ia83cc553c9ef19fae33560721630849d2a95af84
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:43 +02:00
Ievgenii Meshcheriakov
40b4ad1866 QUnicodeTools: Fix line breaking for potential emojis
Implement part of LB30b introduced by UAX #14, revision 47
(Unicode 14.0.0):

    [\p{Extended_Pictographic}&\p{Cn}] × EM

This fixes one line breaking test.

Task-number: QTBUG-97537
Pick-to: 6.3
Change-Id: I3fd2372a057b7391d8846e9c146f69a54686ea61
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:42 +02:00
Ievgenii Meshcheriakov
08d2ae411f QUnicodeTools: Fix interactions of WB3d and WB4 rules
Word breaking rule WB3d should not be affected by WB4.

This fixes the remaining word break test.

Task-number: QTBUG-97537
Pick-to: 6.2 6.3
Change-Id: I99aee831d7c54fafcd2a9d526a3e078b12c5bfad
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:42 +02:00
Ievgenii Meshcheriakov
c63cdbdc43 QUnicodeTools: Handle WB3c word break rule
Adjust handling of WB3c rule to UAX #29, revision 33 (Unicode 11.0.0).

The rule reads:

    ZWJ × \p{Extended_Pictographic}

This fixes 9 word break tests.

Task-number: QTBUG-97537
Pick-to: 6.2 6.3
Change-Id: I818d4048828e6663d5c090aa372d83f5099fdffe
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:42 +02:00
Ievgenii Meshcheriakov
1a26719c54 Unicode: Remove obsolete word break classes
Remove E_Base, Glue_After_Zwj, E_Base_GAZ, and E_Modifier obsoleted by
UTS #29, version 33 (Unicode 11.0.0).

Task-number: QTBUG-97537
Pick-to: 6.2 6.3
Change-Id: If5dc36ae17cd8746bbe81b73bbcc0863181e4a7a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:42 +02:00
Ievgenii Meshcheriakov
79d26ef3ae QUnicodeTools: Adjust properties of WSegSpace word break class
Disable break between sequences of WSegSpace characters (rule WB3d,
introduced in UAX #29, version 33, Unicode 11.0.0). Also disable breaks
between WSegSpace and (Extend | Format | ZWJ) due to rule WB4.

Adjust "words4" test to take the above changes into account (space
character belongs to WSegSpace).

Mention the full class name in a comment inside the word break table.

This fixes 34 word break tests.

Task-number: QTBUG-97537
Pick-to: 6.2 6.3
Change-Id: I7dfe8367e45c86913bb7d7fe2adb053711978487
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:42 +02:00
Ievgenii Meshcheriakov
9a831bdf54 QUnicodeTools: Fix handling of LB22 line break rule
This rule was simplified in version UTS #14 version 45 (Unicode 13.0.0)
to read:

    × IN

Re-enabled 28 fixed line break tests.

Task-number: QTBUG-97537
Pick-to: 6.2 6.3
Change-Id: I1c5565a8c1633428c22379917215d4e424ff0055
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:42 +02:00
Ievgenii Meshcheriakov
2312973a86 QUnicodeTools: Remove ZWJ data from the line break table
ZWJ is handled separately by rule LB8a. The code for rule LB10 was
adjusted to handle ZWJ as AL as required by the specification.

Task-number: QTBUG-97537
Pick-to: 6.2 6.3
Change-Id: I814cbb4a26f2994296767cca0443d8a1a1aaf739
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:42 +02:00