65025 Commits

Author SHA1 Message Date
Ahmad Samir
fd66400062 QObject: assert connection type isn't UniqueConnection for lambdas
An assert is harder to miss than a warning, which makes it more likely
to get fixed. Thanks to Mårten Nordheim for the idea.

Add the assert in inline code so that users compiling their code in
debug mode (or with -DQT_FORCE_ASSERTS) can hit the assert even when
built agaist a release build of Qt (not everyone compile their code with
a debug build of Qt). Thanks to Giuseppe D'Angelo for the idea.

Pick-to: 6.6 6.5
Task-number: QTBUG-115125
Change-Id: I2935d32ea5a2c288d7a836abbae66ac53cb5ab2f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit afddb327bd866ac693e475901d4d10acc6c83757)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-22 17:16:57 +00:00
Tomasz Kozlowski
621f8dc707 Skip test which resizes window in graphic scene while using EGLFS
This test is resizing top window, which is not supported in EGLFS,
so this test needs to be turned off.

Task-number: QTBUG-115777
Change-Id: Idb81802399fe5bd9af3f342692d2212cd06ead9c
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
(cherry picked from commit 061a2012ad70159ddb28a28344f67637bc965f18)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-22 15:25:29 +00:00
Alexey Edelev
8bed1089c5 Fix encapsulation of qt_build_internals_add_toplevel_targets
The function uses external non-cache variable that is set in different
cmake macro. It's better to pass the value as argument.

Pick-to: 6.6 6.5
Change-Id: I282bd506cf2dcd998a0ddd7deaad244fab34a8db
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 0d7cda9cdaeefe8363f44204b0cb7384ec990dc8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-22 11:53:32 +00:00
Lorn Potter
6c4fe5766e wasm: fix single thread build
Fixes linking of apps

Pick-to: 6.6
Change-Id: I9bbec9b63af8ae2801643fe124aeda8b25abeca5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit ae3506d80e11068957af38897e451cddb18bbe70)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 23:46:13 +00:00
Assam Boudjelthia
251267d439 Android: remove redundant comments from notifier example manifest
Task-number: QTBUG-115020
Change-Id: I29cd7a45f85bc85f6f12b135287b9eb868a7bc44
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit 8cc84a1386b77701ebc9c9d4efbc1b033d0e326b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 22:06:20 +00:00
Axel Spoerl
d19d32a912 QPlainTextEdit: update viewport, when placeholder text disappears
QPlainTextEditPrivate::updatePlaceholderVisibility() issued a full
viewport update, when the document became empty and the placeholder text
needed to be shown. No update was issued, when the placeholder text was
replaced by a first text character entered.
That relied on the assumption, that the placeholder text would disappear
with the first text line being rendered (even if it has just one char).

When the placeholder text covered multiple line, only the first of them
disappeared.

This patch adds a boolean to remember, that the placeholder text is
shown. If that is the case and the first char is entered, a full update
is issued, to remove all lines of the placeholder text. The boolean flag
is cleared thereafter, to avoid unnecessary viewport updates.

isPlaceHolderTextVisible() is renamed into placeHolderTextToBeShown(),
because the method returns an instruction, rather than a state.

tst_QPlainTextEdit::placeholderVisibility() is adapted to test the
boolean flag, hence the real visibility of the placeholder text.
That extends its scope to the bug at hand.

Fixes: QTBUG-119808
Pick-to: 6.6 6.5 6.2
Change-Id: I07a7059ae619dc85d0c21247d829120e6afa7115
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 729e23f15f366f013da8e149fa95e618c9a95e13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 20:43:38 +00:00
Christian Ehrlicher
fcd3cb7230 Widgets: Use pmf-style connects
Replace some more string-based connects with pmf-style to trigger a
compiler error instead a runtime error if a signal or slot does no
longer exists.

Change-Id: Ibc047cc935885a30ea58367fa97e9f962b87ca2c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 9e78256579e8dc704066a98cb4816a1aab0e7e3b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 20:43:37 +00:00
Thiago Macieira
f8a8b99f98 QObject: re-add the nameless qt_qFindChildren_helper to restore BC
Amends e608bc019232f6956c4520be1a6103a1845c6991 by adding the
implementation of this method whose implementation got accidentally
removed (because it became unused). It's added in removed_api.cpp
because, as the commit said, the cost for creating an empty
QAnyStringView is practically nil.

It's not zero on Windows, because the replacement function has five
parameters, so the last (the options) is passed on the stack. But that
is not enough of a justification to keep separate functions.

Fixes: QTBUG-120309
Change-Id: I6e2677aad2ab45759db2fffd17a29b4ec7728426
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit efaa849023d77dfee82e4d9ff904c3711b4fb611)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 20:43:37 +00:00
Axel Spoerl
c6219ebfb5 QWindowContainer: Don't embed a QWidget
Embedding a QWidget in a window container (via its windowHandle())
may cause crashes, e.g. during drag & drop and when the application
goes out of scope.

If a QWidget->windowHandle() is attempted to be embedded in a window
container, return the pointer to the widget instead of creating a
container.

Add an autotest.

Update documentation.

[ChangeLog][QtWidgets][QWindowContainer] If createWindowContainer()
is called with a QWidgetWindow argument, return pointer to the
widget instead of new container.

Fixes: QTBUG-119113
Change-Id: Id052a03be13adce05bbd025d86270d265dfb662e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit b9ee6d3b2e465eb70ba43ea62d2ada5327a138c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 20:43:37 +00:00
Volker Hilsheimer
eb9252526e Remove the style plugin example
The snippets in the QStylePlugin class documentation show the
relevant bits well enough.

Pick-to: 6.6
Fixes: QTBUG-119974
Change-Id: Iba4a37664d64d86a2946f41d131a201ccdcd723b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5a0135fafb16203a812163f7ed55c1b981477cb5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 17:46:40 +00:00
Alessandro Portale
7d4aaa9af8 Doc: Give offline-dark.css ".qmlextra" a visible text color
.qmlextra's text color #254117 is too dark. Let it inherit a better
suited text color.

Amends: 436467134e6087ec5a0e360e1837aac4da2ce9ca

Pick-to: 6.6 6.5
Fixes: QTCREATORBUG-30117
Change-Id: Ia9e0567b0b00f2e7c1359ac85f10c72cece3c087
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 7b27a5b137e9b874928cebf2740520a0d98df282)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 17:46:40 +00:00
Jarkko Koivikko
dfc5e3f215 printpreview: Avoid rendering artifacts while scrolling zoomed view
Fixes: QTBUG-120107
Pick-to: 6.6 6.5
Change-Id: I4de062c9ded47cc911abc0aebf1b1b7f57ed7e09
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit f83e14b13a32b2cddff45dfdbce8e819c02aa9ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 17:46:39 +00:00
Santhosh Kumar
3999908ae5 Skip 'off-by-one' adjustment in block length during undo operation
The adjustment of block length with 'off-by-one' affects content
length during undo operation. The issue occurs when we perform undo
operation for a set of group blocks that have same fragment
position. Since their positions are same, group block change
(QTextDocumentPrivate::documentChange) with respect to insertion
doesn't affect document block length and further adjustment to
'off-by-one' without considering this leads to incorrect document
content change information (such as invalid information with regard
to characters removed).

This patch skips adjustment of group block length during undo
operation.

Amends 8fbedf2196a292fe2affcf83ddc846b9c852772a

Fixes: QTBUG-113865
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I315dcf01ba5b2f4ed6d95e9d6910d82848374aef
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 8a725084396da5872fa020212b3cb09ee40a91df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 17:46:39 +00:00
Marc Mutz
af8a9874c3 Http2: fix potential overflow in assemble_hpack_block()
The function is given a vector of Http2::Frame's and flattens it into
a vector<uchar>. While each Frame can contain a maximum of 16GiB of
data (24-bit size field), one "only" needs 257 of them to overflow the
quint32 variable's range.

So make sure any overflow does not go undetected.

Keep the limited uint32_t range for now, as we don't know whether all
consumers of the result can deal with more than 4GiB of data.

Since all these frames must be in memory, this cannot overflow in
practice on 32-bit machines.

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Iafaa7d1c870cba9100e75065db11d95934f86213
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1e6bb61af3ae29755f93b92f157df026f934ae61)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 17:46:39 +00:00
Thiago Macieira
60d60dba77 QDataStream & QResource: document their lack of security-hardening
Pick-to: 6.6 6.5
Fixes: QTBUG-120012
Task-number: QTBUG-119178
Change-Id: I6e2677aad2ab45759db2fffd17a06af730e320d6
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e696bec76e4f852cb28f27c50c95d3504fba559e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 17:46:39 +00:00
Doris Verria
e4c533c336 Update ImageGestures example
- Update screenshot
- Provide some information text on the screen when no images are found
- Add all supported image formats to the file filters
- Minor fixes according to our coding conventions: eg. don't shadow
  variables

Fixes: QTBUG-119979
Change-Id: If41adf34f38bfa101f2c5433082828c1a10668b1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 30e6d822327d8105d209af10d077512f21ecc12c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 14:12:58 +00:00
Yansheng Zhu
2b18f6c7b8 Fix Maximized frameless window painting wrong with WS_THICKFRAME
In Qt versions greater than 6.4.2, when using Qt:FramelessWindowHint and
WS_THICKFRAME simultaneously, and handling the WM_NCCALCSIZE message to
draw a frameless window, the right and bottom sides may extend beyond
the drawable boundaries.

This is because in the previous commits, the calculation for margins was
skipped for windows with Qt:FramelessWindowHint set. This is correct for
non-maximized windows. However, when a window is maximized on Windows,
its actual size is slightly larger than the drawable area to avoid users
from dragging the border to resize the window. When window was maximized
, the code for calculating geometry should remove the margins instead of
skipping its calculation.

The fixed code determines whether to skip the calculation of margins and
frame by checking whether the window is maximized during the calculation
[ChangeLog][QPA][Windows] Adding a check for the maximized state of the
window during the calculation of margins. Margins calculation will not
be skipped for maximized windows.

Task-number: QTBUG-120196
Pick-to: 6.6 6.5
Change-Id: I63c8dbc8f65ff28cc581be261acfd3f675b027c4
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 5f7b4c045f4347b9e47849d15d5932df45626c51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 14:12:58 +00:00
Lucie Gérard
56f4d1f0e9 Add qtbase modules to ./configure -list-features
Task-number: QTBUG-64984
Pick-to: 6.6
Change-Id: I78964581118b258fb1cf5ddea8097fd3b9a5df02
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 0ba15348cf9c0b3702541c18070d8311aa7cc6a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 14:12:58 +00:00
Assam Boudjelthia
c4b1b97192 Android: update androiddeployqt doc page
* Prioritize CMake snippets.
* Remove unrelated mention to various qmake variables.
* Mention the page for command line configuration and building
and remove the same duplicated command from this page.
* Mention the page for customizing the build from the Android docs.

Task-number: QTBUG-115020
Change-Id: I966c37661e17f6ffb8d25bfa3cd91e92be364e1d
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit 5192de707d34b5ef3bcffdc8370a2f894ef647f2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 14:12:57 +00:00
Kai Köhne
a91423d4ce Doc: Use Qml DefaultProperty as example for Q_CLASSINFO
Setting a DefaultProperty is arguably something
more useful to people than the 'made up' version example.

Also add more links to the relevant QML pages.

Pick-to: 6.6
Change-Id: Id967df7ddf81511299f95b9fd24f56af671fb855
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 98ba0d4e95353febd5a4b14fe2eb9cbd4259bf0a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 14:12:57 +00:00
Volker Hilsheimer
3b3960c9b4 QWidget: deliver DragLeave events symmetrically
If a widget received a DragEnter event that it didn't accept, then the
UnderMouse widget attribute gets set. But the drag manager never got a
drag target, so the DragLeave event was never delivered, leaving the
UnderMouse attribute set incorrectly.

We always need to send DragLeave events to the receiver, even if the
DragEnter or DragMove was not accepted. Otherwise we are not in balance,
and the UnderMouse attribute will remain set.

This is a change of behavior and a very old bug, so only fixing this in
unreleased branches. Test case added to verify that explicitly generated
drag events result in the correct enter/leave events.

[ChangeLog][QtWidgets][QWidget] DragLeave events are now always sent to
the widget the mouse is leaving, even if it didn't accept the DragEnter
event.

Fixes: QTBUG-50403
Change-Id: I5eae49da000fb4fea81f1767f0e73a06a6b78975
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4f95e66f940c3a6c72f51c2428620c09e30bbd0b)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-21 10:18:55 +01:00
Hatem ElKharashy
bf77adf1b0 QGraphicsFrameCapture : Add getters for frames names
Save captured frames names and add getters for them

Change-Id: I429e1512d6610ade9414f59fee3d081548cbb2ab
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
(cherry picked from commit 564efa3741ccd21b03d95a778e7a37d5bd902e53)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 09:16:58 +00:00
Axel Spoerl
83df3a8138 Remove echo plugin
Remove echo plugin code and documentation.

Fixes: QTBUG-119981
Change-Id: I4083ac6cdb768facaed041241af2c5ee6e28df50
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 01bf423d67d5e6f8de5ec51a6b85178492681ca9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 05:35:19 +00:00
Volker Hilsheimer
d8b113f46f Minor updates to the "Touch Knobs" example
Turn on anti-aliasing, and update screenshot.

The example is still not great and under-documented, but at least it
doesn't look horrible anymore.

Pick-to: 6.6
Task-number: QTBUG-120291
Change-Id: Ie709cb51d64c535d7cd0aa1451b3c5bb901324cb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 2b9d021ba5487f7f5f67b958a17160c4cf468561)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 01:52:22 +00:00
Volker Hilsheimer
ba583b5e31 Turn SpinBox Delegate example into snippets
The essence of the example was already fully quoted in the
model/view documentation. Move the code into a snippet
source, and update the screenshot.

Fixes: QTBUG-119976
Pick-to: 6.6
Change-Id: Id2f10bb26a650419969bbfa9b76cb74babd3319e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
(cherry picked from commit 99eaae4323ff1fda2d8cc0184d824b6d9c3f23ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 01:52:11 +00:00
Axel Spoerl
fcb040404f QComboBox: Fix hover over list view
9da8d67b3bca1d40ae221a9c6be218fe57759724 has commented out setting the
current index of the combo box container during a mouse hover event.
That has caused a regression.

Amend the patch and enable visual hover effect.

Fixes: QTBUG-120167
Change-Id: Ic12e70f9f70ac2f7b9604580562c35551659c5e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a5a082406e8a8a14e9d21921e918e36a270939fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-21 01:04:23 +00:00
Assam Boudjelthia
74f82101e8 Android: fix Android Manifest docs table
The table had the wrong row span making it malfomatted.

Task-number: QTBUG-115020
Change-Id: Icc35df3cd7dcdad2407d4c93d7a2a8d3d1701275
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit ec7b4d547d74ded2e82674ad007f60109d73df29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:47:28 +00:00
Assam Boudjelthia
8f9543e0aa CMake: don't set TIMEOUT_SIGNAL_NAME for Android target on Windows host
TIMEOUT_SIGNAL_NAME and TIMEOUT_SIGNAL_GRACE_PERIOD are not supported
on Windows.

Amends 4a3936c33cb2ab9fee2e93cbe99d31daf1cd0cc8.

Pick-to: 6.6 6.5
Task-number: QTBUG-106479
Change-Id: Ifa00a9183750454960b1ff24e1a0048224feff4b
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 1a7db3ab11ef9500e9c6bf111d7525cacca2f867)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:47:25 +00:00
Assam Boudjelthia
d5ff601da7 Android: fix typo in androiddeployqt command
Task-number: QTBUG-115020
Pick-to: 6.6
Change-Id: Ia82c6a421a148bb462d67be5757f73068aa6d382
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit 1f609e47803097ddadaf5f26dc76135ae0cd211d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:47:22 +00:00
Assam Boudjelthia
4992c74091 Android: fix order of calling setApplicationState() in QtServiceBase
In QtServiceBase setApplicationState() is being called before
the Qt libs are loaded and that call invokes a native method,
so that leads to a crash/exception for UnsatisfiedLinkError.

Change-Id: I879d120f0cc2985ab49f7402a65f171950451914
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Janne Juntunen <janne.juntunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit f292a669042df26d372985b16d4ab50ea6d4dca5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:47:19 +00:00
Assam Boudjelthia
5855be0fb3 Android: return String regardless from QtLoader.getMetaData()
To avoid exceptions if the metadata is a non-string like boolean
or integer.

Task-number: QTBUG-115016
Change-Id: I104e6b2954873e74bc100cb965ee8ea9b6d14568
Reviewed-by: Janne Juntunen <janne.juntunen@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 400e7d1a758394df350cbdcbc6cff3683976b789)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:47:16 +00:00
Assam Boudjelthia
b9f5b892d4 Android: don't call QtLoader.finish() on null activity/service
Task-number: QTBUG-115016
Change-Id: Ia7cf066261bd0bb17d67423b5edf7b72ec33d577
Reviewed-by: Janne Juntunen <janne.juntunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 84f0b483b5befb2fef070b5c05c17e1fcd7dac1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:47:13 +00:00
Assam Boudjelthia
c27163cd7d Examples: Add Qt6::Gui editabletreemodel and simpletreemodel tests
Android needs the Gui dependency.
Amends 283cdcd3d5fad368c9df1bcae69cbfbf9ade623f.

Pick-to: 6.6
Fixes: QTBUG-120257
Change-Id: Id02b03b9fa08546bc5a126b3e71e67bdd65f8b66
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 4d7ac732557f397cc24c47bc5469db60a0c2a2cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:47:09 +00:00
Assam Boudjelthia
130c0905e6 Android: add macros for common tools and sdk versions
To make it more maintainable and keep the docs up-to-date,
define most of the version numbers for various tools used
in Qt Android dev environment.

Task-number: QTBUG-115020
Change-Id: I92aa52398b7700e90a0ffd39a1c40bb7a17c3658
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit eef0d82a4c991e0ac8b2f250b439c48396678c23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:47:05 +00:00
Assam Boudjelthia
97a3434fde Android: use m_context in QtServiceLoader.initContextInfo()
since m_service will not be yet set, m_context should be used here.

Task-number: QTBUG-115016
Change-Id: Ie259e703da1d8aac23117f032b7d146f7060aac2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Janne Juntunen <janne.juntunen@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit fcc8b89ae01eb405c4cfa8fafd7b1b7068a2d033)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:47:02 +00:00
Assam Boudjelthia
482af5a431 Android: save the service under QtNative with QtNative.setService()
Otheriwse Qt C++ code will not be able to find it.

Task-number: QTBUG-115016
Change-Id: Id3a2efb1f33cb60a523359e1ad646a394e24397e
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Janne Juntunen <janne.juntunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 7996a3fc7f408a2f92b103f6d03d172b1f0d9295)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 19:46:56 +00:00
Jan Arve Sæther
c8df6e18df Do not assert when preferred{Width|Height} is infinity
There's two alternative strategies for fixing this:

1. When fetching the preferred sizes from an item, the number is bounded
   to a smaller (but still very large) value - not subject to overflow.
   In practice this will result in the correct layout, but the
   consequence is a small inconsistency: The preferred size of the
   layout will be less than infinite despite that one of its items have
   a preferred size of infinite.

2. Do not bound the fetched preferred sizes from items, but instead
   let the rest of the code handle infinity.
   This will result in the correct layout, and also a correct preferred
   size of the layout.

This patch uses the second strategy, by applying a bound when needed.
Autotest will be submitted to qtdeclarative, since QGraphicsLayouts are
not affected by this.

Pick-to: 6.6 6.5 6.2
Task-number: QTBUG-116577
Change-Id: I49f79d288370bd93831ac9eda623ce4bbf587796
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 2a95ecf7e81fbdcfad50f8a1dd5c62b120e2ec27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 18:40:42 +00:00
Inkamari Harjula
56f6eb2c09 Doc: Review and improve QFileDialog documentation
Grammar improvements made. A screenshot added.

Task-number: QTBUG-119551
Change-Id: Ia14c654e92eede5a32bba18cd4d05a74d289f64b
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
(cherry picked from commit 26ac6bd4a4e004acd4602d346c3fe45e79a51bf6)
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-12-20 11:51:16 +00:00
Kai Köhne
84365c0b60 Doc: Fix linking to QFileDialog::NativeFileDialog
Pick-to: 6.6 6.5
Task-number: QTBUG-119551
Change-Id: I1c698673873e5534b6d7867f8bc752115c254241
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Inkamari Harjula <inkamari.harjula@qt.io>
(cherry picked from commit 1edc866878926d3fba31fc9ee0d9c9abc52cc8a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 11:51:16 +00:00
Nodir Temirkhodjaev
95acccea1f qfilesystemmodel.cpp: Fix building with -no-feature-filesystemwatcher
Pick-to: 6.6
Fixes: QTBUG-120062
Change-Id: I2d4d0ff06b8088af81330ed0956b86f292c21cac
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 38dbd751640399a7887cf91fed73688df209a38d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 07:51:29 +00:00
Christian Ehrlicher
3252ef72d4 QFileDialog/win: pass only filename to IFileDialog::SetFileName()
One more place were we should only pass the filename instead the full
path to IFileDialog::SetFileName()
Amends 19c701d370512e81d1b934f899b03ae0c2e6953f

Pick-to: 6.6
Task-number: QTBUG-47159
Change-Id: I3ac36eb2b6b6fe84fe6985590da882b1d5733efa
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 2643210bd6e07aa1d8ae78c109592bdc2545b074)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 07:51:29 +00:00
Lorn Potter
82a32ac7ab wasm: fix Pen input
This also adds the ability to distinguish between a Pen and a Touch.

Fixes: QTBUG-116989
Change-Id: Iffc5d20c9b46c1746a03c45dd12017d5dd5172a5
Pick-to: 6.6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 0367aace14b61e72433fa7cb7aab18b3def0030c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 00:46:27 +00:00
Morten Sørvig
de27289aaf wasm: Don't suppress exceptions during main()
If there's e.g. an infinite loop during main() that
would previously result in a blank page, but not error
message. The expected case is that we would get a RangeError
exception, but that exception never reaches the catch
handlers in qtloader.js.

Work around this by setting noInitialRun, followed by
calling main manually. We then need to handle the case
where the app.exec() workaround throws, which should
not trigger an error.

Change-Id: Ia8431279308770981316cd168e4316341bfb2531
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit db93cd4f61ec9ad75b2389e5ac1724becfce3a1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 00:44:47 +00:00
Morten Sørvig
d510bfa2df wasm: set MAXIMUM_MEMORY to 4GB
This increases the maximum available memory from 2GB
(Emscritpten default) to 4GB, which is the 32-bit wasm
max.

Add QT_WASM_MAXIMUM_MEMORY qmake/cmake option for overriding.

Change-Id: I6257fc919a749412c4ba1e0f939996c6057ce314
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit c6d3b91549ceaafa81cbcedf243f798f1114a467)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 00:44:41 +00:00
Morten Sørvig
8e82b16587 wasm: call onExit once and only once on exit
We listen to the onExit and on onAbort Emscripten events,
and also handle exit by exception. Make sure we call
onExit only once on exit, regardless of the order and
number of Emscripten events.

Change-Id: I4833a1056fad0a2706bd6c0f0fce98fb052fe8c8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit ac4619a36a54a2168ea5d7a2c7d059781564098c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 00:44:40 +00:00
Lorn Potter
ab6af9cba9 wasm: add QWindow parameter to DragEvent
Perparing for enhanced Darg Drop support

Done-with: Mikolaj.Boc@qt.io
Change-Id: I24ce72570ce0754c8a5c152a92192eebeae5b340
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 585f348f3c8137cec4ab503eecc28296da2798f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-20 00:44:38 +00:00
Topi Reinio
26c10a8863 Doc: Fix documentation issues for Qt Core
* Fix template arguments in \fn signatures for Qt::compareThreeWay()
  functions.

* Fix template arguments in \fn signatures for QDebug::operator<<()
  functions.

* Fix \sa links to specific overloads of QSpan functions.

* Fix \sa links to specific overloads of QFileInfo::fileTime().

* Remove references to 'Custom Type Example' (example has been removed).

* Fix linking to 'JSON Save Game' example.

* Fix references to 'Queued Custom Type' example.

* Fix linking to QCryptographicHash::Algorithm.

* Fix linking to Qt Qml module.

* Fix undocumented parameters in qHypot().

Change-Id: If9eb9978a14e147f003672a682972b319454c311
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 96740ea3fed8a7837dc282135661723858fff198)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-19 22:49:49 +00:00
Cajus Pollmeier
fa41643a7e Fix CMake extraction of sub architecture test
The length check is hard coded to the length of the string under test.
As the STRINGS match only filters out non printable characters, we've
no guarantee that the characters before the == position are printable
or not. So _pos may be > 1 and then string length check will be broken.

Replaced this by a pattern match to see whether there's something after
the ":".

Fixes: QTBUG-120125
Pick-to: 6.6 6.5
Change-Id: I24971b3bc83ea05841dae21667fbbae3416cfcf9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit e7457ff171255148d92254316433d39ef1bd3d28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-19 11:01:14 +00:00
Volker Hilsheimer
f7e42dc8b6 JNI API review: minor cleanups of QJniArray
While the QJniArray type still is expected to be a QJniObject, we should
still make the QJniArrayBase type non-constructible by making the
constructors protected. Also make the destructor of that type protected
and add explicit default implementations of the SMF.

Name the SFINAE helper and predciate consistently as IfCanConvert.

Change-Id: I7a7c6a320fe9acb0758b53d94832d355c99cb6bb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 4a19e97f70994bc8bb67e26533d18266b8a615bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-19 08:02:55 +00:00
Volker Hilsheimer
2d3ee8ac34 Update Sliders example
Simplify the "responsive layout" implementation. Just use a QBoxLayout
with changing direction instead of repopulating a QGridLayout, and
change the orientation of one set of sliders instead of creating two
sets in a stacked layout.

Simplify the resizeEvent() implementation accordingly.

Update the documentation snippet text to match the code, and document
the resizeEvent() override.

Pick-to: 6.6
Fixes: QTBUG-119977
Change-Id: I73a1bb215c956fa283291ebf0ea45ff9a975c727
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f3fb89ba298e1741320d8bfac9cbd0d503373bff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-19 08:02:47 +00:00