Commit Graph

69345 Commits (40da8302e2facc6ff3663321641fdcaa05df1f86)

Author SHA1 Message Date
David Boddie 40da8302e2 doc: Fix QString::slice() code example
The snippet referred to had a duplicate identifier to an earlier snippet
in the snippet file, causing that one to be quoted instead.

Change-Id: Id46f6da807806f874291cd5d4c25b8884e511cfc
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit d2c9982a568181d55a9043c8646a4ee88b635fc7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:35:34 +00:00
Tinja Paavoseppä e4d5537775 Android: Remove redundant JavaVM reference
Task-number: QTBUG-130610
Change-Id: I788a3789b5a5b178b97b5a2c9b7568a7d925e1a8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit c95426619f5788be03c6111c3b21db46b234921a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:27:52 +00:00
David Boddie 371f603b94 doc: Fix links to OpenGL functions
Change-Id: I0192aed6b26c1b90fe7c92845212cbd4246b5892
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit e409947113c9fbb8692cdce60b1f31c547792100)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:27:48 +00:00
Tinja Paavoseppä b7f24ec07f Android: Remove unused ClassLoader reference
Task-number: QTBUG-130610
Change-Id: Ide5d1539f6c608a6d031d28d1942b55b0e9b5407
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 1a6efa0728c03979096dbd669d1244fd715a8f26)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:27:46 +00:00
Juha Vuolle 3bffcf1baf Document that QNetworkRequest::setRawHeader() lowercases header names
Fixes: QTBUG-131474
Change-Id: I3637fb989000cdb991969aa46b9552e52dacad49
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a3e2f34abda9656bd0eafda5eee97de957c0a292)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 15:27:43 +00:00
Mate Barany 6c775b478c Add type annotations to Spacer
Task-number: QTBUG-129564
Change-Id: I942d135da630f7ba6641170a1a597b0578aca878
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 519d3d36c38fb68945c2d42ba3bc5786c27aa693)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-03 08:19:33 +00:00
Alexandru Croitor cdd257c674 CMake: Fix unescaped path MATCH condition in QtPublicSbomHelpers
Use string(FIND) instead of if(MATCH) since paths containing special
regex symbols like "+", can either cause an invalid MATCH result or it
can lead to regex compilation errors like
 RegularExpression::compile(): Nested *?+.
 RegularExpression::compile(): Error in compile.

Amends 6e7f871edfd35174b40c7eb7386282bfe019f276

Fixes: QTBUG-131782
Task-number: QTBUG-122899
Task-number: QTBUG-130557
Change-Id: I59a2c3e4fe2431303c7cbca8fd54360f254da90f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 9cb0d48aae81c5436bda783b64721d0b77bc3f6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 22:01:41 +00:00
Mate Barany 8c0867699c Add type annotations to QLocaleXmlReader
Task-number: QTBUG-129564
Change-Id: I8711152840e6bcb39ff1b1e67ff60b53801f28f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit feb39b2d033eae19937e86eca89c1c96141a0b4f)
2024-12-02 19:44:08 +00:00
Patryk Stachniak 42e138a529 Removal of generic stylesheet rule for dropdown
The generic stylesheet rule (* { border: none; })
was overriding specific styles for
the menu-indicator, causing the dropdown arrow
to appear larger than intended. This rule was
removed to restore default or explicitly set
styles for the arrow, ensuring consistent
visual appearance

Task-number: QTBUG-120604
Pick-to: 6.5
Change-Id: If93de1e1595a2155e9a76644a3c615bd432bf53f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit ebe9a6ca4bd0df04ae88f926eceda6dabe543748)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 16:44:07 +00:00
Alexandru Croitor 83521f6654 CMake: Add missing SBOM attribution entries
Add entries for the cmake 3rd party files, as well as mimetypes
and gradient gen.

Task-number: QTBUG-122899
Task-number: QTBUG-131477
Change-Id: I22f243798d66422a0b52aa37532eba2b3210c98d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit cecff9ec41ca9387386215540cb851ca8b65e2a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 15:43:45 +00:00
Alexandru Croitor d28a99f5f3 CMake: Add more unsupported options to allow using any CMake for Qt
Currently we have two options that allow overriding the minimum CMake
version required to either build or use Qt:
- QT_FORCE_MIN_CMAKE_VERSION_FOR_BUILDING_QT
- QT_FORCE_MIN_CMAKE_VERSION_FOR_USING_QT

These options require specifying an exact CMake version that should be
allowed, which is a bit cumbersome.

Introduce two new options that allow using any CMake version without
specifying the exact version.
- QT_FORCE_ANY_CMAKE_VERSION_FOR_BUILDING_QT
- QT_FORCE_ANY_CMAKE_VERSION_FOR_USING_QT

Also introduce a Qt CI specific check that would allow using any CMake
in Qt's CI Coin, to allow decoupling of the minimum CMake version bump
from the provisioning of the new minimum CMake version.

This check should only be enabled temporarily, and then reverted back
once the provisioning is done.

The current change has the check disabled, it will be enabled in a
follow up change, so it's easier to revert.

As usual, using any of these options is not officially supported.

Task-number: QTBUG-131169
Change-Id: Icc3f51ad457ebf8f4251309be97e72a3ff4cd2e0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit df7091d9f4cf7849cfc91f4987b2ad8cda141e0a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 15:01:55 +00:00
Edward Welbourne e5ab6a6588 Shortcut QDateTime comparison when difference is large
We want to avoid caling toMSecsSinceEpoch() since it's expensive for
LocalTime (which is presumed to be the common case). We can do so when
both sides have the same offset from UTC (and this can cheaply be
determined) but that's no help for two local times months apart, one
in DST the other not. However, in this case, the difference in millis
is big enough that no plausible difference in offset can overcome it,
so we can again avoid toMSecsSinceEpoch() and simply compare millis.
This should make some previously-expensive comparisons cheap.

Add test-cases to the QDateTime ordering test that verify this doesn't
lead to mis-comparison at the biggest offset-difference known.

Fixes: QTBUG-131491
Change-Id: I1afd5d058c8663c908f898d4c50d0837549b87db
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit ef540d77751e24fe0b345694f43cdafca3434c68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 13:49:13 +00:00
Tim Blechmann e3f3706422 Testlib: improve messageHandler without loggers
When the messageHandler is called without loggers, we used to simply try
to restore the old message handler. This is not ideal and the assertion
seems to be wrong.

The situation of not having any loggers can occur during teardown, if
the message logger is called from a worker thread, while the application
thread stops logging (compare QTBUG-129722)
In this case, we simply forward the message to the original message
handler, which should simply print the message.

Change-Id: Ic8147f7ab6317f1ceb4f52c79ce298464a94de30
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 56106d1bd770c474bc15df47ae6aa64d37ea3d20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 13:39:01 +00:00
Kai Uwe Broulik 21166a91e2 WindowsIconEngine: Add icons for bidi ltr/rtl and command prompt
Change-Id: I5757a650b6972f6e4e08267ff5b21333db8cc8b8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3347432beefc5c31a5a874c190d2f840ff12e9cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-12-02 08:59:51 +00:00
Christian Ehrlicher 6855403445 QStyleSheetStyle: avoid double lookups to QRenderRule::styleHints
Avoid double lookups to QRenderRule::styleHints by simply checking if
the returned QVariant from styleHint() is default-constructed.

Change-Id: I4ca657662c2af66582fb4fc7c2ed1b77258ab050
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit f1fd15b4549a740dbd0abff44a43b551eef12d31)
2024-11-30 11:09:35 +00:00
Allan Sandfeld Jensen bede1100fb Mark max length work buffers uninitialized
Otherwise the hardening with initializing all buffers causes serious
performance regressions

Change-Id: I3f7a0b7f0e0d08644b1dbb520cf1f6d5e052b270
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 11dc7e1c05d83d45c5057d50560037a2da4416a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-30 00:22:59 +00:00
Frédéric Lefebvre 8a874d5b31 Fix flakiness in tst_QWidget::saveRestoreGeometry()
Add setWindowFlags(Qt::X11BypassWindowManagerHint) to bypass the
creation of the frame. We are checking the geometry of the widget
itself, not of his frame in this test.

Remove the comments preventing that it can be flaky when debugging.

Remove unnecessary QApplication::processEvents().

Remove several unnecessary qWait().

Change-Id: I4a4bcf5cb9522a9a504925c1ae31f0677deae3b1
Pick-to: 6.7 6.5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit cf45ae08bc90b5dbbd20a7e7842856805205bca4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 16:58:42 +00:00
Liu Heng 79390471e8 fix QApplciation with a QML popupWindow
Since 6.8, QML has popupWindow. When in popupModeMode,
it does not necessarily have a popupWidget.

Not checking whether popWidget is nullptr will cause the
program to crash.

Fixes: QTBUG-131664
Change-Id: I624b62ef7185f0ab35215c2c34b0d6e9c80539a0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 706d54eefee22e2feb16a7a7717c0a48ff270460)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 16:15:55 +00:00
Christian Ehrlicher 53a5df8cf0 Windows11Style: fix painting checked QToolButton
A checked QToolButton should be drawn similar to a checked QPushButton.
As a drive-by avoid calculating the paint rect twice and make the code a
little bit more readable.

Fixes: QTBUG-129439
Fixes: QTBUG-129700
Fixes: QTBUG-130822
Change-Id: I573132e804f26b9fa41112267a9f685680cf0864
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b3c0b08eb040bbd76b81a7c6172e3846e8ec0000)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 15:36:09 +00:00
Fabian Kosmale 1be6e99b55 moc: Do not get confused by constexpr token in functions
Surprisingly, moc had no awareness of constexpr at all. This would still
mostly work, as we were just skipping it, except for the case where
constexpr appears as the last keyword – in which case we'd pick it up as
the type name.

Fix this by adding constexpr as a known token, and add it to the list of things we ignore in testForFunctionModifiers.

Pick-to: 6.5
Fixes: QTBUG-122609
Change-Id: I0ae0c0477e611ff83fbb841233035bea52216be2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 984ad9019a62a9a130647dbd765e38ee2e6250c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 14:47:56 +00:00
Assam Boudjelthia bc00516d84 AndroidDeployQt: don't use QFile pointer
The file is used only in the local scope so no need to have it
as a pointer. As a pass-by, use WriteOnly open mode.

Change-Id: I9999f4aed0f888af9a3e08ed6c3573432c29d195
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 7539b659d9ffbb3c44e45bdb7d9669a6df8915c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 12:34:09 +00:00
Shawn Rutledge 4059ea60e5 QFileSystemModel::sort(): emit layoutChanged with VerticalSortHint
It's good to give a hint about what changed, and it helps behavior of
QQmlDelegateModel when that is used in the view.

Fixes: QTBUG-131487
Change-Id: I8478eaf1e8294e101f3fedc285e44f83e600c566
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit bf714c246b5e45d259a07cf19b668f091fa396a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 05:10:09 +00:00
Shawn Rutledge c014312c20 doc: Remove obsolete note after moving QFileSystemModel to QtGui
There doesn't seem to be any reason that it should require an instance
of QApplication. However, given that the model is by design
asynchronous, it does need to live in a thread that runs an event loop.
Add a note about that to the "Caching and Performance" section, and
apply some drive-by editing.

Amends fb9ec8ad44

Task-number: QTBUG-66177
Change-Id: Ibe3095e0264ce033732d1c724f59a871e2a0d3b8
Pick-to: 6.5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 22bde5209a7a3c510d4b90b9eaee413f3ba3dee4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-29 05:09:33 +00:00
Jaishree Vyas 437a7626f4 Doc: QMetaProperty documentation references deprecated "type()" function
Documentation of QMetaProperty mentions deprecated members, which
includes type(). Added link to the metaType() to avoid confusion.

Fixes: QTBUG-131446
Change-Id: I8d96bcf712c78ca2b9ce609e511d275053cf6cbf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 07c5ff8246b568f2d89e8b0e8236b1ec517e16b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-28 17:54:03 +00:00
Christian Ehrlicher 0188953c6d Fusion style: misc speedup drawing indeterminate progress bar
When drawing an indeterminate progress bar, QPainter::drawLine() is
called very often. Avoid it by first calculating all lines and then call
QPainter::drawLines() once with all lines to draw.

Change-Id: I51ce23236b945b30da649fd06aad60676321e403
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0eedffa01daed077aba4781b240068929cf768be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-28 17:54:02 +00:00
Christian Ehrlicher 6f353bb066 Fusion style: cleanup PE_IndicatorToolBarSeparator drawing
Cleanup drawing of PE_IndicatorToolBarSeparator - there is no need to
call QRect::topLeft/bottomRight() and then only use x or y. No need to
stress the optimizer that much.

Change-Id: I477dcea6c9bebd981777fdc1eb53963074257e01
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9fa471f9c7b4f2218109fa4bd17d66cf5b24101d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-28 14:03:13 +00:00
Christian Ehrlicher 49cb3203a9 QWindows11Style: simplify CC_TitleBar painting
Move common tasks into a lambda to improve readabilty and avoid
copy'n'paste errors like it happened for SC_TitleBarContextHelpButton.

Task-number: QTBUG-130673
Change-Id: I5cb198b976d459b73e339d066def92d70b71ade5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9a97e78d8310c13212aacd578f5529b5521e395a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-28 14:03:12 +00:00
Tor Arne Vestbø 19207456bd Tweak QInputDevice logging
The logging category now silences QtWarningMsg and below by
default, so we can be more granular in our logging.

Use info logging category for registering/unregistering, to allow
filtering out the detailed debug logging while still seeing when
devices are registered/unregistered.

Log the number of buttons for pointing devices, if there are any.

Log the device for wheel events.

Change-Id: Ie046fee1659fc3967caf7eafbaf46f3ed22be5bb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 1ad00d3878271450cc55eb84d4c5f3cddd460b8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-28 14:03:12 +00:00
Tor Arne Vestbø 059cbd17ba Add private QObjCWeakPointer for tracking Objective-C object lifetime
Uses __weak if possible, and otherwise falls back to associated objects.

Replaces manual tracking of QNSView lifetime for QCocoaDrag.

Task-number: QTBUG-116554
Change-Id: I56f2707bbf5aa14a9efd0ec29e37b157e97cfc3e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit fa9449bbe8fb20cbdfc5b1e81181a30e4a7c358a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-28 14:03:12 +00:00
Ivan Solovev ef8fc89355 Move CompareThreeWayTester to qcomparehelpers.h
We will need these checks in the qcomparehelpers.h header, so move
the code there.

As a drive-by, use QtOrderingPrivate namespace instead of QtPrivate,
and also mark the constexpr bool variables as inline.

This is required for the follow-up patches.

Task-number: QTBUG-127095
Task-number: QTBUG-120305
Change-Id: I1ea827ecf68b6bffa347dae22ddac25c059b53a9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 678e9f614bc5a05d2ff16cf916397998e7cdfca1)
2024-11-28 11:14:51 +00:00
Andy Shaw 69da5314ff SQLite: Update SQLite to v3.47.1
[ChangeLog][Third-Party Code] Updated SQLite to v3.47.1

Fixes: QTBUG-131637
Pick-to: 6.5 5.15
Change-Id: Id05b14d4e26a3b331e8941d488f103a73180068b
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit a0a9ec5674f9bdda956dd3b15a12cd987a347870)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-27 20:17:25 +00:00
Christian Heimlich 0467b8278e Fix non-portable link to uiautomationcore
548351 changed QWindowsIntegrationPlugin and
QWindowsDirect2DIntegrationPlugin so that their CMake targets link
directly to UIAutomationCore.lib/.a instead of loading
UIAutomationCore.dll dynamically at runtime; however, it did this by
first locating the library via `find_library()` and then using the
absolute path to the DLL import library found. If Qt was built
statically, this would cause that absolute path to be added to the
INTERFACE_LINK_LIBRARIES of their export targets, breaking the build
if moved to another machine where the location of that lib differed.

Instead, simply list uiautomationcore as a library link by name only,
which shifts responsibility of locating the .lib/.a when consumers
build to the linker, as is done for all other Windows system libraries.
This ensures that the library is found correctly regardless of which
system Qt was built on.

Currently this only applies to MSVC due to limitations with
uiautomationcore.a when using MINGW, where the lib is still dynamically
loaded.

Pick-to: 6.8.1
Change-Id: I20011a51935af4093de83fff75efe2141da0655b
Reviewed-by: Zhao Yuhang <2546789017@qq.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit da367d0bffcd58a3217af937d767cf4f392d3c15)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-27 15:44:41 +00:00
Allan Sandfeld Jensen b325a93e34 Mild optimization of qt_hash
Move one AND operation out of the loop, as it is only needed in the end.

Change-Id: I48adcd18c900654830a84813f26c95eee579b49d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fc947593ef78c92b67811ac14dae200b45b480ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-27 12:01:53 +00:00
Eskil Abrahamsen Blomfeldt 992f81931e Windows: Fix arbitrary outline on emojis
Emojis would sometimes get an outline in a seemingly
random color. This was because the color run is not
initialized to the first layer. MoveNext() should be
called on the initially to move it to the first layer, so
the first layer we rendered would end up being a
monochrome version of the glyph with a random palette index.

[ChangeLog][Windows] Fixed an issue where emojis would sometimes
get an outline.

Pick-to: 6.5
Fixes: QTBUG-131587
Change-Id: I42c2828d66c6149cdb62c2b6271dfd49ca002db0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 51b584e6062e83e24950d5eccd826ea5a5b8af6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-27 10:36:50 +00:00
Eskil Abrahamsen Blomfeldt 2e3439dc94 Don't support subpixel positioning for color fonts
This comes at a price and it does not really make sense for
emojis.

Change-Id: I57148bff48a48bb81a03203626df25646c9acb6a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit fd9c9788f73cb088229701dd92443aa04005a4a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-27 10:36:50 +00:00
Marc Mutz ca1b4baf09 QNativeIpcKey: normalize docs for qHash()
The C++ standard forces¹ us to overload the hidden friend qHash()
implementation instead of defaulting `seed` to zero. That doesn't mean
we need to reflect that technicality in the docs, esp. if it forces us
to deviate from the standard phrasing of qHash() functions to say
something about the default value of `seed` (which would, for a
defaulted argument, be shown in the docs).

Present the qHash() function in the canonical form to QDoc. This is a
(forwards and backwards) BC way to solve the issue. Going forward, the
correct fix should be to have qHash() functions call a private
hash(seed) member function instead, to fulfill the pointless
requirement of [1].

¹ [dcl.fct.default]/4, last sentence

Amends c2310f8e03.

Task-number: QTBUG-129574
Change-Id: I7890a0df092c9780601fc4c25e23d70d92db47e1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 27d792869b30721cecf493a54d89e9df6e75a6fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-27 08:03:24 +00:00
Dheerendra Purohit 296bae3f10 Doc: QAction Object ownership in QDockWidget::toggleViewAction()
QAction object returned by QDockWidget::toggleViewAction() is owned by
the QDockWidget. QAction object is deleted when the QDockWidget is
destroyed.

Fixes: QTBUG-70171
Pick-to: 6.5
Change-Id: I279366209228c88241e3bf70c17c117a2bf91f40
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit f5e127c842f4fad459d8abdfea8ae45025b6107f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-27 07:43:44 +00:00
Even Oscar Andersen 0c60d2c066 wasm: Fix focus handling
We had input handling enabled as a precondition for setting focus.
This is wrong, we need to have the focus for toggle buttons
and other non-input things as well.
(Also toggle buttons act on spacebar).

Also selects a new active window if the window
that is active (i.e a dialog) is deleted.

Also shift + tab did not always work, fixed
to emit Key_Backtab

Fixes: QTBUG-130371
Change-Id: I3b36a3e200ba9d4b0791865e75235ddfb72bcaa5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit ef8bf4c2cf3d86a869ff8a555d4e390168864144)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-27 06:47:13 +00:00
Lars Schmertmann a1c74e054c Android: Fix logging of the category
87d8ee755b changed the logging behavior
on Android to use the category as tag. But it was missed that
`formatLogMessage` only fills the fields given in the messagePattern.
Our default messagePattern includes the category but on Android it
is never filled since this change.

So we change the default messagePattern on Android to omit the category
and only use the category as tag when the category is not given in the
messagePattern.

Pick-to: 6.5
Task-number: QTBUG-94708
Change-Id: I80f65d0f7f8c0ca9c2fff2dcd63d4599848b6e2b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 709bc29a1d2abf40bf3f1c067fe3b96b6e0c09d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-26 20:37:15 +00:00
Isak Fyksen cf64c1b042 Replace QPair/qMakePair with std::pair in qtbase/plugins
As a drive-by replace calls to QList::append with emplace_back,
to avoid repeating value_type.

Task-number: QTBUG-115841
Change-Id: I027d82706f3545dd63c6b8ba89ba66ae938e07f9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 6ed725b3b93d15a45501fecb6f1fa711ef65e17e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-26 11:16:41 +00:00
Edward Welbourne 459f1978ae [docs] Add QDate and QDateTime details to overview of C++20 features
Briefly sketch the new features in std::chrono and how Qt now provides
access to them.

Task-number: QTBUG-128837
Change-Id: I99a94ac9d0ed292ec9e3b0057ba6a9e2092200ed
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 856aaa4c0c4992b3be57c0a6c5ccb81dd6ea8b86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-25 18:28:29 +00:00
Jaishree Vyas 0a258409ef [docs] Create an overview of C++20 features available in Qt
A template for C++20 overview.

Task-number: QTBUG-128837
Change-Id: I7a442c3c58613587c2c75a77082f66512e97adb4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit f9de20d9ca818b775930956a0f1c4804119a24c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-25 18:28:29 +00:00
Vladimir Belyavsky 5df8379b18 Schannel: fix endless loop in TlsCryptographSchannel::transmit()
We've encountered that under some circumstances DecryptMessage may
return undocumented SEC_E_DECRYPT_FAILURE status. It's probably a bug
in Schannel on Win 11, as there is no such problem on Win 10.

In such cases, since we didn't handle this specifically, we can end
up in an infinite loop in TlsCryptographSchannel::transmit() when
`intermediateBuffer` is not empty and `bytesRead` is 0.

To fix this, we just add SEC_E_DECRYPT_FAILURE status handling and
will disconnect from the host and emit the error respectively.

Change-Id: I340669a967be420c74cb01296629f94c4720c958
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ed0eb386dad22b0984151b92168dcbf9b57c381b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-25 15:18:32 +00:00
Assam Boudjelthia 395dd7a173 Android: fix Java javadoc syntax errors
There were some syntax or links that javadoc doesn't
recognize and throws an error about, this fixes all of
them.

Change-Id: I301ec22bc14c2e41e3253222efbb38c3c2c9eeba
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 1fa1ceeadc7bd0db051e82429bf8791d9a82c4e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-25 13:47:44 +00:00
Liang Qi ecbc02f03a Guard the usages of QPlatformIntegration::services()
Task-number: QTBUG-130884
Pick-to: 6.5
Change-Id: I6c8060ce8b7a4e525c46e2e1fec227f46fe8c4d6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7f06824408b5ff3f53d97298d960b7f5758286c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-25 13:46:37 +00:00
Rami Potinkara 7e4b10677f Android: Do not hide keyboard when opening
It takes some time to display the keyboard. For this reason, in case the
keyboard was not displayed yet - we could wrongly assume that the
keyboard is hiding. To avoid this situation, there is a new check.
In case the keyboard has just been opened and it is not displayed yet,
the execution of HideKeyboardRunnable is postponed to give time for the
keyboard to be displayed.

Fixes: QTBUG-130000
Change-Id: Iee1310c777ebbb807990bf3cec39e6d07481dfad
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 4de9b94042dd173c6db31a4641a1513a9b319a79)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-25 10:13:21 +00:00
Bartlomiej Moskal 0a32e20b11 Android: move implementation for checking if keyboard is displayed
Move implementation for checking if keyboard is displayed on the screen
from QtInputConnection to QtInputDelegate.
The QtInputDelegate class is responsible for showing/hiding the keyboard
and handling its visibility. Moving mentioned implementation there seems
reasonable. Also, this implementation will be used internally by
QtInputDelegate in the future.

Task-number: QTBUG-130000
Change-Id: I47cf8e8fb2ee9bea535b9e009dd4b43b28f19b80
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 229cff37c0b6f822e9c22734e66d8ce117723d22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-25 10:13:21 +00:00
Bartlomiej Moskal e27e9d4a20 Android: use WindowInsets for 30 API and above
For Android above API 30 we can directly just check if the keyboard is
visible. We do not need to calculate it size. This is useful as
floating keyboard has wrong size.

Task-number: QTBUG-130000
Change-Id: Ia91d8b9ddefc97f8d65a657aa7e75bb146feb00e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
(cherry picked from commit d97bfafa86e752cc3a739d8efb749ddea2120ca5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-25 10:13:21 +00:00
Bartlomiej Moskal 0cb75c28af Android: Do not use hardcoded value for Keyboard check
This part of code seems to be really old.
Unfortunately in newer device the Navigation Bar is bigger than 100.
So when Navigation Bar is visible - we assumed that keyboard is visible.
That is why this part of code is "dead" for devices with higer resolution.

To make this solution more flexible, we need to rely on the screen size.

Task-number: QTBUG-130000
Change-Id: I387fe58b4c6d22de83394cc8f51c75e7a55e72a1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
(cherry picked from commit 34d184911eac07c97f44e87de27f7e37a4ebda81)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-25 10:13:21 +00:00
Volker Hilsheimer 490b2b4c90 QJniArray: fix local reference leak
We get a local reference from New*Array, and then construct a QJniArray
from that, which will create a new global reference, without deleting
the local reference.

Instead, go through QJniObject::fromLocalRef, and release the local
reference also in case of failure.

Change-Id: I88108315240133369efab30e55fdbea17a17a26d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
(cherry picked from commit 37638c84efaf2810ad49da0b987f19287d8c4ad6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-25 03:25:38 +00:00