Commit Graph

68875 Commits (6f56cc73cef603c43358fed31ee7bf8acd5131ad)

Author SHA1 Message Date
Christian Strømme 6f56cc73ce visionOS: Make sure the multiview caps is enabled
The caps for visionOS are the same as for macOS, so just set the
same for both, including support for multiview.

Task-number: QTBUG-126294
Change-Id: Ie3a551f134d8a8a39d63801bc7fd8dcca1e715c9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 2c2d36fae186a308f4bf2aa799551b74eb24eacb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 19:14:45 +00:00
Mårten Nordheim a7ad2641c5 DecompressHelper: retain the error from internal counter
We never copied the error string so after the call to 'clear' it went
away completely. Additionally, stop clearing the error string in clear()
since we reset it when the encoding is set, in case the object is
reused.

Pick-to: 6.5
Fixes: QTBUG-129697
Change-Id: Ia64e1d13a99b62760f61cac6b67ae3cff5e2c9da
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit f84c83be52462536ce5ae5ba68205e7061369fe3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 18:28:10 +00:00
Wladimir Leuschner 31367fd2c8 WindowsQPA: Respect ENV and cmdline darkmode overrides
Currently the commandline and environment parameters (windows:darkmode)
for setting the darkmode handling are ignored when the application
starts. This patch adds a condition to
QWindowsTheme::effectiveColorScheme that checks whether darkmode
handling was explicitly overridden and initializes in the constructor
the m_colorScheme with the result of passing Qt::ColorScheme::Unknown
toeffectiveColorScheme.

Fixes: QTBUG-127135
Change-Id: I365d26c66fdb3a754832cb7c579aeebecab093fd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 2ced94b4100c03c5feb7d5b1c0006c9fc451e944)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 15:00:23 +00:00
Wladimir Leuschner b33e0eac97 QWindowsVistaStyle: Fill menu popup with theme color
The background for menu items is not drawn and can lead to a transparent
background when switching from QWindows11Style to QWindowVistaStyle at
runtime. This patch fills the background of menu items with
MENU_POPUPBACKGROUND.

Fixes: QTBUG-125474
Change-Id: I246db15ec821f9bc46ba410293c41b7e24548716
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 3de6d6fd348668ff5179504e950ce20b15075391)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 15:00:13 +00:00
Joerg Bornemann 8f89f45f42 CMake: Fix build on Solaris the stack_protector feature enabled
Solaris requires the ssp library to be linked when
-fstack-protector-strong is passed to the compiler.

Fixes: QTBUG-129085
Change-Id: I55396fd9dc102ffd98bef54fc3dfc1aadf18a404
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 73875b8bb5faf9f6ec1064704efaae76e33b0e35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 15:00:13 +00:00
Thiago Macieira ea4c74ccaf QFileInfoGatherer: Fix internal build (with Q_AUTOTEST_EXPORT)
I'm surprised that this passed the CI on Windows, because
Q_AUTOTEST_EXPORT is Q_DECL_EXPORT, which is __declspec(dllexport) and
all dllexport'ed functions must be defined in the current DLL, not
imported from elsewhere. This is similar on Unix systems with the
no_direct_extern_access mode, because then Q_DECL_EXPORT behaves like on
Windows.

That means Qt modules can't call a Q_AUTOTEST_EXPORT function
from another module (only tests can). Solve this by providing a function
that is properly exported with Q_CORE_EXPORT.

Amends commit 3d08816f4c4245f08a53307775fe3c4ed31a7a32.

Task-number: QTBUG-28246
Task-number: QTBUG-31103
Change-Id: I2ba317ab34bda8c18954fffd28395f7354cb54f2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fbe61def33a2708e35e5e6a796e88976b04941f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 14:58:57 +00:00
Christian Ehrlicher 333a4ca7dd Windows11Style: allow usage also on windows 10
There is no reason to limit the usage of the windows 11 style to win11
or above - it works perfectly on windows 10 when using the correct font.

Change-Id: I179d2c017cdad130a134f45c2f0dfadc052a39f0
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit c9306baa825c4070e37aa46aff00aa1905bf1681)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 14:55:13 +00:00
Fabian Kosmale dd5c13d09e QMetaObjectBuilder: Fix construction logic for enums
We need to put metatypes in the correct place; this is especially vital
starting with Qt 6.9, given that we need it to query it to figure out
whether we have a 64bit value or not.

As a drive-by, replace some ugly casting when constructing the meta-type
array with a call to QMetaType::iface.

Change-Id: I4b1f42f974e9f7a21f6aa4c87c3f8919f6965d6e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d392d3b22c94f86fea50f26284bc9ac8b35f6851)
2024-10-09 08:48:13 +02:00
Tim Blechmann d12327bc3c QGraphicsFrameCaptureMetal: silence deprecation warnings
StringBuilder has deprecated support for char[], using wide string will
also avoid run-time unicode conversions.

Change-Id: Iff865463fb255acfa55224393807ece9ecb818b4
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
(cherry picked from commit d86224250322550169dd72bb04987a73aca74e69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 02:44:51 +00:00
Alexandru Croitor 3946e7af6f coin: Move cross-compilation build directories outside of sources
This stops confusing the 'reuse' tool when trying to generate a source
SBOM. The tool considers all files in the source dir as source files,
and because we placed the build dir inside the source dir, all build
files were considered source files. This caused errors saying the
files don't have copyright headers.

Change the build directory for cross-compilation jobs to be outside of
the source directory, similar how we do it for the native builds.

Augments ae62d908a5

Task-number: QTBUG-82820
Task-number: QTBUG-96513
Task-number: QTBUG-122899
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Change-Id: Ie82a6c55aa5326f7e9cc5c0e09342f3405e78d17
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit fc08a07a0035b3398cf009fef1ab4956ab4b60ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-08 16:46:36 +00:00
Alexandru Croitor be2e37f85a coin: Remove dead code that used to build host Qt in a cross-build
We don't build a host Qt during a cross-compilation build for a few
years now. Instead we reuse the prebuilt host from the platform
dependencies. This was left over to allow gradual porting to the new
way of using platform dependencies, which is now long done.

Remove the code to ease maintenance.

Amends 684fea1314

Change-Id: I9988da6f33f9d9b98d304316317d39c3dfb7c633
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit bb3ce6989eb90c0a8142c158a05eb237dfa8f032)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-08 16:46:35 +00:00
Simo Fält 2822db26be CI: Set SBOM_PYTHON_APPS_PATH env variable only if not set already
Change-Id: Ie8849721ff576079d708412c441cdf4830dbe427
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit cfa106c7d48167c1ae36dd56391de801758a0383)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 18:50:13 +00:00
Santhosh Kumar be974c4855 Avoid referring to invalidated observer during binding evaluation
The property observer reference used during binding evaluation can
become invalidated as the container used to maintain the
the observer would invalidate the existing observers during its
resize, leading to referring to invalid memory.

Recognize that we do not need to store the observer, but only its
binding - the observer itself is not used later.

Therefore, change the PendingBindingObserverList to become a list of
QPropertyBindingPrivatePtr to avoid the issue.

Fixes: QTBUG-127596
Original-patch-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Pick-to: 6.5 6.2
Change-Id: I8c97721ca563083d6280194175f8a915dac2ff04
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 275202215376238bf414d5008d3c727085e58a4c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 17:26:50 +00:00
Laszlo Agocs c60505140d Fix typo in rhi doc snippet
Change-Id: I51ca55edf328a56154ab6420674755db94da5b7d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 9b9b3cdf36ad61c835059f0bf3cb47b8909ffe86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 14:49:00 +00:00
David Faure 9f11db1855 QTableWidget: assume column 0 when dropping a row below another one
When dropping at a column > 0, the deserialized data wrapped around,
leading to multiple rows being inserted instead of just one (and
column 0 remained empty). Very weird behavior from the user's point of
view.

Drive-by whitespace changes due to clang-format.

Fixes: QTBUG-1387
Change-Id: I8d1dc14c124e468454e98ea6a14f33e3bef6e41a
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit ff8068deb45e45eb683745486956d3c6c795a708)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 12:30:28 +00:00
Jøger Hansegård ac81827ed8 Add WS_CLIPCHILDREN style to native window in embeddedwindows test
When a native/foreign window is used as a parent, its WS_CLIPSCHILDREN
style should be enabled. If it is not, the parent will paint on top of
the children and cause flickering. It is not Qt's responsiblity to
adjust the styles of foreign windows, so instead we document this in the
manual test.

Change-Id: I84bc25668d702c3475dfbd75a94dd3ed43a1695c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit a645128c296756ea6c7e70259958a0d000d029e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 12:30:27 +00:00
Alexey Edelev 839695567f Trigger reconfiguring of android ABI projects when CMake files changed
Remove the stamp files of 'configure' step to ensure that we re-run
cmake for android ABI projects, otherwise the per-ABI projects do not
consider the changes in CMake files when re-running the build.

Task-number: QTBUG-129358
Change-Id: I5b5c682358052044a9e550587ed0457694857e09
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 87930bb568018cc40ccd30babb42c8701e1d030c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 12:03:32 +00:00
David Faure 52c908fdb5 QAbstractItemView: implement full-row drop indicator
When the selection behavior is SelectRows, we're dragging full rows,
so it was very weird that the drop indicator was showing a single
column. Instead, expand the drop indicator over all columns.

This is typically for QTreeView but it also works for a QTableView where
a single row represents a single underlying object (otherwise, why use
SelectRows?).

Since we're testing the selection behavior of the drop side, not
the drag side, only do this when inserting rows, or (for OnItem) when
they're the same widget.
There's a use case for dropping single properties (from a different widget)
onto specific columns of full-row objects (there's also a use case for
overwriting the whole object but we can't know which one it will be...).

Fixes: QTBUG-1656
Change-Id: Idde0f4f8592970339f19dcc11ba667cf12677438
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a818326985295ba1cf1b31043b24e9f089b1d834)
2024-10-07 11:52:41 +02:00
Even Oscar Andersen 4bda9b977e wasm: Handle theme colors
Changing color themes did not work since the results from
qt_fusionPalette is cached by default.

The solution is to track changes and call qt_fusionPalette
when necessary.

Fixes: QTBUG-129399
Change-Id: I77824098349be5e5264fa9e230a949e3ccd6f14f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit ff645479e7489de5a88c71c0215748d84be3de9f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 09:52:41 +00:00
Assam Boudjelthia ca304ec1bf Android: delete androidContentFileEngineHandler in terminateQt()
Similar to other Android file engine handlers.

Change-Id: I63591e09312e439eee1e7bdd71a65d3df4cefbae
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit cd5d30fa3368ab9cf995ed934ea737f3e569e9ce)
2024-10-07 07:25:34 +00:00
Bartlomiej Moskal 258d90222d Android: Catch nullPointerExcetion for parentLayout
Add exception handling for non-existent parent for m_editText in
EditPopupMenu

Pick-to: 6.7
Change-Id: Ie01e1346185b494c1ac646ccfa9ed4a96c4ed85e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e39ea199167270971f45ab6c4b9c2c6c66b4b2ff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-05 20:21:29 +00:00
Bartlomiej Moskal 5ee47a970a Android: Override new methods in InputConnection
InputConnection interface got new method like [0]replaceText and some
overloaded (setComposingText, setComposingRegion and commitText) that
need to be override by QtInputConnection

[0]https://developer.android.com/reference/android/view/inputmethod/InputConnection#replaceText(int,%20int,%20java.lang.CharSequence,%20int,%20android.view.inputmethod.TextAttribute)

Task-number: QTBUG-120238
Pick-to: 6.7
Change-Id: I72a35ff6bf8cdc10d782b24efb6c99b92b33926d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit dbd5af6231c9182ef370eca2e06c485591d715b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-05 20:21:25 +00:00
Christian Ehrlicher dc124f2069 QCommonStyle: pass orientation to PE_IndicatorProgressChunk
When drawing the chunks for the progress bar, we now have to pass at
least the State_Horizontal bit because the orientation member of
QStyleOptionProgressBar was replaced with this state bit.

Pick-to: 6.7 6.5
Fixes: QTBUG-129386
Change-Id: Ibc8b6b315609cdd1a6f949ae2116728b7c6bded8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d399bdddc6e71617e045fc77e70abef3ed2ee006)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-05 19:54:48 +00:00
Christian Ehrlicher 5e8feb69df CMake/sql find modules: read foo_ROOT env var if available
Even though we set foo_ROOT in the provisioning scripts and CMake is
picking it up as the base dir, we should also use it as CMake variable
so we can look in other directories below foo_ROOT.

Change-Id: I193d8ff1c216a669162569d71891c3eb7b9b030f
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c68277c41b99d6791e3c1a5998b70c6cbbf6dc15)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-05 19:54:43 +00:00
Christian Ehrlicher 85af817469 QButtonGroup: make sure to always auto-assign negative ids
QButtonGroup::addButton() automatically assigns a negative id when no id
is given. This logic did not work out when a button with a positive id
was added beforehand.
Add a check to make sure to always return an auto-assigned negative id.

Pick-to: 6.7 6.5
Fixes: QTBUG-129398
Change-Id: Ieadfa44c4b145184a5473713591f4c111a5dafa4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 772d374ce715de9caaae4f026594d49f6da28dec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-05 19:54:41 +00:00
Thiago Macieira 20bf08f012 QStorageInfo/Unix: reset the valid state when doStat()ing again
If the user calls setPath() or refresh(), we are going to stat the
storage again. But neither retrieveVolumeInfo() nor initRootPath() unset
the flag if the storage became invalid.

This can't be tested automatically.

Fixes: QTBUG-129689
Pick-to: 6.5 6.2 5.15
Change-Id: I8d4c5b4ed563e89f5723fffd2f550b169bb20884
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit e55d7fa1e09efc86e797efdf00656891f640d81d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-05 19:24:36 +00:00
Christian Ehrlicher 8058a77340 Windows11Style: cleanup CC_ScrollBar
Cleanup CC_Scrollbar:
 - call subControlRect() only when it's really needed
 - use QStringLiteral to create static strings
 - calc rects only when really needed and then directly in one step

Change-Id: Ibe7944feb813ef3e7f6aea976579d192bafbcce9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit ffa0e9c19c3cdf3b299357dd263e7413010a62a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-05 17:15:43 +00:00
Christian Ehrlicher 55a8806e22 Windows11Style: cleanup CC_SpinBox
Cleanup CC_SpinBox a little bit
 - avoid unneeded QPainter::translate()
 - avoid uneeded QPainter::save/restore()
 - don't modify frameRect when not needed
 - merge up and down drawing to avoid code duplication
 - use QStringLiteral to create a static string

Change-Id: Id8bc8d5085b6681b48ea3388941d21a11c0345ba
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5cd4434389870d43baa1325ba97c5776baff65f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-05 17:15:37 +00:00
Allan Sandfeld Jensen cfeb85e877 Correct BGR888 tests
Was accidently using RGB888

Change-Id: I4afaf7a96e6fb7a696f0ce4f35a94babd79d3d07
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit fc0d9b2033d4914c35fa9350dde641d76e581903)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-05 14:16:24 +00:00
Thiago Macieira 30d40a8890 Remove dead code in checkRdrndWorks() if __RDRND__ is defined
The only place where we call qRandomCpu() in qrandom.cpp is guarded by a
check using qCpuHasFeature():

    if (qHasHwrng() && (uint(qt_randomdevice_control.loadAcquire()) & SkipHWRNG) == 0)
        filled += qRandomCpu(buffer, count);

static inline bool qHasHwrng()
{
    return qCpuHasFeature(RDRND);
}

Since qCpuHasFeature() also checks if __RDRND__ was defined, we ignore
the result of checkRdrndWorks().

Users of CPUs without RNG must compile with an -march= flag that doesn't
enable it or must pass -mno-rdrnd to keep the runtime detection code.

Task-number: QTBUG-69423
Task-number: QTBUG-129193
Change-Id: Ib7819f80041fe330d033fffda7e7c160141d7dd8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 6543f50536f3547b43a27b32af59d68f28a60247)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-04 20:42:51 +00:00
Richard Moe Gustavsen f0758fb113 QMenu: don't trigger a menu item if the mouse didn't move
If you right-click to open a context menu, followed by another
click to close it again, without moving the mouse, it can
happen that the menu item under the mouse will trigger.
This is especially prone to happen if Qt has a large scale
factor and the number of menu items is high, since then the
menu has to move a bit up to make room for as menu items as
possible on the screen.

This patch will reuse the already existing hasMouseMoved()
function to avoid triggering a menu item if the mouse hasn't
moved. This will make sure that the user won't trigger a menu
item by accident when instead trying to close it.

Fixes: QTBUG-128359
Pick-to: 6.7 6.5 6.2
Change-Id: Ie4d73ee2031d1159dd6c003124869004b4928d18
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit dc1d3abd7e852829b9bc81c1ba9565f40147402d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-04 16:01:44 +00:00
Bartlomiej Moskal e3bea87ee3 Android: When setting new parent for childView remove old one
A view cannot have two parents. If the view already has a parent, you
must first call removeView() on the child's parent.

Fixes: QTBUG-129524
Pick-to: 6.7
Change-Id: I6a8340ed8db58a77626be17366d5c71bdfc8c762
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit ecd4623f05abf419db6f0c3bdad406c1883b6509)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-04 16:01:43 +00:00
Allan Sandfeld Jensen 68c22bd7d3 Avoid -Wstringop-overread by using a view with encoded length
For some reason the suppression stopped working for me, but using the
viewAt function is better in general as it doesn't depend on null
termination.

Amends da84941375 (viewAt() was added by
2c2c6de85a for 6.3, so we can use it in
all affected branches).

Pick-to: 6.7 6.5
Change-Id: Ic71bd559929a2cd0cdea4ed1cc1edcfc583865ff
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cec64aaf2a8e110421d61478b9ad0cb177ee0d1c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-04 15:28:19 +00:00
Alexey Edelev 348d56cca4 Reestablish the dependency chain between Android ABI-specific targets
Actual dependency chain doesn't consider the changes in Android
ABI-specific targets. To make sure we rebuild per-ABI targets this
changes the dependency chain, which looks as following now:

 - <target>_make_<apk|aar|aab>
 - <target>_copy_apk_dependencies (new proxy order-only target)
 - qt_internal_android_<abi>_<target>_copy_apk_dependencies
 - qt_internal_android_<abi>_<target>_copy_apk_dependencies_stamp
 - qt_internal_android_<abi>_<target>_build_stamp
 - <target>

So the <target> dependency on the per-ABI build targets is reversed,
to guarantee that per-ABI targets react on source changes.

Fixes: QTBUG-129358
Change-Id: Id4d5fb0d45a213cd49c8a6aefa72c5db6609d714
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
(cherry picked from commit 44149f9d8b62b5343a5d06628b0c9588f035ccc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 13:12:18 +00:00
Tuomas Vaarala 305b461157 Enable platforminputcontext in QNX QPA without PPS
Platforminputcontext is needed for Qt Virtual Keyboard to work thus it
needs to be enabled without to condition to PPS. PPS is removed in
QNX 8.0 and the condition would never be met. It is safe to enable
platforminputcontext without condition for QNX 7.x as well since it is
needed for Qt VKB anyways.

Fixes: QTBUG-129436
Change-Id: I82230d1411e54713a2dabadf5a8dff3ca5455fbb
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit 4d908a3b5e305462bf7e234db0fe1e42e866e8ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 11:03:34 +00:00
Doris Verria 3b1951cd1b QWidgetWindow::setFocusToTarget: Respect focus policies and proxies
When calling QWidgetWindowPrivate::setFocusToTarget with Prev or Next
target parameter, we were just setting focus to the
next/prevInFocusChain() of the window's focusWidget(). This will bypass
focus proxies and focus policies of the widget, which is wrong as it
can end up giving eg: tab focus to a widget that does not have such
focus policy.
To fix, we should instead call QWidget::focusNextPrevChild which
determines the right next/prev in the TAB focus chain. As this is a
protected member of QWidget, implement a "wrapper" for it in
QWidgetWindow which is a friend class of QWidget.

Task-number: QTBUG-121789
Change-Id: I1f4f5d85e7552926580906fdef6f0a456fe7486c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
(cherry picked from commit 926d3287aba9fe2b67c25d0c0c5b606f3f41803e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 11:03:34 +00:00
Tuomas Vaarala 5e090d4b9b Ignore screen create events for other than window object type
Previously the screen create event was only handled for window.
With QNX 8.0 there seems to be also screen create events for display
and device. The property query returns ENOTSUP (Not supported) so we
simply ignore other than window create event.

Fixes: QTBUG-129213
Change-Id: Ia7da693f06f6590d349595ecde6b303fab145bc0
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit 11d5792774e921a7d6e296b1238f9e9c96ddfd96)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 11:03:33 +00:00
Liang Qi a506d6bd88 tests: blacklist tst_QSizeGrip::hideAndShowOnWindowStateChange()
on Ubuntu 24.04 GNOME Wayland

There is a bug in GNOME 46.0 on Ubuntu 24.04 Wayland when showing
a maximized or fullscreen window.

Task-number: QTBUG-129361
Change-Id: I5291439dd9e1ba78cf403a0272ecbd8c83d2f94f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 649794fddf9c1d1c96b271de3b29b3b67593dff6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 08:37:07 +00:00
Liang Qi 8719c2f784 tests: use qWaitForWindowFocused() instead of qWaitForWindowActive()
This depends on 9eb06a2848 .

This follows bc7821764b4d50fbb4e0ca1b84f85980ce15eeb0 and
5709baea2c261f77f955ab76c074a39c9c3993aa.

There are lots of work to remove QApplicationPrivate::setActiveWindow()
in test code, see also QTBUG-121488. We need to adapt them for Wayland.

Task-number: QTBUG-125446
Task-number: QTBUG-121488
Change-Id: I093568c1d89de31c3893d3c7b139f1db33579633
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit f42979cf6937c78c412fcfa25ec011fb66b48132)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 08:37:05 +00:00
Liang Qi faff79d59e tests: blacklist tst_QWindowContainer::testFocus() on Wayland
Task-number: QTBUG-129292
Change-Id: I1b0dfae10b7b0f5348605121da1903d9c7247dba
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 7039232c2e4c623b341461526a22f775b1196882)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 08:37:04 +00:00
Liang Qi d10181d37c tests: blacklist a few tests on Ubuntu 24.04 GNOME Wayland
* tst_QListView::styleOptionViewItem()
* tst_QTreeView::styleOptionViewItem()

There is a bug in GNOME 46.0 on Ubuntu 24.04 Wayland when showing
a maximized or fullscreen window.

Task-number: QTBUG-127920
Change-Id: I4136a97441870a769814a483c0f91aeacd830651
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5d71f4680df30674b8615b9b9a6b418f0a1c0864)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 08:37:02 +00:00
Liang Qi d3780f2444 Revert "xcb: handle XI2 input button and motion events from slave devices"
This reverts commit b71be292780b858f2c55ce92601452e2ea946de2, which causes a regression when using mouse wheel and moving cursor together
on scroll bar for some qt applications, like qutebrowser and
qbittorrent.

Fixes: QTBUG-129509
Fixes: QTBUG-129514
Task-number: QTBUG-110841
Pick-to: 6.8.0 6.7 6.5 6.2 5.15
Change-Id: I703158874413a1306ea99217bced4ba38382f543
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5875da6d70303468eab85030a80f54c268f80b79)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 08:37:01 +00:00
Liang Qi 18a24eabbe tests: skip tst_QWidget_window::tst_dnd_events() on u2404 x11
Task-number: QTBUG-129567
Change-Id: I108a468033a9579b07a379470a43aa94d5cf9ec0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
(cherry picked from commit c851602020cd564d42c9721eb19888471a11107c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 08:36:59 +00:00
Liang Qi 8b21bf2ae2 tests: blacklist tst_QWidget_window::mouseMoveWithPopup() on u2404 x11
Task-number: QTBUG-129568
Change-Id: Ie1d9fc7e32c0766d55324aae0dbd07218ac8599f
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c5ee1f68c02ca3942c94f246fba56ef4ffe7f229)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 08:36:57 +00:00
Thiago Macieira 4374f3ce41 tst_QDnsLookup: don't add duplicate 'nameserver' lines
I don't know why systemd-resolved did have those for me, but it did, so
QtTest complains.

QWARN  : tst_QDnsLookup::setNameserver() Duplicate data tag "..." - please rename.

Change-Id: I8df70eb429682b529ecefffd0aca735f94d77225
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1420ee85165c03bac2aa1678b295f7b1ebe44f51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 03:43:03 +00:00
Thiago Macieira c2df419edf tst_QDnsLookup: add the ability to specify an alternate default server
For people running this test who are burdened with a broken DNS server
and for whom the check added in the previous commit fails, skipping the
test.

Incidentally, this is useful for developing QDnsLookup itself, because
some otherwise-reasonable servers are known to fail for some queries.
For example, dnsmasq doesn't like queries of type ANY:

SKIP   : tst_QDnsLookup::lookup(any-a-single) Server refused or was unable to answer query; a-single type ANY: Server failure
SKIP   : tst_QDnsLookup::lookup(any-a-plus-aaaa) Server refused or was unable to answer query; a-plus-aaaa type ANY: Server failure
SKIP   : tst_QDnsLookup::lookup(any-multi) Server refused or was unable to answer query; multi type ANY: Server failure

Now I can get it to pass with QTEST_DNS_SERVER='[2001:4860:4860::8888]':

PASS   : tst_QDnsLookup::lookup(any-a-single)
PASS   : tst_QDnsLookup::lookup(any-a-plus-aaaa)
PASS   : tst_QDnsLookup::lookup(any-multi)

Note for the future: setting a non-default server may exercise different
code paths inside QDnsLookup, so this is not a replacement for having
proper DNS servers in the CI.

Fixes: QTBUG-129335
Change-Id: I81dcd4834972efa84c9ffffdd8aaafb68f20560b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 10fea78bdcad2086c980fa1c1bbcd5bb543e4366)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 03:43:01 +00:00
Thiago Macieira 5ce4677f2e tst_QDnsLookup: check for DNS server sanity
Instead of failing tst_QDnsLookup and blaming the class for problems,
let's first verify that the resolver can resolve an address. If it can't
and we're not in the CI, then just skip the test.

I chose "a-multi" because a) it required the least variability in the
command-line and b) it has more than one RR in the RR set so it may find
more problems than "a-single".

Output when I forced a domain that doesn't exist:

QWARN  : tst_QDnsLookup::initTestCase() Default DNS server in this
system cannot correctly resolve "a-multix.test.qt-project.org"
QWARN  : tst_QDnsLookup::initTestCase() Please check if you are
connected to the Internet.
QDEBUG : tst_QDnsLookup::initTestCase() Output was:
Server:		127.0.0.53
Address:	127.0.0.53#53

** server can't find a-multix.test.qt-project.org: NXDOMAIN

SKIP   : tst_QDnsLookup::initTestCase() DNS server does not appear to
work

Task-number: QTBUG-129335
Change-Id: Id2dcc2ce7cfdd83c556ffffddb88a1f1b4339606
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 40986460e3f372cdb42ad80377455dc43b7cdb42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 03:43:00 +00:00
Thiago Macieira ea871ee2e2 tst_QDnsLookup: don't require "localhost" to resolve
It must for QHostInfo, but DNS servers are not required to have that
label. It appears to be a good practice the majority of admins follow,
but it's not universal, so we cannot require it.

But if it does resolve, then RFC 2606 requires it resolve to 127.0.0.1.

Task-number: QTBUG-129335
Change-Id: Ib3b11de6616665658a20fffd754f2fbd78780b1c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 252bd7c67ce7a0ed3c41059f551f87f0f77b5606)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 03:42:59 +00:00
Thiago Macieira cff3026140 QMetaProperty: fix type-punning of QFlags in write() from QString
Amends commit 46f407126e ("MetaObject:
store the QMetaType of the properties"), from 6.0 cycle, which made
QMetaProperty::{read,write}() use the actual enum type in the
QVariant. But it missed the case where the input QVariant contained a
string with the enum's values.

Note this is *not* a type-punning in all cases: if the type of the
property was marked as a Q_FLAG, moc generates code to access it as
int. That is fixed in the next commit.

Drive-by compare QMetaTypes instead of their IDs, which avoids
generating a call to register them.

Pick-to: 6.5
See-also: https://lists.qt-project.org/pipermail/development/2024-September/045636.html
Change-Id: I1cfce869090c96bb41b6fffdc20855cfa7cb2a18
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 1f9ab3767ed625a090af45f26dffd10dcd05eef5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 03:42:30 +00:00
Liang Qi 228dfd5b31 tests: blacklist tst_QAIV:testDialogAsEditor() on u2404 x11
Task-number: QTBUG-129516
Change-Id: Id36c8b6b4f5444b7bd3e982bdcf4d2b45b64a4cd
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit c35e6fffd6ccc4230f31b6a5610f466782ef5f75)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 00:14:08 +00:00