65734 Commits

Author SHA1 Message Date
Volker Hilsheimer
59ff87dc91 Windows: clean up System Tray Icon message icon
The handle is not owned by the Shell, we have to clear it up ourselves.
The documentation is not clear about how long the handle needs to be
kept alive, so store the icon when we create it as a member of the
private, and clean it up when it need to be recreated, or when the
QSystemTrayIcon instance gets destroyed.

Fixes: QTBUG-96348
Fixes: QTBUG-62945
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I6f93f29a415cde2cfe4e1b296295783c15b4da4b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit afb74a86d8cd1ac6463fa804300480967101d7d7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-28 20:19:43 +00:00
Edward Welbourne
a3a2d3df20 Also check available in TZ timezone's constructor
Follow up to commit 00d9a9a9b59650b8e297f91dcc600c377da5bceb - as
commented in the QTZ constructor, one of the reasons for the prior "is
available" check was to avoid creating TZ cache entries for it; so
have the TZ backend also (like ICU) overtly check for availability
before trying to find data for the given ID. This duplicates work done
later in the constructor, which can perhaps be optimised out later,
but is no worse than where we were before the commit mentioned above.

Pick-to: 6.6 6.5
Task-number: QTBUG-121807
Change-Id: Ie0571df2de2bf0a3f4ee767184e58b378e8cb05a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ec9ca7ac43cfebc74afc03de338f81a879354b2a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-28 18:50:34 +00:00
Alex Bu
684aec428a Fix the instruction of RISC-V arch that yield CPU
Replace fence with pause in opcode form,
as GCC doesn't support fence operand.
Amends a7f227f56cfe562280e89d3c73040f7e8384129e.
Remove the builtin pause checking,
as in GCC13 this will always pass,
while the opcode pause works
regardless of the pause extension.

Task-number: QTBUG-103014
Change-Id: I26e3c3b9f7d234be24abe1570aaf4c8cb3a272b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 61bd614abea0cbff83595ebf31b0beeccaef5304)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-28 18:50:32 +00:00
Pavel Dubsky
4baeef91d3 Replace QWindowsComBase with QComObject
Currently with have two base classes for COM-objects that implement
basic IUnknown functionality and the idea is to remove duplication and
keep just one. Since QComObject supports more features than
QWindowsComBase, such as multiple inheritance and intermediate interface
querying, we should switch to the former one.

Change-Id: Ief6567496de9f547b936de91d634c6998ba59a75
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4a705f5f29aa5ffce8db87fe54f7e70c08124d80)
2024-02-28 10:41:54 +00:00
Thiago Macieira
f5738ab463 QThread::currentThreadId: fix build on x32 (ILP32) ABI
On this ABI, pointers are 32-bit, so Qt::HANDLE (void *) is a 32-bit
variable and the "movq" instruction is inappropriate.

There's a GCC extended inline assembler modifier for the instruction
size suffix (%z0) but Clang seems not to understand it. Instead, I just
removed the suffix: we can do that because this is a memory load
instruction, which implies the destination is a general purpose register
(also required by the "=r" constraint) and therefore the assembler can
determine the size of the memory load from the name of the selected
register.

Note: I did not verify this compiles on x32 at all, much less that it
loads the right thing from memory.

Fixes: QTBUG-122674
Pick-to: 6.6 6.5
Change-Id: I01ec3c774d9943adb903fffd17b6513d146e89ce
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 08349ef0fe3902504987d12ebe0ed9674ed1e486)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-28 01:42:30 +00:00
Thiago Macieira
5fea2d374b QPainterPath: detach and reset before streaming in
Otherwise we end up appending and modifying the shared object.

Pick-to: 6.6 6.5 5.15
Task-number: QTBUG-122704
Change-Id: I01ec3c774d9943adb903fffd17b692c2e6d53e97
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2925683268ca9d8dc6811f8f64c50ca488b27acc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-28 01:42:30 +00:00
Thiago Macieira
20c44b7bac QStringView: stop instantiating std::char_traits<QChar> and <uchar>
It's deprecated and will be removed with LLVM 19.

Amends b1ee49b46533d39f7fabda68d0bd08a1ab130a27.

Change-Id: I5dd50a1a7ca5424d9e7afffd17ad07b3ab3fc18a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit dc2ae08e02730ab795445bc047221aa56914f723)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-28 01:42:30 +00:00
Andy Nichols
5f4c74f045 Doc: Fix typo in QSurfaceFormat::setDefaultFormat documentation
Fixes: QTBUG-107486
Pick-to: 6.5
Change-Id: Id22cedfa65e831574f683a33a4c2fde20570890e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d83b5350689242e7815a2c2e6b6168fe1f67d943)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-28 01:42:29 +00:00
Mårten Nordheim
4d3a69cea3 Schannel: check that plainsocket is open before use
In reality I think it should be covered elsewhere, before reaching
the TLS code. But this is a simple fix to avoid an unnecessary warning.

This is actually quite similar to the resolution in
ef4ba0285f9c5dd5ee2dca1e0cefee45eba3477c.

Technically checking isWritable would be more correct, but Qt is usually
the one to open the socket, and we open for both read and write anyway.

Fixes: QTBUG-116550
Pick-to: 6.6 6.5
Change-Id: I4996b18b5b65c434d91543451186f335e201604f
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 74f16c0ed5f0e0bb05e8a9b40266524cec8e4257)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-27 20:37:38 +00:00
Mårten Nordheim
6c30199c45 Http2: handle empty hpack block for headers
When adjusting handling for the special traling HEADERS with PRIORITY
case the actual no-headers case handling was lost.
This patch adds it back.

Now it deals with it being empty due to overflow or just empty headers.

With a real server this should never happen though, since they either
send the required headers or don't send a HEADER frame at all. So, in
theory it will not have caused a problem for users.

Pick-to: 6.6
Change-Id: Iacbb1183f26cb1f2e7e30ace6456488c4671972d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit a680838be4cf9eee44d7977722cd5acf3422f5ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-27 20:37:23 +00:00
Jonas Karlsson
6b0cb98478 Revert "QHeaderView: relayout on resetDefaultSectionSize"
This reverts commit a8df174369cecd90f14dac85bf162353b7cb25d1.

Reason for revert: Caused QTBUG-122109

Pick-to: 6.6 6.5
Fixes: QTBUG-122109
Fixes: QTBUG-120699
Change-Id: Iea185c00f35e17d8eb8e8da70dc2d808ea274b04
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c1921abf65092f4732435a92732c8c11224d31fb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-27 09:19:09 +00:00
Axel Spoerl
d47c40d51e qmessagebox.h: Remove redundant semicolon after Q_ENUM
A redundant semicolon after Q_ENUM(StandardButton) caused a compiler
warning.

Remove it.

Fixes: QTBUG-122637
Pick-to: 6.6 6.5
Change-Id: I959c0c6d56bc312ad40f18c9455f4e6118b1c7c2
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 9af3a6c146a408b42540e9aefbe8feca096dcad3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-27 07:30:04 +00:00
Thiago Macieira
b7b11c8095 tst_qmessagehandler: disable the backtrace tests outside of x86
As the comment says, on most RISC platforms, the return address need not
be on the stack in the first place. In fact, in all ones currently
supported by Qt, it's passed in a register to the callee, which has the
option of simply saving it in a callee-save register when calling leaf
functions. Even if it is using a frame pointer, the compiler can simply
use any register. That means unwinding the stack is not possible in the
absence of either debug information or stack-unwind information, neither
of which backtrace(3) will use.

Strictly speaking, even on x86 the compiler can use the RBP register for
any purpose and thus make getting the backtrace() impossible, but in
practice it seems to work.

Fixes: QTBUG-121389
Change-Id: I5dd50a1a7ca5424d9e7afffd17acbd01ef916f5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 03f1ea3dcb956c69216084d1df3a21f460c8475b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-27 07:29:53 +00:00
Thiago Macieira
da85678c25 QProcess: set the error message and state if qt_create_pipe() fails
It can only happen on resource exhaustion, which is an unlikely
situation. That's probably why we didn't handle this case. But let's do
it now.

This necessitated that qt_create_pipe() return with errno/GetLastError()
properly set, so save it and restore around functions that may change it
(like qErrnoWarning()).

Drive-by update of some warning messages.

Testing this is not practical and is fragile, because it requires
causing the resource exhaustion problem.

Pick-to: 6.6
Change-Id: I76ffba14ece04f24b43efffd17aafe4f11f54c21
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b653e05c92dd137ca2994d9d97bea839ca9a5e73)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-27 07:29:53 +00:00
Paul Wicking
a49bf6fc6a Doc: Use QDOC_PROPERTY for QRhiWidget::autoRenderTarget
`autoRenderTarget` is a private bool that very much looks like it's
used as a Q_PROPERTY. Use QDOC_PROPERTY for it to generate warning-
free documentation.

Change-Id: Ia6255287f139ff23172c4fac96950e1a37eeef83
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 2fb8c2d5c331b1bc30a54e803e1cd17cf534fc32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-26 21:34:55 +00:00
Dimitrios Apostolou
090acf35d1 Print output of failed tests only once
Pick-to: 6.6 6.5
Fixes: QTBUG-118983
Change-Id: I4473f64a7f9ec838a2bc2f705af77fb4c5df35de
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 9379b634a8a49d809441b0616bac7733dad670ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-26 21:34:48 +00:00
Axel Spoerl
ca34c1c647 Fix build without PDF
tst_baseline_painting and tst_qpdfwriter rely on QT_FEATURE_pdf being
enabled, without making it a condition to build the tests.

Don't build the tests with PDF disabled.

Task-number: QTBUG-122137
Pick-to: 6.6 6.5
Change-Id: Idbf03f30557618c83e946a80b7759cd4f6978ad5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 90a6415bedfc4ce1a934c3a36271b20c1a6a606a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-26 21:34:30 +00:00
Eskil Abrahamsen Blomfeldt
84bbfd9c62 Fix color fonts with DirectWrite backend
The logic to detect color fonts in the GDI font database was never
implemented in the DirectWrite database, causing emojis to look
monochrome. The patch moves this into the font engine itself instead,
along with the other initialization code.

Fixes: QTBUG-122168
Change-Id: I6f5dad579bd987149e613b8071821aaf70a89bc2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 6bd85d4a27ba2e934fa76a430f2e1d55c08d379d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-26 21:34:25 +00:00
Simo Fält
233ce5b018 COIN: Move skipping Debian instructions to qt5 repo
Pick-to: 6.6
Task-number: QTBUG-122447
Change-Id: I385d60d891c68edc3aa053d3561335a46b26923b
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit df1efc70b0cb3eeff4c59adbf58702af1d9a9200)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-26 21:34:20 +00:00
Christian Ehrlicher
03514d8f2c SQL/SQLite: handle option SQLITE_OPEN_NOFOLLOW
Since SQLite 3.31 there is a new open() option SQLITE_OPEN_NOFOLLOW to
disallow a filename with a symlink for security reason. Expose this
option to QSQLite via QSQLITE_OPEN_NOFOLLOW.

[ChangeLog][SQL][SQLite] Add new option QSQLITE_OPEN_NOFOLLOW to expose
open mode SQLITE_OPEN_NOFOLLOW.

Change-Id: I2d6218bde2bf8b4f1bc36125dffa551b52369072
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3379fd2322d112af4ef7ce75aafe18c27746acae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-26 21:34:13 +00:00
Giuseppe D'Angelo
ecaf35b4c5 Text widgets: document find() behavior with QRegularExpression
The various find() overloads that take a QRE *ignore* the case
sensitivity option set on the QRE object itself. They instead apply the
case sensitivity passed in the flags (see QTextDocument::find).

I think it was an historic mishap, but it's too late to change now.
Amend the documentation.

Change-Id: I526650d89a98777c7bb839b27d2f2e536a43ca4f
Pick-to: 6.6 6.5 6.2 5.15
Fixes: QTBUG-88721
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
(cherry picked from commit 3ec9331c341767b1430eb2b14df02383226e25e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-26 21:33:52 +00:00
Tim Blechmann
a4c158effe corelib: settings - make qsettings.cpp unity buildable
Both qsettings.cpp and qjsonparser.cpp defined Space in the
global namespace. Hiding it in one of them in an implementation
namespace resolves the name clash.

Pick-to: 6.6 6.5
Change-Id: I8dd1244f80d87f3908597ed82c8e41b49b7b916c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 4ff65f0e5615b1132ec13c6eeba3647162d8dd0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-26 13:22:43 +00:00
Lauri Pohjanheimo
e31fef039d Android: run runAction() actions in onPause state
Fixes QTBUG-113255 by running graphics related actions also onPaused state when the paused app is visible. Also corrects possible other
problems where UI should be updated while app is onPaused state.

Fixes: QTBUG-113255
Change-Id: I02ee6b0713ec5f08ebba676c5edf94d2c1f81958
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit b01a8075193afce3934f1ec436241784d9811bce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-26 10:23:36 +00:00
Marc Mutz
3de01e4e64 QOperatingSystemVersion: clean up after QOSVBase extraction
When 3446313c7a5cd6005089866a7b20c9f28e132a0a extracted most functions
from QOperatingSystemVersion to a new unexported
QOperatingSystemVersionBase, for BC reasons, it kept the existing QOSV
methods as (inline or out-of-line) forwarders to the new QOSVBase
ones.

But the only ones that are actually still required are currentType(),
type(), and isAnyOfType(), because their Base equivalents use a
different enum type (we should probably make the OS Type an enum in
namespace Qt instead; other patch).

The others can just be REMOVED_SINCE, and should be, to make new code
use the base class implementations, where inlining and constexpr
properly work (they don't, on Windows, in exported classes).

Re-use the existing REMOVED_SINCE(6,3) block in removed_api.cpp to
move these functions there.

Amends 3446313c7a5cd6005089866a7b20c9f28e132a0a.

Reverts a tiny part of 215677818470e48e9090d7ae4411e1fea62207b8 (will
conflict in backports).

Pick-to: 6.6 6.5
Change-Id: I1d7ba784634ccd7c9ba5f7ceddb15b7787468d31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1214edc0d94fd8b3c0d2660879d9175256c14bbc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-25 11:23:54 +00:00
Chris Lerner
dfa4ebc150 tst_QWidget::realFocusChain: don't remove from iterated QList
The method removed from QWidgetList widgets in a ranged for loop.
That caused items being skipped.

Create a new list by adding positives, instead of removing negatives
from the original.

This amends b1802a164b8682ed9e8956a5a19a90ade65c25d0.

Pick-to: 6.6
Change-Id: I3f329290187ddc76169ababe8ffa6059d953212d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 086897a1ae8e8d5bb1c1c1c18375eacba9ec97a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-24 13:49:09 +00:00
Alexey Edelev
6d809221f2 Add the external reference to CMake package creating docs
Pick-to: 6.6
Change-Id: I70560afbc78ec901169779c2b30efec0bb8d67f0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit bb058909626410d22ccd74919d69cd747fbc33ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 21:43:26 +00:00
Volker Hilsheimer
7f8c6c90bf Blacklist tst_QApplication::abortQuitOnShow on Android
Task-number: QTBUG-122693
Change-Id: I48b62a47939037f58ca321e4498d8b98d79042d8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 28572aad1189b6823b1720aef720033978c67c0a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 21:43:26 +00:00
Mårten Nordheim
fa90e1a812 QLocal8Bit::convertToUnicode[win]: Fix order of growth and saturate
The order was wrong so we could have ended up saturating a 0
before we grew to 1.
Since this has never been in a release it is of no concern, and it was
already an edge-case anyway.

Amends 1090d5dd4ae5be898d4566314eda43b0283709d9

Pick-to: 6.6 6.5
Change-Id: I4b70f9018c3049697495a58313af148f8366c8bb
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 0d6b64bec6b555a6e534538a38d40259017f0de3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 21:43:26 +00:00
Volker Hilsheimer
a558e9172d Apple: use xmark.circle for the "clear" icon
Looks better as the action in a text input field.

Change-Id: I63fd9b963102919cf69f345723d1c5d83778f1f4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Karolina Sofia Bang <karolina.bang@qt.io>
(cherry picked from commit d51a47c316dcaf65f9cb82babc9ccfcd5ba62310)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-23 22:43:25 +01:00
Aurélien Brooke
5403bfedc8 RHI: fix Vulkan layout for PreserveDepthStencilContents depth textures
Vulkan fails when we attach a depth texture to a render target with
QRhiTextureRenderTarget::PreserveDepthStencilContents (we want to reuse
the depth data from a depth pre-pass.)

vkCreateRenderPass(): pCreateInfo->pAttachments[3] format is
VK_FORMAT_D32_SFLOAT and loadOp is VK_ATTACHMENT_LOAD_OP_LOAD, but
initialLayout is VK_IMAGE_LAYOUT_UNDEFINED.
The Vulkan spec states: If format includes a color or depth component
and loadOp is VK_ATTACHMENT_LOAD_OP_LOAD, then initialLayout must not be
VK_IMAGE_LAYOUT_UNDEFINED (https://www.khronos.org/registry/vulkan/
specs/1.3-extensions/html/vkspec.html#VUID-VkAttachmentDescription-
format-06699)

To fix this, just do the same as color attachments: specify a
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL instead of
VK_IMAGE_LAYOUT_UNDEFINED when the depth-stencil is preserved.

[ChangeLog][RHI] QRhiTextureRenderTarget::PreserveDepthStencilContents
now works properly on Vulkan

Change-Id: I0577bc8021b3598ddfdcea4af98aaef46e8a4519
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 9904686cf3e3fb59fa7839b2d16a6c78bb35bfa1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 21:43:22 +00:00
Laszlo Agocs
36d2fb1f9f rhi: d3d11: Fix depth texture by porting from the d3d12 backend
The newer D3D12 backend uses DXGI formats (for the texture, DSV, SRV)
that actually work. Backport these to the D3D11 backend. Otherwise
attempting to create a render target with a D24 or D24S8 QRhiTexture
as the depth/stencil buffer won't work.

In practice this is rarely exercised since the depth-stencil is
typically a QRhiRenderBuffer that maps to a
DXGI_FORMAT_D24_UNORM_S8_UINT texture but without
D3D11_BIND_SHADER_RESOURCE. Whereas textures get the latter flag,
and things break down. At least now the usage of typeless and
typed format is uniform. It could still be questioned if D24
should actually use R24G8_TYPELESS or if the original was fine,
but for now just sync with the D3D12 backend.

Pick-to: 6.6
Change-Id: I8a0564fc42a7866dae90f49f7b557c83dffc4d6e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 51106995cbf51af0c92b34119f6d254568a67540)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 21:43:22 +00:00
Laszlo Agocs
aaba67eea9 rhi: gl: Fix multisample texture specification
...so that MSAA is actually effective.

Pick-to: 6.6
Change-Id: I4bf85df1312773ec29154a51c9c8464912e6ef8a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 46366a14a41ec6db5ab4ab72c473a4a4e187d484)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 21:43:21 +00:00
Laszlo Agocs
f9557be6f6 rhi: gl: take sample count from textures too for RTs
Rendering into a multisample texture (color or depth-stencil) is
supported, but the code only seems to pick up the sample count from
renderbuffers.

Pick-to: 6.6
Change-Id: I95a97debfebc7582f2026282384f6fb97aadfe23
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit ce54e07dacd99ae9d532b6398cdeedc287ee2743)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 21:43:20 +00:00
Øystein Heskestad
8dd7aba7fd QDataStream: Turn QDataStreamSizes enum into static contexpr quint32
The special sizes NullCode and ExtendedSize does not need to be part of
an enum. Turning them into constants removes the need for some casts.

Task-number: QTBUG-119952
Change-Id: Ie7835c52f4642ab907b91f0eceac2ea7650e81da
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit fb81373313c4d1834437351aeb5df4a44303b93c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 15:39:53 +00:00
Alexandru Croitor
3d18b218dd CMake: Fix passing -DFOO=0 to configure.bat
Add a space before the redirection operator, so that the '0' in
'-DFOO=0' after '%*' expansion, does not get squished with the '<',
effectively redirecting from '0>' instead of stdout.

As a drive-by, also add a comment why we need the '.'.

Pick-to: 6.6 6.5
Fixes: QTBUG-122622
Change-Id: I74ea3a1fe751cc1f2ad216b309f6b24d6d5f6b7f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 0165a91bff80722d2384914dd40ca65a20fc1a47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 15:39:53 +00:00
Alexandru Croitor
a567d408b6 CMake: Improve doc page of the QT_WASM_MAXIMUM_MEMORY property
Fix typo in 'application'.
Emphasize MAXIMUM_MEMORY.
Link to the latest commit of settings.js instead of the master branch,
so the link doesn't break in the future.

Task-number: QTBUG-121705
Change-Id: If4bbdcc4fa33d86a892c81dfd1d2703386a0035b
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 3ec4a555599d352fa97272b8df612bf33e752878)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 15:39:53 +00:00
Nicolas Fella
74c59f8a23 QIcuTimeZonePrivate constructor: save iteration over all zone IDs
ICU returns a "valid" representation of GMT when given an unrecognised
ID, so QTZ's constructor has been checking the ID is available before
passing it to the backend constructor. That availability check was
done by generating the list of available IDs to see if the given ID
was in it; this is very inefficient. Furthermore, the QTZ constructor
was also checking availability, to work round the same issue in only
this one backend, making the check redundant.

So overide isTimeZoneIdAvailable() in the ICU backend, calling
ucal_getCanonicalTimeZoneID(), which answers the question directly;
and drop the duplicate check in the QTZ constructor. Expand a test to
verify an invalid name is rejected.

Fixes: QTBUG-121807
Pick-to: 6.6 6.5
Change-Id: I34f996b607b958d12607a94eb273bb1b406cca1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 00d9a9a9b59650b8e297f91dcc600c377da5bceb)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-23 16:39:52 +01:00
Mårten Nordheim
975ee89cea QHttp2Connection: confirm successive remote stream IDs are higher
And it should also apply to the promised streams, not separate ID tracking.

https://datatracker.ietf.org/doc/html/rfc9113#section-5.1.1

Change-Id: I6826a39c98f9b6a585200e628533843db731a85b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
(cherry picked from commit e247a6ce9ff83ef62424eef01d26cb752a4d2abc)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-23 09:28:23 +00:00
Kai Köhne
36d14d76fd Doc: Mention AA_DontUseNativeDialogs in QFileDialog
Pick-to: 6.6 6.5
Task-number: QTBUG-119551
Change-Id: I54f7e8f4b855b15d22b2180095cbf454b31412c3
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit d3117e97014af029b2c117daef9695b87103ab25)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-23 10:27:59 +01:00
Rayam Pinto
206000166f Implement icon mapping for Apple, Android, and Windows
Not all xcb icons have a corresponding icon on all other desktop
platforms, so we might want to remove those enums for which we have
almost no coverage in a follow-up commit.

Change-Id: I8fdc64f773768ce4ed1e0050f2a3bddef976e688
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 72d129c45e92eb55c64a336bb60a1ebca471241f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 09:26:26 +00:00
Julian Greilich
68d611a25c Revert "Android: move referral global field to local variable in QtActivityBase"
This reverts commit 5b5f4344daa4df023007cd59efdf8f36b00bb150.

Reason for revert: Without the key being public, we would have to duplicate this variable in our application code when fetching the stored referrer.

Change-Id: I46ad3618da9912c41f8248f871c24dd41015af2b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 950998223b68a247ac96f7e3ef92db9f89bfec0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 08:31:15 +00:00
Tinja Paavoseppä
ec9eb9d90b Android: Add QtEditText to QtWindow in constructor
Of course, createSurface() is called more than once, for example
when coming back from the background, and you cannot add a View
to the layout more than once, since this leads to an uncaught
exception and a crash.

So add the QtEditText once, in the constructor, as is indeed
sensible.

Fixes: QTBUG-122648
Change-Id: I7ef48951cd8a1c99935f5e96c70b6dbf0c745803
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 211e51b81ec9800161d0a98c6f70c747701035e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 08:31:04 +00:00
Petri Virkkunen
46ead3fbef Do not register focus listener for null view in QtEmbeddedDelegate
A null view can not be focused.

Change-Id: I0564dd554a304e2e60e3ae83c4782ac348edcd9b
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 14851471eefb8708a52981532ebaeed87509381f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 08:16:10 +00:00
Petri Virkkunen
f52e7c99e9 Move QtDisplayManager dpi calculations to functions
In order to use the same functionality from outside the class and avoid
reimplementation, moving the dpi minimum value check to functions.

Change-Id: I242b18fafab1b6283a46bda8b59e87adf50e5c0b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 7bbd39c4c9f345ae48781a212a6544e72757fd3e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 08:16:04 +00:00
Marc Mutz
030496750e QDBusIntrospection: make DiagnosticsReporter safe to use
Add a virtual destructor to this polymorphic class and disable copying
(requires to bring the default ctor back manually, and to export the
class nested in an exported class).

Amends 248d2103b5ef8f9cf8c1189cb67d78e1b6e741b7.

Change-Id: I9008e4ecebca34feac6ae92fa026f2673b652ba9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 02d7c8c069b93f7ddc1ccba462d8ff9ec3c1d806)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 08:02:09 +00:00
Marc Mutz
368f788ba1 QDBusIntrospection: fix position of Annotation definition
When 2e8a48c1cdc8547ec47f097a41dd53c641715b77 made
Annotations::mapped_type a struct Annotation instead of just QString,
it inserted the Annotation definition after the first inline user of
Annotations (struct Method).

I don't know why this compiled in the first place, but it did,
probably because of the re-parse-everything-at-closing-of-class rule,
but there's no reason to not move it to before the first users, so do
that.

Found while trying to make QDBusIntrospection a namespace instead of a
struct.

Amends 2e8a48c1cdc8547ec47f097a41dd53c641715b77.

Change-Id: I316cb5e49f3476adc5ff5abb023b9d74303ab640
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 448d4f847a263d88ee2149a728bcb390e15cefbc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-23 08:01:55 +00:00
Marc Mutz
175f2c4f33 QOperatingSystemVersion: fix UB (invalid static_cast)
When the QOSVBase we're constructing from isn't an actual
QOSVUnexported, the cast from QOSVBase to QOSVUnexported is
invalid. Instead of casting, add an QOSVUnexported(QOSVBase) ctor and
just call that.

Amends 215677818470e48e9090d7ae4411e1fea62207b8.

Pick-to: 6.6
Change-Id: I7352a044b62086585f1b036433f9b8779c77ac9d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit e3c831dc558de7e83c81fe09644db18013d5dd65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-22 23:10:32 +00:00
Marc Mutz
a2be9f7a39 CompactStorage: make it default-constructible again
When 30a8e79243084017d23f1c765d5f1cbb86564191 added constructors as a
work-arund for an MSVC issue, the default contructor became deleted.

This hasn't caused trouble so far, as all users apparently pass a
payload object, but I'm about to merge a new user that doesn't, so
this came up.

Fix by bringing the default ctor back using =default.

Amends 30a8e79243084017d23f1c765d5f1cbb86564191.

Pick-to: 6.6
Change-Id: Iaf1a9536c2e0b24a62fdd55c837478a3450da38c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 1b89d747d7da7bffd515a5521e7dd5212c95f7af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-22 23:10:32 +00:00
Alexey Edelev
c11d505a89 Wrap condition in _qt_internal_check_depfile_support with parentheses
The AND/OR combinations are not evaluated correctly. Wrap them with
parentheses explicitly to ensure the expected evaluation order.

Pick-to: 6.6 6.5
Change-Id: Ib2515ba85417b32cef3f799e0cb2c89d2c4257ab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7ac969e1461478974f62a46a913d6cd2b34ed80a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-22 23:10:32 +00:00
Allan Sandfeld Jensen
50417e36dd Fix support for Input color spaces
Not really a common use-case and shouldnt be in images anyway, but
we have the code to support it, except it had a typo in it.

Pick-to: 6.6 6.5
Change-Id: I8585eaf7be82f13e61c94430743d765359fa48fe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b697de79b041cd47e86b578a3a119fb3e7b62f71)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-02-22 23:10:32 +00:00