Commit Graph

11098 Commits (d96ce5eb0d204289754b2c3aefd2a36fde7f49ba)

Author SHA1 Message Date
Christian Ehrlicher e99c2d9314 SQL/OCI: use OCIBindByPos2 instead OCIBindByPos
Use OCIBindByPos2 instead OCIBindByPos where it was not yet changed to
allow lengths > 2^31 (and avoid unneeded casts).

This is a follow-up of 7005630a9b735f2e59e3345fee0305e0277c0208.

Change-Id: I8b6efdfdb0fb349043e9c84ceba17e008882f584
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 911eac26d482b8d63419648d6f735c49e9e17c82)
2024-09-16 18:41:42 +00:00
Alexey Edelev 26d9fca58e Generalize PlatformGraphics
Add the unified PlatformGraphics module, which looks for either Integrity
or VxWorks platform graphics.

The PlatformGraphics module creates the interface
PlatformGraphics::PlatformGraphics target which links the respective
platform graphics target. It's expected that from the platform graphics
targets to deliver the consistent subset of definitions, libraries,
include directories, compiler and linker flags and also the special
<platform>_REQUIRED_<LIBRARIES|INCLUDES|DEFINITIONS> variables.

The <platform>_REQUIRED_<LIBRARIES|INCLUDES|DEFINITIONS> variables are
consumed by the PlatformGraphics::PlatformGraphics and stored in the
respective _qt_internal_platform_graphics_required_<type> property, to
access the value without scope limitations. The property then is
checked by the EGL and GLESv2 modules(this can be done elsewhere too)
and is appended to the CMAKE_REQUIRED_<type> variable before running
the respective compiler checks.

Task-number: QTBUG-128455
Change-Id: Id1987c6294327509a14fbeeb7b8bf39aad6f486c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Karim Pinter <karim.pinter@qt.io>
(cherry picked from commit 3322f585eb5ad11acc1f93ecaafb42e30e37b197)
2024-09-13 21:58:04 +02:00
Inho Lee a338caec1b wasm: add input context composition WA for ibus
With IBUS, compositions are processed with "Dead" key.
It is supposed to be processed with input context,
so window's key event will be skipped.

Fixes: QTBUG-117096
Pick-to: 6.7
Change-Id: I179d32d656bd38990de4b656757957e26935376f
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
(cherry picked from commit c494ed87382605bdafa23f15d79c2a44e75cf911)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-12 08:08:59 +00:00
Andreas Bacher b0d73b947f SQL/Firebird: Fix interpretation of time stamp with timezone
The firebird api expects the timestamp (ISC_TIMESTAMP_TZ) of a timestamp with time zone is provided in UTC.

Pick-to: 6.7
Task-number: QTBUG-128493
Change-Id: Iacc85ca1141407f5ab73fd0198c7b2db770bf589
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Johann Anhofer <johann.anhofer@meon-medical.com>
(cherry picked from commit 8d8805214df22bf8dccbb30c9ca4a9953f3a1068)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-12 07:59:22 +00:00
Assam Boudjelthia 6a9ee6eb68 Android: bump AGP to 8.6.0 which supports Android 15
AGP 8.5.2 still throws a warning about not being tested
with Android 15 builds, now 8.6.0 is released and doesn't
have the warning.

Amends b5d8552f2baab56457d3f39f6b2915c72447b702.

Fixes: QTBUG-128648
Task-number: QTBUG-126061
Change-Id: I3d7a4c9c184e1a81f0ebb9431a6e3ca9706d19e9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 8436455e2740000a817e0b8154e13f47e6abb68c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-09 23:48:01 +00:00
Morten Sørvig 10397e5351 macOS: send DPR change on BackingPropertiesChange
AppKit sends the viewDidChangeBackingProperties message
to the view when the backing store scale changes.
Propagate to QtGui via handleWindowDevicePixelRatioChanged.

Pick-to: 6.7 6.6
Fixes: QTBUG-118794
Change-Id: Ia675e84f74dd3c64d6466adc753accbbb650325b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 97c12e3f2dc1e2114aeb8abaff4d551b112887ef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-07 13:48:31 +00:00
Wladimir Leuschner d6f33a70c8 QWindows11Style:Increase QDateTimeEdit width for layouted QDateTimeEdits
Fixes: QTBUG-124235
Pick-to: 6.7
Change-Id: I252dd59a716e4897baf96988307a335671bb141b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 5a1ea842c9259f4b0cddd5b2166d9736516af257)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-04 14:00:44 +00:00
Morten Sørvig 9e7eef5def wasm: simplify QWasmWindow constructor
The code implements parts of the event handling as lambdas in
the constructor. This makes it hard to see what the constructor
code itself does.

Instead, move the initial handling of the emscripten::val
event to event handler functions, which then call the existing
process event functions.

Change-Id: I3abc5be47b080c772c699c21f2fe1cc555ff8192
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 3117d88cdf2324a7833cdf9ceecc4cba30e1e090)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-04 08:37:48 +00:00
Tor Arne Vestbø 046cc59aee XCB/Windows: Decouple foreign window from QWindow parent on destroy
Qt's foreign windows do not take (full) ownership of the native handle,
so our platform window implementations take care to not fully destroy
the native handle in their destructors.

But if the foreign window had a QWindow parent at the time of
destruction, and we fail to decouple the native handle from its
native handle parent, the destruction of the QWindow parent may
bring down the foreign window native handle as well, as part of
deleting the parent QWindow's native handle.

We take care to selectively do this decoupling on macOS, iOS, and
Android, but were failing to do so on XCB and Windows. This has now
been corrected, which allows us to remove the workaround in QWindow,
which was also in the wrong place (before setVisible(false) on the
foreign window child).

Note that we do not unconditionally reparent the foreign window, as
it might be a foreign window used for containing other QWindows, in
which case we don't want to mess with the native view hierarchy.

Change-Id: Ic526ca63fbf72dae5013ae9e44cb5cddf61c944b
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 8f8ce8d7a7e029e62a4f9b5b209dcc37f61410cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-04 08:37:47 +00:00
Vladimir Belyavsky 400426c388 QCocoaScreen: Account for platform window deletion during deliverUpdateRequest
Platform window may be destroyed during update request delivery.
For instance, in Qt Quick a user may close a window using some
animation with QML ScriptAction.

To handle such a situation and prevent a crash due to a dangling
pointer, we can simply protect the platformWindow pointer using
QPointer.

Fixes: QTBUG-128516
Pick-to: 6.7 6.5
Change-Id: I49ecec09d62e184f5df17794b303f147b705e2e3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 2ef1a338a91659871675514921f9a7dc8d1c8805)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-03 16:34:51 +00:00
Morten Sørvig 98c1a46a7d wams: disable delayed onload/first frame features
requestUpdateHold was not getting enabled properly in some
cases, in particular when using a custom html file to load
the application.

The assert on g_mainThreadEnvetDispatcher is also asserting,
with a following dereference of a null pointer.

Change-Id: Ibf77d90b84f8319a894e2df34a134d2e4265fe05
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 10afdc339e08ce1e6a8173df97a3f2edeb27cb57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-03 10:57:33 +00:00
Lucie Gérard 820f00693c Correct license for module and plugin file
According to QUIP-18 [1], all module and
plugin files should be
LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
or
LicenseRef-Qt-Commercial OR GPL-3.0-only

Also, LGPL and non LGPL should not be mixed in a given directory

[1]: https://contribute.qt-project.org/quips/18

Task-number: QTBUG-121787
Change-Id: I3384e5a4e40547d61118064fa1052b3d87a4e42b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit bdee35195126d230f6229b5f22d4d4a7bb15d4d1)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-08-30 13:47:33 +00:00
Tor Arne Vestbø b86a0cb720 xcb: Sync XCB connection after reparenting window
This is important for the reparenting to take effect even if there
are no other state changes to the window, such as changing its
geometry.

Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I9b39b56d163faf7a9b472cefbb19efdb944cb304
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 92619ce2ec8381aa01647337665e626b84063f59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 04:16:51 +00:00
Wladimir Leuschner b3a25e845a QWindows11Style: Increase QSpinBox width for layouted QSpinboxes
QSpinboxes used the sizeFromContents from QWindowsVistaStyle, which
produced a too small contentRect for the newly horizontal layouted
buttons on QSpinBox. This patch sets a minimum width for the content
rect, when QWindows11Style is used.

Fixes: QTBUG-124118
Pick-to: 6.7
Change-Id: Ibf58c8da360242587e55f8096fa3157459041ba6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit bfe8ac4ebff7a1e8114068f2f46e73c588735690)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-28 01:13:28 +00:00
Wladimir Leuschner ac74885507 QWindows11Style: Use float coordinates for ticks in QSlider
Fixes: QTBUG-127788
Pick-to: 6.7
Change-Id: If7620aade30c45c409cb442a7ed6e4a8aea7551e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 47ba48e0245e6f57ae0c76db626eb63ce6924cfd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-27 16:01:20 +00:00
Christian Ehrlicher 108162274b SQL/plugins: Fix configure options '-sql-<foo>'
The configure options '-sql-<foo>' and '-no-sql-<foo>' did not work as
expected because they were overridden by some ancient
'plugin-sql-<foo>' option. It looks like an ancient relict from Qt4
times where you could specify if a sql driver could be built as plugin
or as built-in module which is not supported anymore since Qt5.8.

Pick-to: 6.7 6.5
Fixes: QTBUG-128337
Change-Id: I7f0a0cf4b1dd11af32c48b50ceacf0f26eafffcf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 8a0c86651f1e5091c4fb5ef8cbbcef53a9e336eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-27 16:00:30 +00:00
Christian Ehrlicher 0b328b6b00 SQL/OCI: misc cleanup
Do some cleanup:
 - use qsizetype instead int
 - use default member init instead in ctor
 - remove unneeded functions
 - make a getter const

This is a follow-up of 7005630a9b735f2e59e3345fee0305e0277c0208-

Change-Id: Ibb02bd93a130c5d60bf431608666a5ad1fe71ead
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4bf7cc2440bb09578d95e8eea51ebfbddd2897e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-26 04:19:38 +00:00
Dongmei Wang 65b6de2a20 xcb: handle XI2 input button and motion events from slave devices
On Ubuntu 24.04, when the SuperKey is pressed, Qt only receives XI2
input events sent from the slave pointer devices on a mouse click or
a mouse move, but does not handle those XI2 input events.

Fixing this by allowing Qt to handle such an XI2 event and generate
a QMouseEvent for it if it is not handled previously.

Upon receipt of an aforementioned event, check if the event
is a duplicate XI2 event. A duplicate XI2 event means that
the XI2 event was sent from another device previously.

- If it is not a duplicate event, the XI2 event is passed to
  QXcbWindow to be handled. Eventually, a QMouseEvent is
  generated and sent from the GUI for the XI2 event.
- If it is a duplicate event, ignore it.

Note, part of commit:3bc0f1724ae49c2fd7e6d7bcb650350d20d12246
is re-done with the fix.

Fixes: QTBUG-110841
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I93beddef7261c37ddbe8bfdb6ae08c95f8f155c5
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b71be292780b858f2c55ce92601452e2ea946de2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-26 04:18:39 +00:00
Tinja Paavoseppä e04eca32a0 Android: Move EditPopupMenu to QtWindow
The EditPopupMenu requires a View in its
constructor, making it important that we do
not hold a reference to it after that View
is no longer valid.

In cases where we do not have one, top level View
that will stay valid for the lifetime of the whole
Activity, e.g. when embedding a QtView to non-Qt
Android Activities, making the popups QtWindow based
makes sense, as the lifecycle of the popup and
it's corresponding QtWindow should match.

Task-number: QTBUG-126180
Change-Id: Ibb45513de98f79a293a05eeb317d959ac0328dbe
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9e167af3f6a4b2ac192aedd83f5066808d719415)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-25 17:04:24 +00:00
Tinja Paavoseppä f149f0245f Android: Move CursorHandles to QtEditText
The CursorHandles are the handles visible when trying
to select text from a text edit, or select a position
in the text. As it is not used anywhere outside
a text edit, move it inside QtEditText, making it
easier to handle cases where we have multiple windows,
and multiple QtTextEdits.

Task-number: QTBUG-126180
Change-Id: I765f229050ca33887570c1434bdc0a2aa3659649
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 996e1fba5e83e09a897272b16062a8e4fad291ef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-25 17:04:16 +00:00
Tinja Paavoseppä e1b7a0d3ee Android: Remove getQtLayout() method
After refactoring the various keyboard input
related Java classes so that they are more contained
inside their respective windows, this method becomes
unnecessary.

Task-number: QTBUG-126180
Change-Id: I608399e98892752182039b8ece60005670da8224
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9ed29c73674939c772cc6b407881935e7fa19bcd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-25 17:04:11 +00:00
Wladimir Leuschner 11473410c2 QWindows11Style: Make MdiControls darkmode aware
Pick-to: 6.7
Change-Id: I525602c9757a8fed3d5ab6d64fe856adaa75b83d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 982314aace15109857784b0b6c3b49cc6e13b9b7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-25 17:03:54 +00:00
Wang Yu ee09375bba Fix Windows drag and drop crash
When QGuiApplication::primaryScreen() is empty,
dragging it causes a crash

Change-Id: I6c5e48be44db90acec5126957bee60b8514b10a7
Pick-to: 6.7 6.5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit f8e7dfe93ab9622f77aade23707cd6f0b9386379)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-25 17:03:37 +00:00
Doris Verria 57f0085fec QWindowsTheme: Set correct accent color depending on color scheme
The accent colors retrieved through the UISettings.GetColorValue API
are not theme aware. They will report the same values for both light and
dark mode. We were using the same Accent color value for both color
schemes giving us poor contrast when app is running on dark mode.
The API gives us several shades of accent colors from lightest to
darkest which we need to map to the accent roles in our QPalette
depending on the active color scheme. The following colors and their
mappings are based on the modern WindowsUI3 and its official Figma file:

Light Mode
AccentDefault (default accent color for controls) -> AccentDark1
AccentText/Primary (accent color for links) -> AccentDark2

Dark Mode
AccentDefault -> AccentLight2
AccentText/Primary -> AccentLight3

Fix this for the qwindowstheme so that it affects both the windows11
style and the FluentWinUI3 for Quick.

Pick-to: 6.7
Change-Id: If1c3a909d0a4dc9082e7589eaeaebd05e9f65a29
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d4a2f01976bbb0f8b357bfd96faf9ec249047c95)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-25 12:54:34 +00:00
Christian Ehrlicher d8c7856312 SQL/OCI: Compile with MSVC/64bit
Make the oci driver compilable with MSVC 2022 / 64bit. One more reason
to get those drivers checked within the CI.

Pick-to: 6.7 6.5
Change-Id: Iec07adcd4cafde5e028ea306fb88e635a22e2234
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2eb66149131b852f687302417cb2f76ef3184dbe)
2024-08-25 12:54:34 +00:00
Assam Boudjelthia b88adc1188 Android: upgrade to Gradle 8.10 and AGP 8.5.2
Bump Gradle version to the latest of 8.10 and Android Gradle Plugin
to 8.5.2 which is used by latest stable Android Studio Koala.

AndroidX core depenedency doesn't need an update as the latest stable
is still 1.13.1.

[*] https://developer.android.com/build/releases/gradle-
plugin#compatibility
[*] https://developer.android.com/build/releases/gradle-plugin#updating-
gradle
[*] https://github.com/gradle/gradle/releases/tag/v8.10.0
[*] https://developer.android.com/jetpack/androidx/releases/core

[ChangeLog][Third-Party Code] Updated Gradle to 8.10 and AGP to 8.5.2.

Pick-to: 6.7
Fixes: QTBUG-126061
Change-Id: I2178915776f7de60a0ca04826b7cee3e120096b3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit b5d8552f2baab56457d3f39f6b2915c72447b702)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-25 12:54:34 +00:00
Axel Spoerl 1329e6faca QWindowsWindow: Work around offset bug in GetWindowPlacement()
GetWindowPlacement() stores wrong positions in the &WINDOWPLACEMENT
argument's ptMaxPosition member on Windows 10.

(1) Each time a fixed height window is maximized, ptMaxPosition moves
- down by the task bar's height, if the task bar is on top
- right by the task bar's width, if the task bar is on the left

(2) The frame margins' left offset (typically -8) is not respected.

On Windows 10, set ptMaxPosition to {0, 0} adjusted by the frame
margins' left offset.

Fixes: QTBUG-123752
Pick-to: 6.7 6.5 6.2
Change-Id: I8bbd63d93a7648921b703ff6f3e09c4cf2999be2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 33874a9424cd03c21ca9986a39c383b3689f03d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-22 13:41:20 +00:00
Ahmed El Khazari a96e0eddd9 Android: Support custom FileProvider in openUrl
Previously, qtprovider was set as the default FileProvider, which
causes issues when creating a custom FileProvider on application side or
having multiple FileProviders.
To address this problem, we have implemented a solution that checks for
all available FileProviders and ,in case of multiple FileProviders,
selects first non-default FileProvider.

Fixes: QTBUG-117417
Pick-to: 6.7 6.5
Change-Id: I2a68983403f964036dc3177e13fe7ea4f9b4788b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d3508d48c0e4ef73a3a673ea14fb59cd8d930398)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-22 13:41:19 +00:00
Volker Hilsheimer 8633139e25 Accessibility on macOS: clean up reference counting logic
Simplify the "populate" functions to always create a new array, rather
than trying to reuse the existing array. Use (auto)release to free the
old arrays.

When creating place holder cells for a new row (where we know which row
array to add the cell to), shortcut the code to not find the row array.

Don't release cell elements that we got from the cache.

Consistently fix the row array size if it's not matching the table's.

Assert some more invariants and add logging output.

Fixes: QTBUG-122751
Pick-to: 6.7
Change-Id: Ie122a4754f6a3f4c19c5412a7c9e589f2861d4ae
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 1f7e926411d1e0d958c37dc597f24101d410c46b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-22 04:40:24 +00:00
Tor Arne Vestbø 7229cc75a4 macOS: Query platform window for size when flushing child windows
Otherwise we will not pick up the effects of the QHighDpiScaling layer
to the QWindow size, such as when setting QT_SCALE_FACTOR explicitly.

Fixes: QTBUG-122967
Pick-to: 6.7 6.5 6.2
Change-Id: I9dc914728c5aff28ef52ea3a502c94bcc91738bd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 270866923cce6184cd368fc5466e79bf5f845549)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-21 20:06:33 +00:00
Tor Arne Vestbø 987b215f08 macOS: Implement NSServicesMenuRequestor protocol for Writing Tools support
The AI based Writing Tools in macOS 15 uses the NSServicesMenuRequestor
protocol to interact with custom NSView.

By implementing the protocol we also gain support for service menu items
such as "Look Up in Dictionary" or "Make New Sticky Note".

Note that we only support plain text for now, which means that a rich text
selection will lose all its styling when fed through a service that changes
the text. To support rich text we need IM plumbing that operates on QMimeData.

The Writing Tools feature itself is only available on macOS 15.1.
To trigger it a native context menu with edit actions has to be shown,
meaning this will not work out of the box for Qt Widgets. For Qt Quick
with popupType set to Popup.Native the menu item is added as expected.

Task-number: QTBUG-126238
Change-Id: I2cd4aa9af8d613c7c67b3c19a70a23660dde2154
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 888429a734bf379ee59519b5d6047561df66c9a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-21 17:02:11 +00:00
Alexey Edelev a29573d136 Check the PROJECT_NAME when attempt to build sql drivers
Check the PROJECT_NAME but not CMAKE_PROJECT_NAME when attempt building
sqldrivers. This should be save since we expect that the project() is
called pre-Qt repo.

Task-number: QTBUG-127953
Change-Id: Ief3f11ba747ded0984ccfe1cfa6b7b47da538137
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 3e1a223318dbda50a010ba851841a9e51c80c42b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-20 01:59:46 +00:00
Soheil Armin e544ae0abd Android: Add Java QtAbstractItemModel and QtAbstractListModel
These classes used to be a part of QtDeclarative and are being moved
to QtCore based on API reviews.

Task-number: QTBUG-126976
Task-number: QTBUG-126977
Change-Id: Ic269f23ca2292031cda62faf41428667889537d0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 55fc15ce8272073b9b404762b83e3e7acee0111e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-20 01:28:02 +00:00
Morten Sørvig 9313c60cd9 wasm: fix compile error due to EM_BOOL type change
emsdk 3.1.62 changes the EM_BOOL type from int to  bool. We were
using int in two places in the wasm platform plugin.

Use EM_BOOL instead to stay compatible with emsdk editions earlier 
and and later than 3.1.62

Pick-to: 6.7
Change-Id: I837e76f869225859643dd5a98a28a1eefb5f14a4
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
(cherry picked from commit 48beca4e7635cf2031c6707042d623c4daf44778)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-19 19:42:55 +00:00
Marius Kittler a75b432c8a Fix QCommandLinkButton in Windows 11 style when darkmode is used
Fix polishing QCommandLinkButton in Windows 11 style: The condition
for QCommandLinkButton needs to be checked before the condition for
QAbstractButton; otherwise it is never entered and the colors from
the Vista style are used breaking darkmode.

Pick-to: 6.7
Change-Id: Ie9e1c20b38a52b2d72f28279e38deb533595b974
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit a17c34d2b7ef8391e5485d0ba06966ece793d184)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-18 21:57:52 +00:00
Christian Ehrlicher 19706de70e QPA/Windows: Avoid confusing warning about empty QPixmap
Fix the condition to really don't call scaledPixmap() on an empty
pixmap.
This amends db328ca975bc63f3baf3d021dcff1ea37fa6b6a0.

Pick-to: 6.7 6.5
Task-number: QTBUG-122755
Change-Id: I10470704fff162f699a936f7b61451c02e3bf4e9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c1d2de095e420315c626fc08d6d6a5e2a34a1870)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-16 17:34:29 +00:00
Christian Ehrlicher e7c7402802 SQL/ODBC: Fix calling SQLGetData() for old drivers
Some old drivers don't return SQL_NO_DATA when all data was fetched
which resulted in an infinite loop. The previous check does not work
when we receive chunked data and the driver returns fewer bytes than the
maximum buffer size.
Therefore simply check for SQL_SUCCESS since according the msdn docs,
SQL_SUCCESS_WITH_INFO must be returned when there is more data to fetch.
This also avoids an additional call to SQLGetData() here.

Pick-to: 6.7 6.5
Fixes: QTBUG-119753
Change-Id: I42ed194f3955a650e63615615fe82d785f324228
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-08-13 17:39:40 +02:00
Tor Arne Vestbø 75f798129a wasm: Only show resize border if direct parent window enables it
A top level window with a window frame will have the has-border class,
and hence a resize border, but child windows of that window shouldn't
have their own resize borders.

Ideally we wouldn't generate these non-client-area elements for child
windows, but changing that requires more work, as it involves creating
and destroying these elements on the fly if a window goes from being
a child window to a top level and vice versa.

Change-Id: I64ec27d87df952419284354b50420df8e48824d8
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 9322f80c3cde118aec803e6b2c86197b1b5dbb67)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-13 06:47:43 +00:00
Tor Arne Vestbø 7017dc6d37 wasm: Re-evaluate window flags when reparenting window
We apply CSS classes to the qt-window in setWindowFlags based on
whether it hasFrame(), hasBorder(), etc. Which in turn depends on
whether the window is a top level or child window.

As a QPlatformWindow may be created while a QWindow is top level,
and then reparented into another QPlatformWindow, we need to update
the window flags, and re-sync the CSS classes, as otherwise we end
up with child windows with shadows and tile bars.

Change-Id: Ibbb3d2230a880057053d7b12f93257d9b250aa6f
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit e6db07c4e7cca41a94dd787d9a4938abab7918ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-13 06:47:18 +00:00
Liang Qi 9f0c48c6b1 xcb: ignore bigger size window icon when size exceeds limit
In the absence of the BIG-REQUESTS extension, the maximum
request length is only 65535, with DPR=2, a 128*128 icon size
will be (128*2)^2 = 65536, which exceeds the maximum
request length.

See also the official doc for xcb_get_maximum_request_length.

https://xcb.freedesktop.org/manual/group__XCB__Core__API.html

uint32_t xcb_get_maximum_request_length(xcb_connection_t *c)

In the absence of the BIG-REQUESTS extension, returns the maximum
request length field from the connection setup data, which may be
as much as 65535. If the server supports BIG-REQUESTS, then the
maximum request length field from the reply to the BigRequestsEnable
request will be returned instead.

Note that this length is measured in four-byte units, making the
theoretical maximum lengths roughly 256kB without BIG-REQUESTS and
16GB with.

Fixes: QTBUG-127392
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Iee53f579802e8bc54ed1519bc5b5591b5e5700e1
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 0ed5d4d674c241f7affa3b87feb948c26e11d5cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-12 09:43:39 +00:00
Tor Arne Vestbø 1ccaae4c14 Android: Create QtWindow as initially hidden
QWindows are not visible when created, and require a setVisible(true)
call to be be shown. Android Views on the other hand are visible by
default.

This mismatch caused problems when a foreign window was parented into
a QWindow that was yet to be shown. If the foreign window child was shown,
it would show up on screen, due to its QtWindow parent, as well as the
parent window's QtWindow both being visible.

Technically this problem also applied to normal Qt child windows, but
because these windows rarely render unless isExposed() returns true
they would not show anything.

We now initialize QtWindow to being hidden on creation, and let QWindow
handle the order of when the window is made visible.

The QAndroidPlatformForeignWindow::setVisible code had to be adjusted,
as it doesn't call into the QAndroidPlatformWindow base class, where
we normally handle the visibility toggling of our QtWindow layout.

Change-Id: I3debba5f42609d687dc88f7f92c89055cfa6c5f1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6faf18aceb21a4c5e06d0dfe87b9fbaa037f80fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-08 01:10:01 +00:00
Tor Arne Vestbø c9dcb28824 Android: Don't set geometry when creating surface or adding native view
The window geometry has been propagated to the QtWindow layout already
via setGeometry() already, so we don't need the additional plumbing
for createSurface and setNativeView.

It's enough to set the layout params of the inserted View to match
the parent (the QtWindow in this case).

Change-Id: I40b44282e80ed04b109ffc1958144cb3e3edd11d
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9d398a18c24ab0a16ceb0346fc20b8eebf95410d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-08 01:10:01 +00:00
Tor Arne Vestbø 8a8df25f32 Android: Always apply initial geometry from QWindow to QtWindow
We shouldn't rely on the QWindow geometry being propagated through
other means, so we should always propagate the geometry when
initializing the QAndroidPlatformWindow.

Change-Id: I489b059ffae7a209005edaaff3674c1f39273bee
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 6e52d010535b87300bacd54c0c21fba7cc926eaa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-08 01:10:01 +00:00
Tor Arne Vestbø 555242e637 Android: Unconditionally set geometry when asked to via setGeometry
The geometry() of the platform window may match the incoming geometry
at the point of the call, but the native geometry of the Android layout
and view might not, so we still need to propagate it to the platform.

This matches what other platforms do in QPlatformWindow::setGeometry.

Change-Id: I5f04a323412ce2ce9561cace1f0cec461c133e28
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 02734b644e0ae566163da68dd51623943d41fb13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-08 01:10:00 +00:00
Tor Arne Vestbø 35f3ba214b Android: Remove unused member m_oldGeometry
The usage was removed in a02ea26b46.

Change-Id: I91ec688b7388ea62b2b69745747f83112eaae439
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 5edeaa0720c04cb619db92a98bdcc0401774d9df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-08 01:10:00 +00:00
Tor Arne Vestbø 10cf8c8fde Android: Simplify QAndroidPlatformWindow::setGeometry plumbing
Instead of splitting the geometry setting into setGeometry and
setNativeGeometry we can leave setGeometry to do the right choice
of whether to propagate the geometry to the QtWindow layout or not.

Change-Id: I30291dbf7079df76f4d3a54d6ea3c9c3f1329c90
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit b3e60c5acfaf809f376f66d6ab7f98ca644b0fce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-08 01:10:00 +00:00
Tor Arne Vestbø f8ae1a4ab1 Android: Remove m_surfaceCreated check from setNativeGeometry
As long as we have a QtWindow we should be able to set its layout
parameters. Adding surfaces or native views later on will adopt
the QtWindow's layout params.

Change-Id: I08591e18f95bfe1e85358bb68507145d35630486
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit 79ae28d9ace358c20c716ced0d0d9471b500e0cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-08 01:10:00 +00:00
Tor Arne Vestbø 913552ad0b Android: Create QtWindow before applying QWindow geometry during init
During QAndroidPlatformWindow::initialize() we call setGeometry, which
may end up in QAndroidPlatformWindow::setNativeGeometry() via one of
the QAndroidPlatformWindow subclasses, i.e. GL, Vulkan, or foreign
window.

We currently bail out from setNativeGeometry if !m_surfaceCreated,
but this is only a workaround for the m_nativeQtWindow not being
alive yet.

As long as we have a m_nativeQtWindow, we should be able to set the
layout parameters of that QtWindow, independently of whether it has
a QtSurface or is hosting a foreign Android view.

As a start, move the QtWindow initialization earlier in initialize().
The isEmbeddingContainer() check can go at the top, as we shouldn't
do any modifications to a window that's purely used to act as a
container when embedding Qt in native Android apps.

Change-Id: Ia3f0b33e6729f5399946d86799f39877d058511b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit e2ce1f724f56db8072033665d066ad34f4d4c702)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-08 01:10:00 +00:00
Tor Arne Vestbø b9022081b0 Android: Don't add QtEditText to foreign windows
We don't handle input on behalf of these windows, so we don't need
a QtEditText for them. Any Qt managed child QWindow added to a foreign
window will get its own QtEditText as normal.

Change-Id: I32daa83f22487aadca7509379595b6c82b29ea4a
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit eea00824bdbc6740261d2b78821e31c1f21c9c0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-08 01:10:00 +00:00
Tor Arne Vestbø c45da998ad Android: Initialize window in QPlatformWindow::initialize() override
During the QAndroidPlatformWindow constructor we can't safely call
virtual functions of QPlatformWindow and expect them to resolve to
subclasses, e.g. QAndroidPlatformForeignWindow. Importantly, this
means we can't check isForeignWindow() during construction.

QPlatformWindow has a dedicated initialization function for this
use-case, so use that instead.

The existing order of between QAndroidPlatformForeignWindow and
QAndroidPlatformWindow has been kept as is.

Change-Id: I2a08326fae6a3b079cd153c50a13794310ac3d74
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 7150c79d0ee10d6aca330e6a0862b0fbfec071fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-08 01:10:00 +00:00