Commit Graph

68968 Commits (90ed68910fdf3cc94edf352cf12edc265ccda1d7)

Author SHA1 Message Date
Axel Spoerl 90ed68910f Improve logging in QWindowPrivate::forwardToPopup()
Debugging output printed the return value of event->isAccepted() without
information what the value represents.

Add it.

Pick-to: 6.8.0
Change-Id: Ifbef69fed5d4aadd732c234c2ac74495560e65b6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 5d028371bd8d775703739db51936cbd582626580)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 10:09:37 +00:00
Tasuku Suzuki 16410ae7be QPainterPath: reset .nospace() in QDebug operator<<(...)
Change-Id: Ic06f376fe01db6d7340fa0e7071b01e00aa8caf9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit fb00ecd0a7925f95fa32a7772e9c70149468ee2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 10:09:37 +00:00
Ahmad Samir ff4252b0b6 QAbstractFileEngine: remove beginEntryList(QDir::Filters)
It was kept so as not to break compilation of user code (overriding a
function that doesn't exist in the base class). But as Marcus Tillmanns
pointed out in a qtcreator code review, it can't work because
QDirListing calls the virutal
engine->beginEntryList(QDirListing::IteratorFlags).

Removing beginEntryList(QDir::Filters) and getting a compile-timer error
is better than the code failing silently in user code (all sub-classes
of QAbstractFileEngine in qtbase have been already ported).

QDir::entryList() isn't affected because it calls
QAbstractFileEngine::entryList() which has an overload that works with
QDir::Filters.

Change-Id: I3cb18402f602ac78a6b29be57e59febb2b9db7c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4fecfcc867f8215defaa40b50f0340654a36b4c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 10:09:37 +00:00
Axel Spoerl 5abc6e9ccb QWindowsWindow: Refactor corrections related to task bar on top / left
33874a9424cd03c21ca9986a39c383b3689f03d2 corrected a size-contrained
window's position when maximized. Restoring such a window's size
moved the window downwards as well, if the task bar was on top. With
the task bar on the left, such maximizing the window caused parts of it
to be off screen to the right. These bugs affect only Windows 10,
because Windows 11 only allows the task bar to be at the bottom.

Factor out all corrections to QWindowsWindow::correctWindowPlacement().
Correct placement when restoring size of a maximized, size-constrained
window.
Correct width of a height-constrained, maximized window.
Correct height of a width-constrained, maximized window.

Change-Id: I9a1e0cf4708e8c579595fdbdc7f16b927be53b05
Done-with: Johannes Grunenberg <nerixdev@outlook.de>
Fixes: QTBUG-129405
Fixes: QTBUG-129679
Task-number: QTBUG-123752
Pick-to: 6.5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 06fcb3dfe69e175f94d112ecef45b091598f5ae5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 10:09:36 +00:00
Christian Ehrlicher 18b01267a6 QMenu: fix PM_SubMenuOverlap in rtl mode
The submenu in rtl mode was not placed correctly due to the missing
handling of PM_SubMenuOverlap.

Pick-to: 6.5
Task-number: QTBUG-129716
Change-Id: I0a0d6a9007b4427a95a92b81a3450d65b944189c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 87c6d142d25bec937c0a521830fcb9e06d921114)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 10:09:36 +00:00
Tim Blechmann cc331ef757 TestLib: enable watchdog during _data and init/cleanupTestCase
The watchdog is not enabled when running initTestCase and friends. We
therefore miss some deadlocks in these methods.

Task-number: QTBUG-128510
Change-Id: I119a1ee04c45df00b62f9d5990075e4bf8814142
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 9154bb8f19815acc64b69b85a8c0e5ab8b96ec49)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:50:32 +00:00
Mårten Nordheim 701263379a QFreeList: return timer IDs with the serial included
When a timer gets unregistered there is a chance that a new timer is
registered again immediately and gets the same ID.
On Windows this is a problem because there may be WM_TIMER messages
remaining in the native event loop that have not been processed.
This may result in unexpected timeouts for newly started timers.

By not masking away the serial/generation from the ID we generate
we will no longer return the same ID that was just freed.

While QFreeList mostly was prepared to be used in this way, one function
was not, and the tests were written with the assumption that the serial
was masked out. So this patch also addresses that.

Fixes: QTBUG-124496
Pick-to: 6.7 6.5
Change-Id: If6784815bfa41e497cbc4e00bef51da3ded5f255
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
(cherry picked from commit 21e9875d62414306fde9738ab255e55f22d1c8ed)
2024-10-19 06:50:26 +00:00
Tinja Paavoseppä d8570cb1a8 QtQuick for Android: Do not terminate Qt during configuration change
In Android the default behavior is that when a configuration change,
e.g. an orientation change, happens, the Activity is destroyed and
a new one is created with the new configuration.

In regular Qt for Android, this is not a problem as the QtActivity
overrides this behavior and swicthes the configuration without
recreating the Activity. However in QtQuick for Android i.e.
when adding a QtQuickView to an otherwise regular Android app,
we cannot rely on that being the case. Currently, if for example
the orientation is changed with an Activity that has a QtQuickView
in it and the default behavior is used, it will crash, as the
destruction of the Activity will terminate the Qt runtime, and
whne creating it anew the runtime is not properly restarted.

This patch does not fix the underlying issue of not restaring the
Qt runtime properly, but it adds a check so we don't terminate
it when the reason for the Activity destruction is a configuration
change, as in those cases it will anyway be recreated immediately,
meaning a full termination is too heavyhanded anyway.

Task-number: QTBUG-123711
Change-Id: Ia44ab8f55855aa5d54c5fb25e3cca90a9c0feaaa
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit aef9fff1d7a0de98cb446a634fdf2812e45f19c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:50:24 +00:00
Morten Sørvig 626d19b2a0 wasm: disable network examples
http and rsslisting compile and can work, the rest are
don't build and are probably too low level.

Change-Id: I031494178d0cace10951c3eb5495fbbf0f73d717
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit d211b2ba7cec6ad5d98f0e2d82af8b350a38242b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:50:22 +00:00
Paul Wicking 72a340570b Doc: Wrap code snippet in \code \endcode
Fixes: QTBUG-129999
Change-Id: I0f7b25630a1e6f97453806ad778e90f610de0fa9
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
(cherry picked from commit 9b11c3736e9ff23b0febce80c3f488099f1229fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:49:58 +00:00
Andreas Eliasson 308181e875 Doc: Fix link in note for QRhi::nextResourceUpdateBatch()
The correct link should be QRhiResourceUpdateBatch::release(), not
QRhiResourceUpdateBatch::destroy().

Fixes: QTBUG-127111
Pick-to: 6.7
Change-Id: Iec370f5f4b2c9cc74f8ff96b8d5a027be79e8817
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 93136f7c55e545598a10e617f4951094bdbca9ff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:49:56 +00:00
Alexey Edelev e388c1caeb Add _qt_internal_execute_proccess_in_qt_env macro
The macro sets the Qt related PATHs and attempts to call
execute_proccess command in resulting environment. This command should
be used to reproduce the _qt_internal_generate_tool_command_wrapper
behavior for execute_process. Since we may control the environment
during the CMake execution, there is no need to use a proxy batch
script to configure it.

The use of tool command wrapper in execute_process has a potential
issue related to the invalid command line processing. cmd.exe is
unable to parse command line correctly if the first argument is batch
script containing spaces and the follow arguments contain spaces as
well. execute_process internals use API that has exact same behavior.

Task-number: QTBUG-128420
Pick-to: 6.7 6.5
Change-Id: I2339c85ed611da89176629878db550b7b7976367
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit b68b3e773c68b577c55db76ca5c211e919ae8136)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:49:55 +00:00
Alexey Edelev 6c1f4c6c56 Guard the QDateTimeEdit usage with the respective feature check
QDateTimeEdit and the respective header are available only when the
'datetimeedit' feature is enabled.

Amends bfe8ac4ebff7a1e8114068f2f46e73c588735690

Fixes: QTBUG-129481
Pick-to: 6.7
Change-Id: Ia9595bb17b47fd7221742665f1242a5f85ed6c0d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 00bcf5a867d0414cd894e46d085feef94aa317b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:49:53 +00:00
Alexandru Croitor 7f45fdefd6 CMake: Add a way to skip configuring the doc targets
Can be useful for non-Makefile and Ninja generators, even if they
are unsupported for building Qt.

Change-Id: I02a622c89f725c3ae5b51ea345a530eaa5529976
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 08d1d113f140b1b4be5a387696a8a35934905d64)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:49:28 +00:00
Tor Arne Vestbø 11c8b80f4b macOS: Avoid creating 0x0 size IOSurface in backing-store
During screen attach/detach, we may end up in a situation where the
window has a 0x0 size, and we end up painting to the window, in which
case we were trying to create an IOSurface of size 0x0. This resulted
in the creation failing, triggering an assert.

We now guard the surface creation with a check for the backing store
size being non-empty, and for empty sizes we fall back to a plain
null-QImage for our paint device.

Fixes: QTBUG-128731
Pick-to: 6.5 6.2
Invaluable-research-by: Viktor Arvidsson
Change-Id: I06ea582c87fb0d359387ef9495451801612701c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 58caa18d2ff1a67e16f960f5bd6b804cdaec4063)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:49:27 +00:00
Timur Pocheptsov dc885e39c9 QFileDialog: disconnect nativeEnterDirectory in dtor
QIOSFileDialog emits directoryEntered from its hide/setVisible
after QFileDialog is a QDialog already (in the process of destruction).
This results in an ssert: "ASSERT failure in QFileDialog: "Called object is
not of the correct type (class destructor may have already run)"",

Fixes: QTBUG-130133
Change-Id: I8471a8434f7ea854a91b989bb3a6f3b962143ea8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 2083daf79bc53a65a821e1cd3463638ac0c65f2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:49:25 +00:00
Christian Ehrlicher 993fa70777 Windows11Style: add two helper functions to avoid code duplication
Add and use the two helper functions
 - buttonFillBrush() returning the correct fill brush for a button
 - buttonLabelPen() returning the correct pen for a button

Change-Id: I6ee0dbe2490ad5c875b75d13b48371b5e798c290
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 436abff5cce198bb90c90e92104922373a3f99cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-19 06:49:13 +00:00
Thiago Macieira 70daae20b1 QThread: use load/store operations with explicit ordering
The implicit load is an acquire, which isn't necessary in any of these
cases, including the two liens changing the store: they were creating a
temporary QAtomicPointer, which introduced the loadAcquire().

I've left the qCDebug() lines alone.

Pick-to: 6.5
Change-Id: If45e068eaaf3cd4d2c81fffd1459a779b4eb4110
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 6806391600b5398d4fdb3c4d2d5e442289522756)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-18 16:10:08 +00:00
Tor Arne Vestbø 34740b9363 qwsi: Teach handleContextMenuEvent about synchronous delivery
Which also lets it return the acceptance state of the event.

At the moment the acceptance state of QContextMenuEvent is a bit
of a mess, so the QWSI acceptance state can't be trusted, but
this opens up the door to using it at a later point.

Task-number: QTBUG-67331
Change-Id: I75b586f90e25122bc9e25880d3787740b025c892
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit bbc3a7d7ba683c71de4662a1eeac0b7d3dfa6b11)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-18 12:27:34 +00:00
Tor Arne Vestbø 85ec8df827 macOS: Reflect QWindow's color space after creation
If an explicit color space has been set, we assume that we can apply
that to the CAMetalLayer or IOSurface we use when blitting our content.

If not we want to reflect the NSWindow's color space, which will in turn
reflect the NSScreen color space.

Task-number: QTBUG-129499
Change-Id: Idc465af39dafc80be0edd014abc55eb501ae1f89
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit a3a691c5a359ad1c3f76248c270273ec13fe96fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-18 12:27:32 +00:00
Tor Arne Vestbø bb80366b1c iOS: Don't intersect window maximized/fullscreen size with nil UIWindow
When making a QWindow maximized or fullscreen we intersect its final
geometry with that of its UIWindow, as in the case of split-view or
floating windows on iOS the UIWindow size will be smaller than the
corresponding UIScreen.

However, after 76ebf51bc0 we no longer
track UIWindows via UIScreen, and instead manage them as part of the
UIWindowScene. Unfortunately the default scene that iOS manages is
created and connected after returning from didFinishLaunching, which
means that during main() there is no UIWindow. Attempts at manually
connecting this session before main via activateSceneSessionForRequest
were not successful, as we don't support multiple window scenes (yet).

Intersecting the window geometry to this non-existent window during
setWindowState() would result in an initial 0x0 size for windows.
Which would normally be okey, because once we have a UIWindow we re-
apply the window state, resulting in new QWindow geometry.

However the initial 0x0 size can in some rare scenarios trigger
QWidgets into setting the Qt::WA_OutsideWSRange attribute on the
top level widget, and due to a possible bug in QWidgetWindow, this
attribute is not reset once the QWidgetWindow receives an updated
resize event.

As a workaround for the widget issue, and to restore the semantics
of receiving an initial valid size of the window, we skip the logic
of intersecting the geometry with the UIWindow if we don't have one
yet.

Note the for visionOS and iOS applications running on macOS we
rely solely on the UIWindow for geometry, which means that this
issue still exists in those environments as long as the underlying
widget issue is not fixed.

Fixes: QTBUG-129472
Change-Id: Id81c356446f6e69f8a1eda59272ac04f02cc005f
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit b78baf634c6c2b8165432bf1e22a96abb2016f42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-18 12:27:31 +00:00
Even Oscar Andersen 2bd01602dc wasm: Fix tooltip visible
Fixes a problem where tooltips only worked for the first instance
activated.

(cherry picked from commit d69348ed4d659f9408ce74f3b08ee7e9104dde00)
Fixes: QTBUG-129234
Change-Id: I45619b1ca8001b74b148b98a8795000630dcacf7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-10-18 06:07:13 +00:00
Christian Ehrlicher 9e22cd089e SQL/PostgreSQL: fix parsing timestamptz return values
When setting the timezone explicitly to something different to the
localtime (e.g. UTC), the strings returned for timestamptz columns
contain a '+xx' annotation which resulted in a parser error.

Fixes: QTBUG-129983
Change-Id: I4f5e45860e88a5c44b2f1409dae667984ac90913
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 00edd47762df96614a38f1362c2131e539e43abd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-18 05:10:08 +00:00
Ahmad Samir 55a8050d1e QDirIterator: don't crash with next() after hasNext() returned false
The typical use-case is calling hasNext() first before using next, but
the API docs say that calling next() even when hasNext() is false,
should just return an empty string.

[ChangeLog][QtCore][QDirIterator] Fixed a crash that happened if you
called next() after hasNext() had already returned false. Ideally you
should never call next() without first calling hasNext() as that could
lead to unexpected results (for example, infinite loops).

Fixes: QTBUG-130142
Change-Id: If0a8b1fe7dbd13b45793409a7a241e53c7257f24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c7691842f743f568a073582c8f0cacd6ee188f98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-18 01:52:28 +00:00
Thiago Macieira e25150ca29 QFactoryLoader: fix the ability to load symlinks to plugins
Amends commit 7cf39bd785, which changed to
use QDirListing but used FilesOnly. As documented, that does not include
symlinks to files.

I'm updating a few other uses of FilesOnly where they were ported from
QDir::Files and it would be reasonable to expect that symlink to files
would be included. That's why I've left QNetworkDiskCache alone.

Fixes: QTBUG-130109
Change-Id: I1fa195b42fd5e00be157fffd6c861f6ddb1eeed1
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 56fa23911c3a0681de39601489d51805e208dc03)
2024-10-17 17:01:41 -07:00
Tor Arne Vestbø 5baa0d759b iOS: Don't intersect window maximized/fullscreen size with nil UIWindow
When making a QWindow maximized or fullscreen we intersect its final
geometry with that of its UIWindow, as in the case of split-view or
floating windows on iOS the UIWindow size will be smaller than the
corresponding UIScreen.

However, after 76ebf51bc0 we no longer
track UIWindows via UIScreen, and instead manage them as part of the
UIWindowScene. Unfortunately the default scene that iOS manages is
created and connected after returning from didFinishLaunching, which
means that during main() there is no UIWindow. Attempts at manually
connecting this session before main via activateSceneSessionForRequest
were not successful, as we don't support multiple window scenes (yet).

Intersecting the window geometry to this non-existent window during
setWindowState() would result in an initial 0x0 size for windows.
Which would normally be okey, because once we have a UIWindow we re-
apply the window state, resulting in new QWindow geometry.

However the initial 0x0 size can in some rare scenarios trigger
QWidgets into setting the Qt::WA_OutsideWSRange attribute on the
top level widget, and due to a possible bug in QWidgetWindow, this
attribute is not reset once the QWidgetWindow receives an updated
resize event.

As a workaround for the widget issue, and to restore the semantics
of receiving an initial valid size of the window, we skip the logic
of intersecting the geometry with the UIWindow if we don't have one
yet.

Note the for visionOS and iOS applications running on macOS we
rely solely on the UIWindow for geometry, which means that this
issue still exists in those environments as long as the underlying
widget issue is not fixed.

Fixes: QTBUG-129472
Change-Id: Id81c356446f6e69f8a1eda59272ac04f02cc005f
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit b78baf634c6c2b8165432bf1e22a96abb2016f42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 23:40:16 +00:00
Tor Arne Vestbø e3594963f3 macOS: Reflect QWindow's color space after creation
If an explicit color space has been set, we assume that we can apply
that to the CAMetalLayer or IOSurface we use when blitting our content.

If not we want to reflect the NSWindow's color space, which will in turn
reflect the NSScreen color space.

Task-number: QTBUG-129499
Change-Id: Idc465af39dafc80be0edd014abc55eb501ae1f89
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit a3a691c5a359ad1c3f76248c270273ec13fe96fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 23:40:16 +00:00
Tor Arne Vestbø 787b221308 qwsi: Teach handleContextMenuEvent about synchronous delivery
Which also lets it return the acceptance state of the event.

At the moment the acceptance state of QContextMenuEvent is a bit
of a mess, so the QWSI acceptance state can't be trusted, but
this opens up the door to using it at a later point.

Task-number: QTBUG-67331
Change-Id: I75b586f90e25122bc9e25880d3787740b025c892
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit bbc3a7d7ba683c71de4662a1eeac0b7d3dfa6b11)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 23:40:16 +00:00
Thiago Macieira c3fd08e42c QThread: use load/store operations with explicit ordering
The implicit load is an acquire, which isn't necessary in any of these
cases, including the two liens changing the store: they were creating a
temporary QAtomicPointer, which introduced the loadAcquire().

I've left the qCDebug() lines alone.

Pick-to: 6.5
Change-Id: If45e068eaaf3cd4d2c81fffd1459a779b4eb4110
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 6806391600b5398d4fdb3c4d2d5e442289522756)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 23:40:15 +00:00
Christian Ehrlicher 8ebf6dcd12 SQL/PostgreSQL: fix parsing timestamptz return values
When setting the timezone explicitly to something different to the
localtime (e.g. UTC), the strings returned for timestamptz columns
contain a '+xx' annotation which resulted in a parser error.

Fixes: QTBUG-129983
Change-Id: I4f5e45860e88a5c44b2f1409dae667984ac90913
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 00edd47762df96614a38f1362c2131e539e43abd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 23:40:15 +00:00
Øystein Heskestad 85c3a2f544 Regenerate certificates for qsslserver auto-test
The 'not valid after' date was set to the last day of 9999 which the
date time parser could not handle. Set the expiry year to 2050 and
regenerate keys with length of 3072 bits instead of 2048 bits.

Fixes: QTBUG-129504
Change-Id: Iaede785264c1d31b021ccabc9d1aaf949c8922f2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a5364a279e9ed9bc69a13698f9b43dbe36d0a326)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 19:30:35 +00:00
Mate Barany d8128041e0 Add type annotations to LocaleKeySorter
Task-number: QTBUG-128634
Change-Id: I9a4261746cac029b0abf26fbd03b1915a0035147
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit bd475ddf47e33535c2b79367c8850cd611089e3c)
2024-10-17 19:30:34 +00:00
Assam Boudjelthia bbf819dd23 Android: unset QT_IM_MODULE when running Android tests
This environment variable might be set by some party (not quite sure
what, maybe the host OS), and when androidtestrunner passes QT_* vars
it might interfere with the input tests.

Change-Id: I2a88c78535d6e3a809e8fcee8f8d752f91044a8c
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 26016bc6d42f050b7095579150eee34bc69343f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 19:30:34 +00:00
Assam Boudjelthia 359abfdf9b AndroidTestRunner: forward QT_* env vars to the tests
Forward QT_* env vars to the test same like QTEST_* vars,
this can be useful when debugging, this would allow us to
pass QT_DEBUG_PLUGINS.

Change-Id: I9404ff7c7276f87e3e7d9cf57fa8f5b1eed02eb7
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
(cherry picked from commit 574c966ac8ce0527e14e6cb5dc23a4a411fc8003)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 19:30:34 +00:00
Tor Arne Vestbø 0af10419ab macOS: Implement NSViewContentSelectionInfo protocol for Writing Tools
The protocol is documented (in the header) to be used for context menu
placement, but is also used for placement of the Writing Tools dialog.

We don't have a way to request the selection rectangle via our input
method protocol, so for now we have to use some crude heuristics based
on the cursor and anchor rectangle. This quickly falls apart for multi
line selections, but should not be any worse than the behavior we have
today where we effectively report the entire QWindow rect, placing
the Writing Tools popup outside the window. With this patch we at least
place the popup relative to the focus widget.

Change-Id: I28053aab93a42133ae2ccc552fcb4172bf55a634
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit ae788f5508a11c8f3f7e3d89b3536f7ec9786639)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 19:30:34 +00:00
Tor Arne Vestbø 868e5de059 macOS: Document firstRectForCharacterRange:actualRange
And add a note about the missing logic for when the range is non-zero.

Change-Id: I31e8ab55afa022aa4d72c3f23920b3f5beba9fc6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9f326390d91a7c721770d0f8bf7ed88c7fe72d20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 19:30:34 +00:00
Tor Arne Vestbø bc83fb11a1 Document how to create a QColorTransform via QColorSpace
Change-Id: If651a4f17f52ff784bc0832440f41fb30cd29371
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 5effd7ad53997a5a1edcba09457036971cbdcd54)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 19:30:34 +00:00
Tor Arne Vestbø f6fa4c4145 macOS: Handle NSAttributedString in insertText:replacementRange:
The text being inserted is not necessarily an NSString, but can also be
an NSAttributedString, as seen e.g. when Writing Tools inserts a
replacement.

Change-Id: I03585008d105332abd3b470f24305664766213f0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit c467edcf0ac8d5aa4c36b2f512e3c762cbd5d373)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 19:30:33 +00:00
Edward Welbourne c5e38fd385 Fix sorting of timezone alias table to be in case-insensitive order
The lookup into it is done case-insensitively (because user-supplied
names of zones might not have the right case) but I forgot to make the
sorting of the data table case-insensitive in the aliases. Regenerate
data: only the qtimezone*_data_p.h are changed by the reindexing of
zone aliases.

On picking to 6.8, drop the change to QTZlocale_data_p.h, as that's
not active until 6.9; and back-date the QTZprivate_data_p.h to match
the change on dev four days ago, as that might just reduce the risk of
later conflicts.

Change-Id: Id5e95c245c7ca421a77298f23baefe6b7021a396
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ff58e09c8d5b3f505d5d3fe9a205e35e96de922d)
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-10-17 21:30:33 +02:00
Mårten Nordheim ba526d4b84 QOperatingSystemVersion: fix documentation for the Unexported entries
They were not showing up because the qdoc branch sees them as private.

Change-Id: I8be18c389288ff9b589267dd17fbc16dcd7998c7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 5be7b99a160a4cc973fcd82e3ab15e4272814b14)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 19:30:33 +00:00
Milla Pohjanheimo 3b3c3f1bfe Add 6.8.0 binary compatibility file
Generated against desktop binary from 6.8.0 gcc_64 from installer.

Task-number: QTBUG-129008
Change-Id: Iea5705cb0491bf9e01129dc8855efbd20df497dd
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 7767e05ed7f7c573fe4c51b0a88f68379f58e04d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 19:30:33 +00:00
Thiago Macieira 81b71852fa Darwin: Capture 'this' via '&' instead of '=' to fix build with C++20
qdarwinpermissionplugin.mm:37:35: error: implicit capture of 'this'
with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]

Change-Id: I05afd05f43ddceb88cb5fffd85959b494c29ce6a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0990bd49407aac4f96acf78761af1070ff934215)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 16:36:38 +00:00
Edward Welbourne 3167b157cd Remove untruth from QDateTime::fromString() documentation
Two examples were given, one to show "invalid" usage that would, in
fact, work now - producing a date in 2012 - and the other to show
"correct" code which, while correctly delivering the date in 1912 its
author appears to have meant (albeit, giving a four-digit year would
have made that clearer), uses the string API where code should
normally construct dates - much more efficiently - by just passing the
numbers to suitable constructors.

Add tests verifying that the two date-times from the out-of-date
examples do in fact work, even if you tell them the wrong century as
default for two-digit dates.

Pick-to: 6.7 6.5
Change-Id: I8155af019c80729323ba3958fe3942a72bfefc22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 82d85c16d912b25bfa5b0a081e515fcecda1f975)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 16:18:37 +00:00
David Faure dcea42ea5d QTableView: fix dropping between items when precisely on the cell border
There's a one-pixel horizontal line between two cells where
indexAt(pos) returns a valid index and visualRect(index) doesn't contain
pos, because of the 1 pixel cell border.
So this code (whose origin predates public git history) would turn the
valid index into the root index, leading to an unexpected append instead
of insert.

The only other case I could find where this condition happened was when
dropping onto the branches of a QTreeView, but even there it seems much
more expected to drop on the item (or between items) than on the viewport
(which often means append at the very bottom, far from the drop area).

Change-Id: Ia7c884d3fc925a7536ea3ab75851366c531d8438
Fixes: QTBUG-130045
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit f9336a05bccaf8d287f949e3263e07f2e437835c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 16:14:31 +00:00
Alexandru Croitor e87795850e CMake: Add configure-time dependency on project attribution files
Otherwise the SBOM is not regenerated if the attribution files are
modified.

Task-number: QTBUG-122899
Change-Id: I5b3f62e254aa70021ed06fac73f881bcbb110c31
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit e579b2884e68292e535bc773502f68ad083860cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 09:00:45 +00:00
Alexandru Croitor 4053101001 CMake: Improve pri library handling for genexes and friends
After 4dce218ac400afcb54aa2a85a0b27947fec583cb got merged, we started
considering the INTERFACE_LINK_LIBRARIES property of UNKNOWN_LIBRARY
targets in addition to INTERFACE_LIBRARY targets, when collecting
dependencies for pri file generation.

These can contain genexes like $<LINK_ONLY:...> or
$<TARGET_OBJECTS:...>, which are not supported by file(GENERATE),
or special directory scope tokens like ::@, which are not valid
targets or library names.

One such case was in the downstream vcpkg build of Qt which adds
`$<LINK_ONLY:EXPAT::EXPAT>` to the INTERFACE_LINK_LIBRARIES of the
Fontconfig::Fontconfig target.

We strip or handle these cases for prl file generation as part of
calling __qt_internal_walk_libs.

Change the pri generation to handle them in a similar manner by copying
over the same logic.

Amends 4dce218ac400afcb54aa2a85a0b27947fec583cb

Fixes: QTBUG-129471
Change-Id: Id4a574ee2411f6d64179c419f352168fde1914d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 93df3de1f30b6f65b025b33e9cd73ad479295e59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 09:00:40 +00:00
Alexei Cazacov 482287debb Docs: Update images for Widgets and remove unused images
This commit updates the images used to illustrate Qt Widgets.
The commit also removes old unused images.

Task-number: QTBUG-69988
Change-Id: I89e363c6c854c36bb0d763532d4cb359bdc85a38
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 10e0ce7f8251fb4449152ba9979076930424d011)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-17 08:00:17 +00:00
Volker Hilsheimer 608abab511 QListView: don't ignore an event accepted by a subclass
If a subclass reimplements dropEvent() to accept a CopyAction, then
don't ignore the event again in the QListView implementation. We only
have to ignore a MoveAction event if the handling so far didn't actually
move the data, so that the QAIV implementation can handle the removal
of the source data if needed.

Complex interaction between QListView and QAbstractItemView,
especially in IconView mode, and sadly not generally unit-testable, like
all drag'n'drop interactions (due to modally blocking QDrag::exec on
most platforms).

Fixes: QTBUG-103898
Change-Id: I032c27e2788ec7e652a830383d8400b06b57d8cb
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 690184cf25902e5351189c37ef823a97aaf8135a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-16 23:51:50 +00:00
Eskil Abrahamsen Blomfeldt fdaf9c1a2e Update to Harfbuzz 10.0.1
This also deletes the compilation fix patch file,
as this has now been applied upstream:

1c01944e93

[ChangeLog][Third-Party Code] Updated Harfbuzz to 10.0.1.

Fixes: QTBUG-130136
Pick-to: 6.5 5.15 5.15.8
Change-Id: Ie250dcaf95ef83b27ae5a681d4245b8b94ae6594
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit cc8a71e211f981b8170a5d6df05486bdb396be03)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-16 23:43:13 +00:00
Edward Welbourne 9b6a585f71 QTimeZone: short-cut the empty-name case for the system zone and its id
The systemTimeZoneId() delegated to systemTimeZone() in a way that
worked - but wasn't easy to follow - in the case where the backend's
systemTimeZoneId() failed but its default constructor succeeds. This
went via the QTimeZone(id) constructor, relying on its handling of
empty id (which gets the system zone, unlike the default constructor
which gets an invalid zone). When it gets an empty id, it falls back
to newBackendTimeZone(), which uses the default constructor of the
backend; and we have (and are even accessing the backend methods via)
a default-constructed backend, so can simply share that with
global_tz. This, if nothing else, saves repeating the systemTimeZone()
look-up for the system ID when delegated to by systemTimeZoneId().

There's a risk that this might miss a change to the system
configuration since the global_tz was initialized, but it's only used
in a fallback and backends tend to cache this information anyway. When
we come to address QTBUG-56899, we can have the refresh function
update the global_tz object.

Change-Id: I8541e74f378e92af5a2a7187a49a9eb14a66c744
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2068645f07ab9108fc54fa2c499b1b2661a35bfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-16 11:15:43 +00:00