Commit Graph

64417 Commits

Author SHA1 Message Date
Ivan Solovev
e85a3cde2f QSharedMemory: fix attach() -> create() for non-legacy SystemV mode
The problem with non-legacy mode is that the backend uses the same
filename for the system semaphore file and for the shared memory file.

What happens is that when we try to call attach(), a semaphore is
created. Later in attach() we set unix_key, because ftok() returns
a valid handle (it uses the file which was created for semaphore).
After that, an attempt to actually attach to a shared memory fails, but
no clean-up is done.
So, a later call to create() sees that unix_key is already valid, but
it cannot properly clean it, because it does not actually refer to
any shared memory.

Fix it by cleaning up unix_key and nativeKeyFile if shmget() call in
attach() fails.

Pick-to: 6.6
Change-Id: Ibccc3ac307d8b2e07e1b9b24b55f97a859a03131
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-08 15:56:54 +01:00
Laszlo Agocs
7c3779006d tst_qrhi: Exercise a readonly storage buffer in the simple test
...not only in the tessellation-related ones (that are skipped
with D3D).

The checked-in .qsb file is generated with a patched shadertools
that fixes a bug regarding readonly storage buffers and HLSL.

Change-Id: Iafbad4e81875d7b4f877435b9b1e6078019d52ac
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-11-08 16:15:18 +02:00
Laszlo Agocs
92167f0119 rhi: Add a flag to suppress D3D11 smoke test warnings
Applicable to D3D11 only, although the flag is general enough that
other backends could use it if it made sense for them.

This allows Qt Quick to state that warnings about QRhi::create()
failures that lead to retrying with a different set of flags
(PreferSoftwareRenderer to get to use the WARP software rasterizer)
should be suppressed and turned to regular categorized debug prints.

Other users, e.g. an application directly working with QRhi may not
want this. A create() failure must be complemented by an unconditional
qWarning since normally that is pretty serious error. Hence the opt-in
flag.

Task-number: QTBUG-117926
Change-Id: I808bd1670b631e2068b566ab08589e1783f62ca5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-11-08 14:15:18 +00:00
Axel Spoerl
bbeff2a335 Extend qDebug functionality for QDockWidget
Add features and floating flag to QDockWidget debugging.
Debug dockwidget parents of a group window.

Task-number: QTBUG-118578
Task-number: QTBUG-118579
Pick-to: 6.6
Change-Id: If2a6caacf5d02f9018c2a3073fdbc1de39bce1ee
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Keith Kyzivat <keith.kyzivat@qt.io>
2023-11-08 15:15:18 +01:00
Samuli Piippo
f0b2c5f21c tslib: generate event with correct buttons and event type
Tslib doesn't give button and movements events separately, so send
the first event with pressure as MouseButtonPress, subsequent events
as MouseMove and event without pressure as MouseButtonRelease.

Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-111952
Fixes: QTBUG-113307
Change-Id: I7ed6e37936887e11affb254d2fca74c79b6a43b9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-11-08 13:40:44 +02:00
Christian Ehrlicher
5a5c96c65d Add QPixmapIconEngine::isNull()
Reimplement the virtual function QIconEngine::isNull() for
QPixmapIconEngine. This lets QIcon::isNull() return true when no pixmaps
are loaded during QIcon::addFile() e.g. due to a wrong filename.

Pick-to: 6.6 6.5
Fixes: QTBUG-118667
Change-Id: I29f2c492e55b60638507fa398ef7af76f4e9ff48
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-11-08 11:11:48 +01:00
Christian Ehrlicher
a5a925bf2e QWidgetWindow: pass QPointF to QMouseEvent
QWidgetWindow::handleMouseEvent() passed a QPoint to QMouseEvent which
might result in a wrong result on high-dpi displays. Since the incoming
event has a correct QPointF coordinate, use this for the QMouseEvent

Pick-to: 6.6
Fixes: QTBUG-106262
Change-Id: Idbfdab19220cb06aa0a28eef4e6ab4cab1035d97
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-11-08 11:11:48 +01:00
Christian Ehrlicher
90822833f3 QCheckBox: Don't emit checkStateChanged when nothing changed
QCheckBox::checkStateChanged() was emitted with msvc even though the
check state was not changed due to a faulty comparison.
Amends: 37b47ebf94

Pick-to: 6.6
Fixes: QTBUG-118716
Task-number: QTBUG-104688
Change-Id: Iafeabeb9214f6c7510ea4ed87fabb7dc0ba175a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-11-08 11:11:48 +01:00
Alexey Edelev
c8c8299a63 Re-enable LTO for gcc versions >= 10
Assume the related GCC version is fixed.

Fixes: QTBUG-118851
Change-Id: I0160440c5e8a0341ec5bc2ab9ea6fed9a2325bba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-08 08:04:07 +01:00
Gleb Popov
295e56201d Implement QDBusAbstractInterface::setInteractiveAuthorizationAllowed
Task-number: QTBUG-100458
Change-Id: I48d6f17943a554c1173d16a2320eb460c3d5c387
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-07 19:49:34 +00:00
David Faure
889c3e2e5b QMimeDatabase: update freedesktop.org.xml to shared-mime-info 2.3
... and update the unittest accordingly.

Compared to the 2.3 release there 2 fixes in freedesktop.org.xml,
due to issues discovered when running tst_qmimedatabase:
* Give higher priority to the more specific image/apng magic
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/262
* Lower priority for text/x-mpsub's magic
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/263

Task-number: QTBUG-118616
Change-Id: I56053b343619a8a711af28e6490c160d13169734
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-07 16:04:03 +01:00
Alexandru Croitor
28516ed1fd CMake: Remove qt_internal_qt_configure_end workaround
Now that the top-level build calls qt_internal_qt_configure_end
itself, we don't need to call it in qt_print_build_instructions.

Pick-to: 6.6
Change-Id: I906ee7bc1aed3b597049b5996a41dd298175343c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-11-07 14:56:01 +00:00
Ivan Solovev
fb1dcbfcba QSharedMemory: fix attach() -> create() for legacy SystemV mode
The attach() -> create() sequence was not covered by unit-tests in
qtbase, but this approach is used inside QSharedImageLoader.

It turns out that 02c42b26e1 broke this
usecase for legacy mode, and the create() triggered an assertion
in QSharedMemorySystemV::updateNativeKeyFile(). Fix it by clearing
the nativeKeyFile if ftok() call in QSharedMemorySystemV::handle()
fails().

Add unit-tests for the attach() -> create() scenario.
These tests revealed that this scenario fails also in non-legacy mode
for SystemV, so add QEXPECT_FAIL for these cases for now. This will
be addressed in a separate patch.

Pick-to: 6.6
Change-Id: If133fa56c82eba902374dc48d2757046b3d40baf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-07 15:43:05 +01:00
Ivan Solovev
aa8dfc5589 QDate: fix condition in conversion between chrono types and Julian Day
Surely, sizeof() returns the number of bytes, so we need to multiply
by CHAR_BIT if we want to compare with the number of bits.

This commit amends c4f7dba81e

Task-number: QTBUG-118221
Change-Id: I2cca75bfed7f0554f6cffd22cc06475ffc9c6e43
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-11-07 14:42:16 +00:00
Tasuku Suzuki
2db7a5ebfb Fix build with -no-feature-shortcut
Change-Id: I43b95991fcf37ac8b125b176a59518e6a81e11dc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-11-07 09:59:06 +09:00
Alexey Edelev
a8118caad6 Remove forward declared QHash
Fixes the complication issue since the typedef was used as class member.
Replace the typedef with using statement.

Fixes: QTBUG-118627
Pick-to: 6.6 6.5
Change-Id: Ie3d341fb8f18a7341d018f51947127ace941a620
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-11-06 22:44:35 +01:00
Edward Welbourne
be55fbede9 QTZ/Darwin: Make available-ID checks cheaper
Previously we've checked whether an ID is available by computing the
full list of all known available IDs (converting each from NSString to
QBA in the process) in order to compare the offered ID to each of
those in turn. This is a significant performance bottle-neck

Simply trying to construct the NSTimeZone instance should suffice to
determine whether there is such a zone; if the ID is not available, we
apparently get back a null pointer, which is easy enough to test for.

Pick-to: 6.6 6.5
Fixes: QTBUG-118759
Change-Id: Ib272c96e25db9640490299c638e2e9196a58712f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-11-06 20:50:44 +01:00
Wladimir Leuschner
c88211d1e4 Restore WindowState when changing SurfaceType
Restore the WindowState, when a Window has to be recreated due to
changed SurfaceType.

Fixes: QTBUG-118194
Pick-to: 6.6 6.5
Change-Id: I40ba552cda9dfc8ab543611595c068f80b8fa1d6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-11-06 20:50:44 +01:00
Kai Köhne
b23a06e039 Doc: Add HTTP Client example also to Web Technologies category
HTTP belongs to Networking, but also fits well with the scope
of Web Technologies - qtnetworkserver is there after all, too.

So just add the example to both.

Pick-to: 6.6 6.6.0
Change-Id: I588e4e0eefc92ba396fbb21d6f55b33f68332a74
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-11-06 17:59:51 +00:00
Assam Boudjelthia
0f3dbd6dc7 Android: remove a11y methods from QtNative, call a11y delegate direct
Remove yet another two layers of delegation, QtNative calling
QtActivityDelegate and that in turn calls QtAccessibilityDelegate.
Now from c++ native code, acquire the a11y delegate and use it to
call a11y operations that live in QtAccessibilityDelegate.

Task-number: QTBUG-118077
Change-Id: I9e84520c2caa281a6f786a687b0106d702f92a67
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-11-06 19:59:51 +02:00
Jan Grulich
ddb1c75afe QCryptographicHash: Do not rely on auto-loading of the default provider
When using OpenSSL implementation, we were assuming the default provider
will be automatically loaded, but this is not going to happen after it
gets unloaded. Even the documentation says that automatic loading of the
default provider occurs max once and if it's explicitly unloaded, it
will not be automatically loaded again. In our case we are explicitly
loading and unloading the provider after MD4 hash is used so using it
afterwards we will always fail.

Fixes: QTBUG-118227
Pick-to: 6.5 6.6
Change-Id: I8107b9ab02321b57978c3d25a061672fd2a7aee8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-11-06 18:59:51 +01:00
Volker Hilsheimer
93a6cd8bdf JNI: allow QString as a parameter to native methods
Expect a jstring on the va_list, and implicitly construct a QString from
that.
As a drive-by, allow native methods to take parameters by reference, and
move implementation details into a Detail namespace.

Add test coverage.

Change-Id: I31214938ccaea3f4d539b432e29d12434dd98377
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-11-07 01:59:51 +08:00
Mårten Nordheim
e579cdceb8 QLocal8Bit::convertToUnicode[win]: Pre-2Gi changes
Prepare the code for the upcoming changes to support strings longer
than 2GiB.

We will have to loop from start to end, and increment the pointer
whenever we succeed, rather than assuming there is a single success
before we return.

This also means the error-handling code goes into an else-branch and
gets indented.

Pick-to: 6.6 6.5
Task-number: QTBUG-105105
Change-Id: Ibe49cc661f582fd54ce36ad466cf798a62b5c4c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-06 18:23:19 +01:00
Mårten Nordheim
6f48233482 QLocal8Bit::convert*Unicode[win]: Converge logic
I ended up writing different logic for similar things.
And using points_into_range doesn't work if we, by coincidence,
point at end, though this shouldn't be possible yet, but it may happen
once we support input larger than 2Gi. So, let's instead check if the
destination buffer has been initialized.

Pick-to: 6.6 6.5
Task-number: QTBUG-105105
Change-Id: I28c367eb965339ae84355c0cac27c5d0352d9271
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-06 18:23:19 +01:00
Mårten Nordheim
10f5e4f809 QLocal8Bit::convertToUnicode[win]: Support stateless flag
By just setting state to nullptr.

Pick-to: 6.6 6.5
Task-number: QTBUG-105105
Change-Id: I6b4f8fe39f1ba51dcfaf98ce7e42c2acd4c4cf98
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-11-06 18:23:19 +01:00
Mårten Nordheim
127e6cc907 QNonContiguousByteDeviceThreadForwardImpl: reset m_atEnd during reset()
Because otherwise the atEnd() function will return true if we finished
an upload, and then we reset due to an error and try to upload again.
In a future patch we rely on atEnd() returning true only if the data
has actually been consumed, so re-uploads will not work correctly.

Pick-to: 6.6 6.5
Change-Id: Id914648f2509dd112b6bfc71231caa59cbe8ae68
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-11-06 18:23:19 +01:00
Mårten Nordheim
3ea46fa978 Schannel: Return if socket is invalid
In a couple places we already check if the socket is connected,
however we can be connected _and_ have the socket be closed.
The logic behind that I don't really understand, but there are
similar checks for validity in the OpenSSL backend.

This happens when calling close() on a still-connecting
socket. The QIODevice is marked as closed, but the connection
cannot yet be aborted. And when it finishes connecting we
handle the signal, start encryption, and then disconnect.

Pick-to: 6.6 6.5
Fixes: QTBUG-116550
Change-Id: I06c0a2db32bea0b573a99a971b8fb0b66a7a73d5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-11-06 18:23:19 +01:00
Mårten Nordheim
c31227a548 QNetworkInfo[win]: Advertise Metered feature
I forgot to add this to the features list when adding support for it.

Amends d2c5494c3d

Pick-to: 6.6 6.5
Fixes: QTBUG-118741
Change-Id: Ieabf086ef66777e6178476934b88448ad88bc738
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-11-06 18:23:19 +01:00
Mårten Nordheim
747dd2460b Http: simplify check for preconnect request
Change-Id: I132533b9bc1f2b4d66f94599efb04def571cd2ff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-11-06 18:23:19 +01:00
Laszlo Agocs
bd78047df3 QVulkanWindow: Add a way to control post-1.0 Vulkan features
So now instead of filling out a VkPhysicalDeviceFeatures and
sending it in via VkDeviceCreateInfo::pEnabledFeatures,
we rather create a VkPhysicalDeviceFeatures2, which contains
a VkPhysicalDeviceFeatures (for 1.0 stuff) and a pNext
chain, and chain it via pNext to the VkDeviceCreateInfo.

QVulkanWindow will not do anything with post-1.0 features
by default. (in this regard it deviates from the QRhi
Vulkan backend which already tackles 1.1, 1.2, and 1.3
features as well, but this is not going to change)

However, applications may want to enable some of those still.
To enable this, add a new callback. When set, the callback is
invoked and the alternative behavior described above is
activated.

Fixes: QTBUG-117966
Change-Id: I8560a6b23421f545ee760e714cbe2ec2f6078406
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-11-06 18:31:54 +02:00
Piotr Wierciński
105a8d90bc wasm tests: Fix manual Selenium tests
Manual tests using Selenium for browser automation were not properly
updated when we introduced changes to our DOM structure.
Update the testing framework so elements in shadow root may be
properly accessed.

Change-Id: I45f7d63a833bc48a3b68016ef937e56425bdff87
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-11-06 11:56:25 +01:00
Christian Ehrlicher
597de2b1dc QTextEdit/Browser: use pmf-style connects
Use pmf-style connections instead old string-based ones.

Change-Id: I80b36272e129589b735ec63d23c264b1e3e4bea2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-05 21:16:35 +01:00
Christian Ehrlicher
d759c5c5ac QTextEdit: remove unused member 'textFormat'
The member 'textFormat' is not used since Qt4 so remove it.

Change-Id: I019db92ede108fbce26d55ad4ae9a3f1a59e54b0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-05 21:16:33 +01:00
Christian Ehrlicher
c96ef6aee6 QFontCombobox: misc cleanup
Cleanup QFontCombobox:
 - use pmf-style connect
 - use range-based for loop

Change-Id: I9ec87fbca2b0e6d52f0a4cbae07cc0624dc0f6bc
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-05 21:16:31 +01:00
Dimitrios Apostolou
737ed17803 Always print output of a failing test
For now this affects only the ASAN-enabled testruns that are run
without "-V" in ctest's command line.

Pick-to: 6.6 6.5
Change-Id: Iaa889f950e5de0657523dc9bcb457968c1cbf29e
Reviewed-by: Toni Saario <toni.saario@qt.io>
2023-11-05 12:20:12 +01:00
Christian Ehrlicher
6780195d4e Widgets: use pmf-style connect
Use pmf-style connect for some easy-to-convert connections.

Change-Id: Id0a9d3465b2dfe5966374194a72980a67e978fe8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-04 19:01:23 +01:00
Christian Ehrlicher
05d69ad42b FusionStyle: use std::array instead QVarLengthArray
Replace QVarLengthArray with std::array since there is no reallocation
needed.

Change-Id: Ifd53763e230efd61683c08654f0741beae4b6df2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-04 19:01:22 +01:00
Christian Ehrlicher
4a32f8b806 QStyle: cleanup iconFromApplicationTheme()
Cleanup iconFromApplicationTheme() by merging the code paths for
SP_DirLinkIcon and SP_FileLinkIcon.

Change-Id: If4c8c850516971a80dffcc59cff7cabdace94585
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-04 19:01:20 +01:00
Christian Ehrlicher
fea9109b3b QWindowStyle: misc cleanup
Misc cleanup in QWindowsStyle:
 - use range-base for loop
 - use std::array instead raw c-array
 - use std::swap instead custom implementation

Change-Id: I479c014d4e19556e1c0a6ce3fbb8ddacd4e179ae
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-04 19:01:18 +01:00
Christian Ehrlicher
acdef6669f FusionStyle: re-add icons for dockwidget titlebar
Re-add the icon for dockwidget titlebars as png images in different
resolutions to avoid a blurry icon on high-dpi displays. Also add the
source svg.

Task-number: QTBUG-118122
Task-number: QTBUG-118643
Change-Id: I24f710e3c7390762c7079c0e153f015475347591
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-04 17:55:17 +01:00
Ahmad Samir
9e1210752f QSingleShotTimer: port to chrono
Use std::chrono::ceil<milliseconds> to match what
QDeadlineTimer::remainingTime() did.

Drive-by change: make a method private instead of protected, nothing
inherits from this class anyway

Change-Id: I605b7c25ea7501ee92518ec9f0ff049ed810bfb4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-04 18:22:24 +03:00
Ahmad Samir
b13c46d6ef QStorageInfoPrivate/Linux: de-duplicate some code
Change-Id: Ie0fe0c80a61c123c12242f24830ca622a726d7ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-04 16:46:05 +02:00
Ahmad Samir
e34c2429c8 q20chrono: remove a redundant comment
Change-Id: I6717f508c6b44878e5f9b0d8663f85d2a847fa5e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-11-04 17:46:05 +03:00
Ahmad Samir
4c6dfc05df QLatin1StringMatcher: handle from index < 0
indexIn() could hit UB if `from` < 0, so handle that case too. (This
also makes using noexcept for that method more correct wrt the Lakos
rule). While I think that passing valid indexes to a method is the
responsibility of the caller and that the existing API in Qt where a
negative index is interpretted as "search from the end" is
hard-to-use/bad API, not handling `from < 0` this way will most likely
not pass review (c.f. commit 81538c5219b92356c52233a80845847145795d6f on
gerrit). I'd rather get this over with so that an indexIn(QSV) overload
can be added...

Change-Id: Id85d18c901c82d9652804ecff7bfe7c71c10a63c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-04 17:46:05 +03:00
Christian Ehrlicher
04f4b27774 QDockWidget: fix dock buttons size
The size of the dock buttons did not account the
SH_DockWidget_ButtonsHaveFrame style hint and therefore was too large
when a full 16x16 icon was used (which was the case after the latest
style cleanups) and therefore appeared too large.
This also allows the remove of the hack for the windows style. The
windows vista/11 style is not even affected by this hack because there
the size comes from windows itself and can not be modified via
PM_SmallIconSize.

Fixes: QTBUG-118643
Task-number: QTBUG-118122
Change-Id: Ie09a6a4e89df66b5393c5a57735002da47415c0e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-11-04 11:00:04 +01:00
Tim Jenssen
91fe6fb2e1 Schannel: Avoid crashing for unparsed certificate
Crash reports imply the `certBackend` we extract in
QSslCertificate_from_CERT_CONTEXT is null, which means that
something went wrong when parsing the certificate data we get from
the certificate chain.
We assume the rest is okay since it must be inside the bounds of the
length of the chain.

It's not clear why the certificate would be invalid, but it's better
to avoid the crash for now.

Pick-to: 6.5 6.6
Task-number: QTBUG-118569
Change-Id: I76ce07fc38bf82ef5c93097d839724ddee1edeef
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-11-03 23:30:16 +01:00
Kai Köhne
ed7912dbe0 Doc: Replace wrongly spelled word
It's actually 'lexicographically'. But 'alphabetically' is a more common word.

This was brought up in https://forum.qt.io/topic/151834/what-s-lexographically/5

Pick-to: 6.5 6.6
Change-Id: Ibeb0e4463e12b54c1c10ac7df268e4d62b6ce49f
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Inkamari Harjula <inkamari.harjula@qt.io>
2023-11-03 18:02:18 +00:00
Edward Welbourne
8392e0ed94 QLocale/MS: extract function to save some repetition
With one exception in a kludge-around, substituteDigits() calls were
always subject to the same condition, so wrap that in a trivial method
and simplify the code calling it.

Change-Id: I6d8f3ca9179e32f03348cd718f9ee9de573221b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-03 18:27:14 +01:00
Edward Welbourne
a527ab6652 QLocale/MS: polish some arrays and their access
The arrays can be constexpr, and we can avoid some repetition by
making only the choice of which to look in conditional, when we do the
same thing thereafter.

Change-Id: I8c9f95b3967017cf67a76de9d2a7a8729ee430f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-03 18:27:14 +01:00
Edward Welbourne
385626d642 QLocale/MS: return null variant, not empty string, on failures
Likewise for the string list in uiLanguages(). Document the exception
(for grouping separator) and the other corner case (currency symbol).

In commit 089bbfc307 we changed the
system locale look-ups to rely on backends to return null QVariant on
failed look-up, but the MS backend has several places where it would
return an empty string for lookups that really shouldn't.

Pick-to: 6.6 6.5
Fixes: QTBUG-118703
Change-Id: I1a5622beebc4e5639d643250829937a829e23363
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-03 18:27:14 +01:00