Commit Graph

56564 Commits

Author SHA1 Message Date
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
Ievgenii Meshcheriakov
92d340ed1c QUnicodeTools: Fix handling of ZWJ for line breaks
Adjust implementation of rule LB8a of UAX #14. The rule was changed
in version 41 (corresponding to Unicode 11.0.0):

     ZWJ × (ID | EB | EM) ⇒ ZWJ ×

Fixing this rule fixes 9 line break tests. Those are re-enabled.

Task-number: QTBUG-97537
Pick-to: 6.2 6.3
Change-Id: I1570719590a46ae28c98ed7d5053e72b12915db7
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-24 23:07:41 +02:00
Volker Hilsheimer
d1d75f3b72 Refactor if-else snake into switch statement
Change-Id: I597d5cbdddf4a2fbbe8b9de2ae252cdeadce9d11
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2022-05-24 22:11:51 +02:00
Laszlo Agocs
ba7a3b8d4a Make sure the correct context is current when invoking resizeGL
After the 6.4 changes for QRhi-based compositing in widgets there
is now a good chance that a different context is current after
recreateFbo in case it actually created a new texture and fbo.
This is not great if we immediately call resizeGL() afterwards
since the contract for the reimplementable functions is that
the QOpenGLWidget's context is current. Make sure this contract
is followed.

Fixes: QTBUG-103319
Change-Id: I59a5fa9500df34b86787927e1114d0a80297678a
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-05-24 20:20:02 +02:00
Laszlo Agocs
34defa095a rhi: Fix texture format doc typo and rephrase
Change-Id: Ica4cc0fcea642eccfff7b53a65e7d1a428fd4dad
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-05-24 20:20:02 +02:00
Eirik Aavitsland
cc42d90eb4 Enable text layout drawing on coordinates outside QFIXED_MAX
In an earlier commit, painting on such coordinates was rejected, since
it would overflow the internal calculations using QFixed. Instead,
avoid the overflow by translating the painter to avoid the huge
coordinate values.
Also reduce the max value somewhat, so that pos stays well away from
QFIXED_MAX, to avoid overflows in the other QFixed variables that have
values offset from pos.

Fixes: QTBUG-103745
Pick-to: 6.3 6.2
Change-Id: Iebdec32bed57fe8e65551c7d278da9fd6c041b37
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-05-24 20:20:01 +02:00
Fabian Kosmale
718d680579 Fix race conditions in moveToThread
Amends ba6c1d2785, which made
m_statusOrPendingObjects already atomic, but did not handle concurrent
deletion/push_back of the pendingObjects vector correctly.

We use the existing lock in QThreadPrivate to prevent data races.

Pick-to: 6.2 6.3
Fixes: QTBUG-101681
Change-Id: I0b440fee6ec270d762e6700a4fe74f28b19e75e8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-24 18:15:41 +02:00
Eskil Abrahamsen Blomfeldt
1221cd1f1b Update qt_attribution for harfbuzz
Amends d88da0b2b0 where I forgot
updating the attribution.

Note that the original change was never picked to 6.2 after all,
since that is on an even older version of Harfbuzz, therefore this
one is only picked to 6.3. Given the phase 6.2 is in, I decided it
was better to leave it, since it didn't get the 3.0.0 update either.

Pick-to: 6.3
Task-number: QTBUG-103603
Change-Id: Ie323d931b49158776c2b9fcc4835b69ca4e2f905
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-05-24 15:05:44 +02:00
Thorbjørn Lund Martsum
344e4cb9be Fix QWidget::metric to use widget screen dpr instead of app-dpr
Use the widget screen dpr in calculations rather than
qApp->devicePixelRatio(). The screen may have been
directly set (without the window handle being initialized)

Task-number: QTBUG-103309
Task-number: QTBUG-49663
Task-number: QTBUG-101947
Task-number: QTBUG-102982
Change-Id: I2af2073640b171baf68575e3bc93b29b6a9a471d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-05-24 08:06:32 +02:00
Morten Sørvig
8e15aeee76 wasm: move CTRL <-> META comment into right place
Change-Id: I9f95542fd6a0326985744503a71e36448961d6fc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-05-24 03:10:10 +02:00
Morten Sørvig
e3b3c77d0e wasm: Improve wheel event handling
Always invert scroll deltas. This is what the code did
before, expect for on non-Safari macOS. There is no
need any "smart" code here: correct deltas are provided
by the native API regardless of macOS scroll direction
setting.

Reading webkitDirectionInvertedFromDevice is still useful
for certain use cases, such as 3D scene zooming or spinbox
value change, where upwards motion on the trackpad should
always correspond to "increment" regardless of scroll direction.
Propagate this to Qt using one of the handleWheelEvent()
overloads

Finally, we were sending pixel deltas as angle deltas;
fix by sending pixel deltas as well, but keep existing
angle delta behavior for compatibility.

Change-Id: I7a7104c30da057fefc0377816e551a9e7e2fa0e7
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-05-24 03:10:10 +02:00
Morten Sørvig
ff59343490 wasm: remove debug code
Accidentally added with commit d4905016.

Change-Id: Ie896dc79218f5778be552114d9e896fea8c80ed8
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-05-24 03:10:10 +02:00
Morten Sørvig
69ad72b05c wasm: use correct geometry when drawing window decorations
We were drawing window decorations at an incorrect location in
cases where the QScreen was not at (0,0) (i.e. at an offset on
the web page). Window content was placed correctly.

Correct canvas geometry can be fond by offsetting window geometry by the
negative screen position. Implement this for drawWindowDecorations(), and
also simplify the existing code in drawWindowContent().

Change-Id: I1347d325a58dae5e2bb950b93902123f64199ee8
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-05-24 03:10:10 +02:00
Morten Sørvig
af59c56dc1 wasm: update m_normalGeometry on setGeometry()
If we don't do this then applyWindowState() will apply the
original window geometry from QWasmWindow::initialize().

Change-Id: I4a0fb7aa7984ba21c64364e0bf00d70513232d5d
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-05-24 03:10:10 +02:00
Ivan Solovev
576730f599 QAuthenticator: allow to set custom SPN for Windows client
A new option is added for SPNEGO/Negotiate authentication with
SSPI backend to customize the SPN that is used during the procedure.

Fixes: QTBUG-88869
Change-Id: If034ef451a61593445d8e79e7f82b9d3610ed653
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-05-24 03:10:10 +02:00
Thiago Macieira
f569acd6ae tst_QStringConverter: roll up independent tests to rows in others
Simplifies the test a little.

Pick-to: 6.3
Change-Id: I77c8221eb2824c369feffffd16f0a7fc44215aaf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-05-23 14:53:18 -07:00
Thiago Macieira
30721c3d03 tst_QStringConverter: implement the TODO of testing with flags
Pick-to: 6.3
Change-Id: I77c8221eb2824c369feffffd16f0a7e428b23fb6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-05-23 14:53:18 -07:00
Thiago Macieira
aef27c5aa2 tst_QStringConverter: improve the char-by-char UTF-8 testing
The utf8.txt file was only 21 bytes and contained exactly two non-ASCII
characters. It wasn't very good.

This commit brings back the UTF-8 test rows that existed before commit
18ec53156e deleted tst_Utf8. There's a lot
of overlap with some of the other rows in this test, though.

Pick-to: 6.2 6.3
Change-Id: I77c8221eb2824c369feffffd16f094619b69faef
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-05-23 14:53:18 -07:00
Thiago Macieira
9bad4be214 QStringConverter: use the QUtf8 codec when Windows is using UTF-8
The QLocal8Bit implementation assumes that there's at most one
continuation byte -- that is, that all codecs are either Single or
Double Byte Character Sets (SBCS or DBCS). It appears to be the case for
all Windows default codepages, except for CP_UTF8, which is an opt-in
anyway.

Instead of fixing our codec, let's just use the optimized UTF-8
implementation.

[ChangeLog][Windows] Fixed support for using Qt applications with UTF-8
as the system codepage or by enabling that in the application's
manifest.

Discussed-on: https://lists.qt-project.org/pipermail/interest/2022-May/038241.html
Pick-to: 6.2 6.3
Change-Id: I77c8221eb2824c369feffffd16f0912550a98049
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-05-23 14:53:18 -07:00
Thiago Macieira
34cb03da89 QVector: make sure the forwarding headers for the Java iterators exist
They used to in Qt 5. And now they do again:

 $ grep . include/QtCore/Q*Vector*
 include/QtCore/QMutableVectorIterator:#include "qvector.h"
 include/QtCore/QVector:#include "qvector.h"
 include/QtCore/QVectorIterator:#include "qvector.h"

Pick-to: 6.2 6.3
Fixes: QTBUG-103742
Change-Id: I77c8221eb2824c369feffffd16f128a983f4866c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-23 14:53:18 -07:00
Thiago Macieira
9c0c1be122 StackTraceHandler: call the debugger directly, instead of via /bin/sh
This removes one middle-man and a 512-byte variable in favor of a simple
32-bit enum. This was done in a way so we can extend to use either gdb
or lldb in any OS.

I've renamed the debuggerPresent() function to make its meaning clearer.

Pick-to: 6.3
Change-Id: I5ff8e16fcdcb4ffd9ab6fffd16eba561628ff89b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-23 14:53:18 -07:00
Thiago Macieira
4ea5e39b27 StackTraceHandler: simplify the gdb and lldb commands
Instead of piping stuff via the shell into them, just use batch mode.
And also take the opportunity to tell them not to read their user-
provided configuration files.

Pick-to: 6.3
Change-Id: I5ff8e16fcdcb4ffd9ab6fffd16eba21e71afaefa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-23 14:53:18 -07:00