Commit Graph

67291 Commits (5ea248155654b58fcb52ef326dc4d94de83d0409)

Author SHA1 Message Date
Christian Ehrlicher 5ea2481556 QWidget: fix render() in RTL mode
Rendering a widget to a paintdevice via QWidget::render() did not pass
the LayoutDirection mode of the widget to the paintdevice which lead to
wrong rendering of text.
This is especially visible with the windows 11 style which does not draw
some widgets directly on the screen but through a QGraphicsEffect on a
QImage.

Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-124931
Change-Id: If2cfa326d2ca45c42e203a4ae91fd857afa5c69c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
2024-05-08 19:58:17 +02:00
Kai Uwe Broulik c587eeef11 Mark QGuiApplication::platformName property as CONSTANT
It cannot change at run-time once the platform
has been initialized.

Pick-to: 6.7
Change-Id: Ib5ec049d799cbc54f184ebc8a6531f22c02b6b5b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-05-08 17:58:17 +00:00
Tor Arne Vestbø 6c36e21bec iOS: Always call setParent during QIOSWindow construction
We rely on setParent for parenting top level windows into our desktop
manager view, so we can't condition the call on having a parent window,
like we do on other platforms.

This was a regression from 988039729f.

Fixes: QTBUG-125142
Pick-to: 6.7
Change-Id: I2884d77db09cba5371ccd77eabda7ce38c0292de
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2024-05-08 19:51:25 +02:00
Ahmad Samir c878a51509 QLatin1StringMatcher: add indexIn(QStringView) overload
Drive-by changes, remove a redundant typedef.

[ChangeLog][QtCore][QLatin1StringMatcher] Added indexIn(QStringView)
overload.

Task-number: QTBUG-117054
Change-Id: I5a8426cb0f9d9111f086015902ffe2185a267c86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2024-05-08 19:22:46 +02:00
Joerg Bornemann 519a47e870 CMake: Record static libs and target type in for deployment
In <build-dir>/.qt/QtDeployTargets.cmake we recorded deployable targets
and their file path. We skipped static libraries, because we don't
consider these deployable.

However, we need information about static library targets too when
deploying QML plugins: we need to know that they are "built by us" in
order to properly skip them.

Now, we record STATIC_LIBRARY targets too and also record the type of
each target.

Pick-to: 6.7
Task-number: QTBUG-124771
Change-Id: Ic1ef33a3295458c372c2bc9f24ecce43f17e7321
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-08 18:59:22 +02:00
Frédéric Lefebvre a0759dd420 tst_QApplication::focusWidget() remove setActiveWindow() child section
2f6fe3a268 as made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Ib3b39f4bd51c87eeeebe329ada163f24390f6bc3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-08 13:37:47 +02:00
Alexey Edelev c5be402651 Consider the qt_internal_extend_target calls when adding deps on qpa_default_plugins
Applications not necessarly link QtGui module in
qt_internal_add_executable. They still may add link it in followoup
qt_internal_extend_target calls. We should consider this when adding
dependencies on qpa_default_plugins to the internal executables.

Pick-to: 6.7
Change-Id: Icc413bd35b631b3a356e4033faab4e6c01b29a60
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-08 13:31:26 +02:00
Alexey Edelev 1e8a36e360 Consider the versioned Qt6::Gui when target when adding the plugin dependencies
QtGui module can be linked using both versioned and non versioned
targets. Consider this when adding the dependencies to the
qpa_default_plugins targets.

Pick-to: 6.7
Change-Id: Iccbf3009ab8a4f9df4de1677f1b41445814c8c9e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-08 13:31:23 +02:00
Alexey Edelev c7176f3142 Fix the static linking of plugins to the Qt tools and internal executables
Qt tools and executables may required the static plugins from modules
that are build as part of the Qt build tree. In this case we need to
force plugin importing. This adds the qt_internal_import_plugins call
when we extend the executable target.

Replace the previos solution that considered libraries that were
provided in the arguments of the qt_internal_add_executable call only.

Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-111988
Change-Id: Ifa2cf7f1f68d9f90cafc64f225aebe11d4cdb2ae
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-08 13:31:20 +02:00
Edward Welbourne 669f7e3b97 Disambiguate a QDateTime construction
When compiling removed_api.cpp, both the removed QDateTime(QDate,
QTime) constructor and the one taking a transition resolution with a
default are visible. The inline fromStdLocalTime() was thus ambiguous
as to which it was calling. So make the transition resolution overt.

Fixes: QTBUG-125079
Pick-to: 6.7
Change-Id: I0c498bed2831afee0adc41c4575f3ed1bc244122
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-08 13:14:11 +02:00
Lucie Gérard 251a632dc4 Add copyright and licensing to .bat files missing them
Task-number: QTBUG-124453
Change-Id: I8bd48ab5d5b18197ef5bf9a46edf49da86374bee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-08 13:09:40 +02:00
Lucie Gérard 00a04dddaf Add REUSE ignore comment
For those files, reuse fails to process the copyright and licensing information. The information is written to .reuse/dep5 file and reuse is told to ignore what is in the file.

Task-number: QTBUG-124453
Change-Id: If593c713026d9d349055cb6e8e73500966a05d9b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-08 11:09:28 +00:00
Lucie Gérard 3114e0a72e Correct license for test files
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Task-number: QTBUG-121787
Change-Id: I1da572cca6151d5fc6105f774731d11417025341
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-08 13:09:11 +02:00
Frédéric Lefebvre f75b5b8aca tst_QApplication::focusWidget() remove setActiveWindow()
2f6fe3a268 as made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I160e71302b40777d13e2481447bc47ebfc1a784c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-08 13:07:33 +02:00
Frédéric Lefebvre 22e53dced7 tst_QSpinBox::editingFinished() remove setActiveWindow()
2f6fe3a268 as made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Ib08791375e3984e7eda5b25ec6bac0b283ed80cc
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-08 13:02:32 +02:00
Even Oscar Andersen 1530c475e9 wasm: Fix nullptr access in QWasmScreen::allwindows
If the QWindow::handle() has not been created yet we will add
a zero page pointer to the allwindows list.
One possible symptom is that emscripten::val complains
in context2d() that it is accessed by the wrong thread.
what happens is that the this pointer points to the first
page.
Seen in the documentviewer example

Change-Id: I2b08176ebdd7c35d5105194f7fd9f4f6d45b77e5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-05-08 06:47:16 +00:00
Christian Ehrlicher 1a4470a8ef SQL tests: Fix dropping procedures Firebird/IBase
Firebird can not handle 'DROP PROCEDURE IF EXISTS' - need to call it
unconditional without 'IF EXISTS'.

Pick-to: 6.7 6.5
Change-Id: I530bcc2c756eed680a6fdaf27b3e3a0715f96bd4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-08 08:36:19 +02:00
Thiago Macieira 1ed0dd88a3 QThread/Unix: make QThreadPrivate::finish() be called much later
We need it to run after all the thread-local destructors have run, to
ensure that some user code hasn't run after QThreadPrivate::finish() has
finished. We achieve that by making it get called from a thread-local
destructor itself, in the form of a qScopeGuard.

This ought to have been done since C++11 thread_local with non-trivial
destructors became available. However, it only started showing up after
commit 4a93285b16 began using thread_local
inside Qt itself. The visible symptom was that QThreadPrivate::finish()
had already destroyed the thread's event dispatcher, but some user code
ran later and expected it to still exist (or, worse, recreated it, via
QEventLoop → QThreadData::ensureEventDispatcher).

Fixes: QTBUG-117996
Pick-to: 6.7
Change-Id: I8f3ce163ccc5408cac39fffd178d682e5bfa6955
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-07 14:22:27 -07:00
Thiago Macieira 3fc5ee5c2e QThread/Doc: update the docs on setStackSize()
There's some confusion about minimum and maximum.

Pick-to: 6.7
Fixes: QTBUG-109512
Change-Id: I262c3499666e4f4fbcfbfffd17cc1d592bc658b3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Philip Van Hoof <philip@codeminded.be>
2024-05-07 14:22:27 -07:00
Thiago Macieira ed70faf87a QCoreApplication: make removeNativeEventFilter() remove from main thread
installNativeEventFilter() always installs on the main thread, so match
it.

[ChangeLog][QtCore][QCoreApplication] Fixed a mismatch on which event
dispatcher was modified between installNativeEventFilter() and
removeNativeEventFilter(). Now both functions in QCoreApplication access
the main thread's event dispatcher. To access the current thread's
dispatcher, use QAbstractEventDispatcher's functions.

Fixes: QTBUG-124783
Pick-to: 6.5 6.7
Change-Id: I6979d02a7395405cbf23fffd17ca09e1ac43f1f3
Reviewed-by: David Faure <david.faure@kdab.com>
2024-05-07 21:22:27 +00:00
Carl Schwan ab2f4ef8fa QTextDocument: Add support for responsive images
Add support for the max-width css attribute in image. This allows images
to be responsive: it adapts their size to the size of the QTextDocument
so that they never grow bigger than the QTextDocument pageSize.

This is implemented for the image handler used in QTextEdit and other
QtWidget text related classes.

[ChangeLog][QtGui][CSS] The max-width style can now be applied to
<img/> to set the maximum width in pixels or percentage.

Task-number: QTBUG-12283
Change-Id: Ic94e16279a1240ab4a509823de59dc0bfc920bb9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2024-05-07 12:28:59 -07:00
Lena Biliaieva fb2ea1e52a tst_QNetworkRequest: add test for operator==()
Task-number: QTBUG-107751
Change-Id: I4ed77b022f9e576f1363d55a05de6f6fad5b01dc
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-05-07 21:28:59 +02:00
Lena Biliaieva c68b20477f QNetworkReplyHttpImpl: simplify setting headers in postRequest()
Task-number: QTBUG-107751
Change-Id: I33bbad1d7dadc058af52f8a81766762f0de1d812
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-07 21:28:59 +02:00
Orkun Tokdemir 545b84b93c CMake: Add `qt_add_ui` API
This commit introduces a new `qt_add_ui` CMake API to be used instead
of AUTOUIC, due to several hard-to-fix bugs it has.

* Resolves the issue where Ninja required two passes to correctly build
`.ui` files.
* Avoids build folder leakage, in contrast to `AUTOUIC`
* Prevents unnecessary recompilation of unchanged source files when a
`.ui` file is modified with Ninja.
* Since `qt_add_ui` does not scan source files, it provides a faster
build than `AUTOUIC`.

These changes aim to streamline the build process and improve
efficiency when working with `.ui` files.

This addresses the following issues:
https://gitlab.kitware.com/cmake/cmake/-/issues/16776
https://gitlab.kitware.com/cmake/cmake/-/issues/25436
https://gitlab.kitware.com/cmake/cmake/-/issues/25195

Task-number: QTBUG-110369
Fixes: QTBUG-114563
Change-Id: I34cd3df70542becf6e08502f0cbcd1c11eeeadd6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-07 21:12:29 +02:00
Doris Verria 0678a8a00d QWindowPrivate::setFocusToTarget: Add focusReason parameter
The focusReason is also important when setting focus to the target, so
ammend 8c44064f62 and add this parameter
to the virtual method.

Change-Id: Id7800a366cbc1ce2ac26b3fec1e47ec9267a57bb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-07 21:12:29 +02:00
Tomasz Kozłowski c0c66a42ce Exclude sync() usage from VxWorks platform
This function is not available in VxWorks libraries and it is not
mandatory for proper qstorageinfo test execution.

Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: Ic503c776002087d461c32f890795c27be4b1ca34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-07 17:30:37 +02:00
Frédéric Lefebvre 23ecc6ce70 tst_QGraphicsProxyWidget::tooltip_basic() remove setActiveWindow()
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I842e1c01007cc56e07a27a6e15ff173c4f6aece2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-07 17:30:33 +02:00
Lena Biliaieva 0fef8f53c3 Use QHttpHeaders: Update internal users of QNRequest, QNReply, QNProxy
Replace QNetworkHeadersPrivate's main headers storage, which was
RawHeadersList, with QHttpHeaders. Replace internal usage of raw and
cooked header methods with the QHttpHeaders API.

[ChangeLog][QtNetwork][QNetworkRequest] Header value added by
QNetworkRequest::setRawHeader() method is trimmed now.

Task-number: QTBUG-107751
Change-Id: I8882978afa430651e6c798a4fed00beef6c4cfd2
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-05-07 12:39:23 +02:00
Tatiana Borisova a32c152d39 QSocketDescriptor: use modernize comparisons
Change-Id: Ic0389ab7f8578a0c224072097420cfd8cac508be
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-05-07 12:38:13 +02:00
Eskil Abrahamsen Blomfeldt 9928ebd26a doc: Update note about variable axes on Windows
Since Qt 6.8, the DirectWrite backend is the default, so we need
to invert the warning.

Change-Id: I0d32c06c3507664ecd5b1bc3ae3fcabeedee12b7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-05-07 12:16:30 +02:00
Alexey Edelev ac4920b5c0 Prefer the versioned targets over the namespaceless one when collecting deps
Change the way we collect dependencies in __qt_internal_walk_libs.
Prefer the versioned Qt targets over the namespaceless. This fixes the
generating of the pkg-config configs.

Pick-to: 6.5 6.6 6.7
Task-number: QTBUG-124135
Change-Id: I660376e122a99b5bc0874f2bc6ccd4d80c9ad453
Reviewed-by: Ionen Wolkens <ionen@gentoo.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-05-07 12:13:41 +02:00
Alexey Edelev 721cfbd194 Consider versioned targets when checking the existens in __qt_internal_walk_libs
Since Qt targets now are linked as versioned targets by default, we
should adjust the respective check in __qt_internal_walk_libs.

Pick-to: 6.7
Change-Id: Idb896c1d9eda944a06d57b0491686cd78e010df0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-07 12:13:37 +02:00
Alexey Edelev 337cadbcb7 Consider '^Qt6' deps when generating pkg-config files
Dependencies that alredy start with QT_CMAKE_EXPORT_NAMESPACE shouldn't
be skipped but collected as is when generating pkg-config files.

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-124135
Change-Id: I6875337c2e1d98f657e52a5fc2c37eebccf08b98
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-05-07 12:13:33 +02:00
Alexey Edelev e820ff8301 Make version_tagging the full-functional feature
This feature allows to explicitly disable the version tagging for Qt
libraries and have the precise feature-based guarding in C++ code.

Task-number: QTBUG-124346
Change-Id: If109adb2f6a998c58825a2449cfb936ea278b2ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-07 12:10:22 +02:00
Volker Hilsheimer 31de589906 Docs: fix warning from old QCheckBox::checkStateChanged overload
The overload carrying the new state as an integer is deprecated, but
still documented, so we need to document the parameter as well. Bring
the full documentation back to silence the warning.

Amends 5a96d13bb5.

Pick-to: 6.7
Change-Id: I5253e68e4ad7b42fc552feb958cc0ac40d685609
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-07 07:14:25 +02:00
Thiago Macieira 4a984c15dd QResource: add support for duplicating mapped memory on macOS
Similar to the Linux solution, this avoids allocating heap memory in the
implementation of QFile::map() calls with MapPrivateOption.

Unlike the Linux solution, the macOS one cannot duplicate resources
present in read-only sections of binaries, only those loaded from files
with mmap() (QResource::registerResource()), because the max_prot
setting on the source does not have the VM_PROT_WRITE bit set and I
could not find a way to reset it to force a copy-on-write.

Change-Id: I6979d02a7395405cbf23fffd17c951949c71ec20
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-05-06 14:32:55 -07:00
Thiago Macieira 1b64b7c672 QResource: add support for duplicating mapped memory on Linux
This makes QResourceFileEngine avoid allocating heap memory in the
implementation of QFile::map() calls with MapPrivateOption. We do that
by asking the kernel to duplicate the mapping to the same memory pages,
which increases our virtual memory space but doesn't initially take up
any more RAM.

We have to be careful to ensure the resulting mapping is copy-on-write
and that this setting is independent of the original map's. The former
is easy: the mremap() system call with MREMAP_DONTUNMAP only works on
private memory blocks, so by definition any private + writable block is
copy-on-write.

The latter is slightly more difficult: if the original block was already
writable, then the kernel could give us a new map to the exact same
pages[*], which isn't exactly helpful. Therefore, we need to check if
the QResourceRoot points to a private, read-only block.

[*] in those conditions, mremap() is documented to replace the original
    mapping with a zero page, which means we have a near certainty of
    crashing, instead of accidentally, silently corrupting memory.

Change-Id: I6979d02a7395405cbf23fffd17c90fb1f1612ed7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-05-06 14:32:55 -07:00
Thiago Macieira 62e0080a6a tst_QResourceEngine: use both ways of registering dynamic resources
So we test both the mmap()ed and non-mmap()ed versions. Will be
important in the next commit.

Change-Id: I6979d02a7395405cbf23fffd17c98f0e207477e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2024-05-06 14:32:55 -07:00
Tatiana Borisova ecb0878cbc QVersionNumber: use new comparison helper macros
Replace public friend operators operator==(), operator!=(),
operator<(), etc of QVersionNumber to friend methods
comparesEqual() / compareThreeWay().

Task-number: QTBUG-120304
Change-Id: Ib94a1a28ca9843ca5d5a8d07f41c63de9fe584bb
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-05-06 22:47:55 +02:00
Christian Ehrlicher 77c6b0c66f QLineEdit: set object names for actions
Set object names for actions created by createStandardContextMenu() to
be able to access them from the outside. Use the same naming schema as
by QWidgetTextControl::createStandardContextMenu() (used by QTextEdit
and others).

Pick-to: 6.7 6.5
Fixes: QTBUG-112721
Change-Id: Id92f1ba13e7f7e8b1d531678895902374114d167
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-06 22:13:29 +02:00
Alexey Edelev bca3d16bc2 Fix indent for the -submodules argument in configure-cmake-mapping.md
Change-Id: I88e2e6cccef6c961bc65cc6b95f06968f957da9f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-05-06 22:08:24 +02:00
Frédéric Lefebvre 3e238d33e6 tst_QTextBrowser::TextBrowser() remove setActiveWindow()
2f6fe3a268 as made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: Ia006f35177f3c8b2cb3d7b8c6bbe3f24eb24d934
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-06 21:01:36 +02:00
Frédéric Lefebvre ab2e999d1b tst_QGraphicsProxyWidget::setFocus_simpleWidget remove setActiveWindow
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number:  QTBUG-121488
Change-Id: I3819874c2fdd78d733707a375a849a7876a30d9d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-06 21:01:36 +02:00
Tor Arne Vestbø f16036fc18 rhi: Replace deprecated MTLRenderPipelineDescriptor.sampleCount
Change-Id: I47c64416e9ba089c2f23dcebf63a26988bb1d0a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-05-06 20:27:42 +02:00
Volker Hilsheimer 5b41046813 JNI: Mark tech preview API as such
Retrofit the QT_TECH_PREVIEW_API macro into the JNI classes and
helper constructs that are not yet documented, and which can only
become publicly documented once the full JNI type system with the
type registration infrastructure is documented.

We can remove the tagging in dev once we have documentation and
are ready to move this functionality out of TP, presumably for Qt 6.8.

Pick-to: 6.7
Change-Id: I235e57b8e57c2d04be72b4c842131d99a5f83d9e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-05-06 20:27:42 +02:00
Edward Welbourne 020a224a79 Break out timezone data from cldr2qtimezone.py
This separates the large slabs of data (and their documentation) from
the code that mixes them with CLDR-derived data and generates the data
we actually use. In the process, put the shorter table before the
longer one, to make it less likely that folk shall fail to notice it's
even there at all.

Change-Id: I8457741911657dac0dad53c2e65b977821bb4e71
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-05-06 20:27:41 +02:00
Edward Welbourne a2566e139f Extend QTest::failOnWarning() to a no-parameter fail-on-any-warning
Many users (albeit mostly in qtdeclarative) of failOnWarning() are
passing a catch-all regexp, which is only supported when regular
expression support is enabled. Make their lives easier and those
checks independent of the feature by adding a third overload, taking
no parameter, that fails on any (unanticipated) warning.

Implementation is trivial - just put a null QVariant in
failOnWarningList; it won't match either check on the entry that might
exempt a test from failing on a warning, so any warning at all will
trigger failure.

[ChangeLog][QtTest] QTest::failOnWarning() now has a no-parameter
overload to support the common case of fail-on-any-warning, without
needing to construct a match-everything regular expression.

Change-Id: Ic693f1c8619fd6e495543b85737d566134cf9d20
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2024-05-06 20:27:41 +02:00
Edward Welbourne 5a09ade176 Pass QDateTimeParser::SectionNode by value, not const ref
It's trivially copyable and fits into a (128-bit) register.
Delete one spurious line from a \internal doc in the process.

Task-number: QTBUG-122619
Change-Id: I55bd39f176f58e0dcd0ecc86e88bd29d449c7fd7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-06 20:27:41 +02:00
Edward Welbourne 33cc653288 Document calendar setting of QCalendarWidget and QDateTimeEdit
It seems this was neglected in 5.14, when the methods were added.
The calendar setting is also not a Q_PROPERTY; and hadn't been tested
until recently.

This follows up on commit 2dee006216

Pick-to: 6.7 6.5
Task-number: QTBUG-115200
Change-Id: I9625bf54d05a55a40867847bd58130be90e78271
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-05-06 20:27:41 +02:00
Mårten Nordheim 439b20eb46 QBuffer: resolve todo / use QByteArray::assign
It no longer lacks assign

Change-Id: Ib96dec54e8d9fd0f182a9a26692a5504993fb622
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-05-06 20:27:41 +02:00