Debugging output printed the return value of event->isAccepted() without
information what the value represents.
Add it.
Pick-to: 6.8.0
Change-Id: Ifbef69fed5d4aadd732c234c2ac74495560e65b6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 5d028371bd8d775703739db51936cbd582626580)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The correct link should be QRhiResourceUpdateBatch::release(), not
QRhiResourceUpdateBatch::destroy().
Fixes: QTBUG-127111
Pick-to: 6.7
Change-Id: Iec370f5f4b2c9cc74f8ff96b8d5a027be79e8817
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 93136f7c55e545598a10e617f4951094bdbca9ff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Which also lets it return the acceptance state of the event.
At the moment the acceptance state of QContextMenuEvent is a bit
of a mess, so the QWSI acceptance state can't be trusted, but
this opens up the door to using it at a later point.
Task-number: QTBUG-67331
Change-Id: I75b586f90e25122bc9e25880d3787740b025c892
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit bbc3a7d7ba683c71de4662a1eeac0b7d3dfa6b11)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A recent bugfix introduced a shortcut in text layouting, skipping all
layout when the cliprect parameter is empty, since all will be clipped
away anyway. However, the case when the DontClip flag is set was
overlooked. This commit rectifies that.
This commit modifies c7df8dda8b60b4e4e7b1859f462d65cef5d8c85b
Fixes: QTBUG-129914
Change-Id: Ief44acdd08e5e5f5491241362aacfcd2083f011d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit b587e7143d7f1eeb6686b52727fbb9d7db6a820c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... pinning the vtables to a single TU each, instead of duplicating
them for every user.
Task-number: QTBUG-45582
Change-Id: I3b7bce14567dc8be89795a48f6871eb24fe908aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
(cherry picked from commit 2e2f5093912faf612f0be72289180b167d6326a7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the font database is invalidated, we need to release all
references to populated fonts and clear the lists, so that they
can be repopulated from scratch. This was not really measurable
as long as the contents of the database did not change, but it
was a possible source of errors.
Task-number: QTBUG-129849
Change-Id: Ic7ed4abcb13f13332e8edb77e2039f08da9660fd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 2ea099b67943634a06bce642e13062f84de7e3be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In ec38f0002d, we introduced a guard
for automatically releasing references to DirectWrite types to plug
a small leak. Unfortunately, this change removed a call to Release()
without putting the pointer inside a guard, hence it introduced
another leak. This was noticeable if the font database was invalidated
and repopulated multiple times.
[ChangeLog][Windows] Fixed a memory leak when repopulating the
DirectWrite font database.
Task-number: QTBUG-129849
Change-Id: I59e3132b6836501b7756679ffac82fb65e3027cb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 247cd80abdd5fc0bc6243581e506354a5509518e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The DirectWrite engine had hardcoded a default font instead of checking
the system settings for this.
Usually this will not matter, since the theme will call
QWindowsFontDatabase::systemDefaultFont() to get the default, but when
this code path is disabled by setting
QGuiApplication::desktopSettingsAware to false, the defaultFont()
function is called. With DirectWrite we would always return a Segoe UI
font of size 16 in this case.
The other databases respect the system settings for the default font,
even when desktopSettingsAware is set to false, so this is the expected
behavior. It is also what the GDI font database does, so this change
will appear as a regression for users upgrading.
[ChangeLog][Windows] Fixed a regression where the default font on
Windows would be larger than before if desktopSettingsAware had been set
to false.
Fixes: QTBUG-129832
Change-Id: I959e7a52680678a6ab767b49ee643fade5e7209a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b09fb51e7bb576137f92d4697f9f812f3dcb2b7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Qt has had a qHash() overload for (also scoped) enums since Qt 6.5
(fb4bc5fa26). Since the hashed type is
internal to the qicc.cpp TU, it doesn't matter whether we change the
result of the hash calculation (but this author assumes we don't).
Pick-to: 6.5
Change-Id: I58238cc13113157438be0951c471f654a838b608
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
(cherry picked from commit 4f5b48d4c69527e5f2450694219432e84b2af6df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can not use the same blend routines for ARGB32 as we use for
ARGB32PM. It needs to blend transparent colors differently.
Pick-to: 6.5
Fixes: QTBUG-91262
Change-Id: I6b75fa8096b92452655dcad94478ae2a74415939
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit bb854606ec8f95787dfd2a4d1b6bcaddbcf4d042)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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>
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>
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>
Both APFS and HFS+ can be both case-sensitive and case-insensitive
(the default), and the mounted file system may be any other file
system than these two as well, so hard-coding to case-sensitive
is not sufficient.
Task-number: QTBUG-28246
Task-number: QTBUG-31103
Change-Id: Ibdb902df3f169b016a519f67ad5a79e6afb6aae3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3d08816f4c4245f08a53307775fe3c4ed31a7a32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Check the QPixelFormat instead of relying on an easily outdated list of
formats.
Change-Id: I076391ac22bc9d4e70e53232c529d09d7aab13b9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit fdc29cf057e7e2ec095405ff2b07bc082b0d4cdf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QWindowPrivate::forwardToPopup() sends key events with
QCoreApplication::sendEvent(), which sets QEvent::m_spont to false.
That makes key and pointer events sent to popups appear synthetic,
while they are sponaneous if sent to other widgets.
The method has been newly implemented in the course of moving
popup handling from QApplication to QGuiApplication.
Make current behavior consistent to the behavior prior to
e4ef0f03e6.
Since events are always spontaneous, use
QCoreApplication::sendSpontaneousEvent() instead.
Add a test function to tst_QComboBox to Verify, that key events
- are sent directly to the popup
- not seen by the window
- appear as spontaneous.
This amends e4ef0f03e6.
Fixes: QTBUG-129258
Pick-to: 6.8.0
Change-Id: Iff61b98b290f6483948007b5f12b19393759d9db
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3fbae61ea245291cb4c34e9126562c307741a600)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the new `\qtcmaketargetitem` QDoc command to specify the correct
`target_link_libraries` item for items that belong to the new module.
Fixes: QTBUG-121855
Fixes: QTBUG-125994
Change-Id: I76a6ab749fdb349cc014f40bc7e548a0344bc50d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 9a9f5009006e03849242211d831a900e30c39fc8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Use "qt.text.font.db" logging category to print OpenType related
warnings during loading a font engine. Also, as a drive-by change,
use qUtf16Printable() to avoid unneeded allocations.
Task-number: QTBUG-129092
Change-Id: If603aa1251c0073aec7bb0ba75d3e5e9e0385ac1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 0c7a89f55e216d1f679fedf17f6d014ca722f735)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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)
If there are a lot of shortcuts in the map, the old code
caused the QKeySequence to be copied, which caused notable
delays.
Change-Id: Ia84e02f453301e046bd834b3d670a78c05c5db07
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cc5a8689c162ee46a0d488d3d0cb40737905ff6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As the QGuiApplication::desktopFileName doc [1] says:
> This is the file name, without the full path or the
> trailing ".desktop" extension of the desktop entry that
> represents this application according to the freedesktop
> desktop entry specification.
Since the desktop entry represents the application, also
use the desktop file name for the accessible ID of the
application object.
This e.g. makes Okular's application object report an
accessible ID of "org.kde.okular" instead of just "QApplication"
as the AT-SPI2 AccessibleId property on Linux.
[1] https://doc.qt.io/qt-6/qguiapplication.html#desktopFileName-prop
Change-Id: I554da7baaf817866db9044128f73a9ea634cddbf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 13b4075093866a497e620bdd388afaf8aa0bc962)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 2e711e47e0fedd636af2116c56622cc7be958808.
After closer investigation, it turns out that menus in Quick before 6.8
does infact forward pointer events outside the popup to the item under
the mouse. Only if the popup is modal will this be blocked. So blocking
this from QGuiApplication will cause a difference between Popup.Item and
Popup.Window, and needs more investigation.
Change-Id: I7d21258cb8fafd7380786fed0d6370e0a9090188
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Initialize the variables outside the loop to avoid repeating it on every
iteration.
Fixes: QTBUG-128667
Change-Id: I8e2ed0e40bdc4d687060df72f1d45e940e56df98
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 0819f128c5206d5712acce2e86e9eb5d9ba13182)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Call sites of qt_mac_toQColor may not necessarily check the NSColor
for nil before passing it to qt_mac_toQColor, as seen for example
in the QCocoaColorPicker implementation.
Without an explicit nil check we ended up returning a valid QColor
with all color components set to 0.
Pick-to: 6.7
Change-Id: I0cc36049fca05a6b668c0c610bc40eedbc72df3a
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 271bfe4a5405309dc8d48807d6f28d174efb2cc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a popup is visible, we're not supposed to send pointer events
to other windows than the popup. It doesn't matter if the popup
doesn't want it. But currently we end up doing so anyway, which
mean that we would trigger items elsewhere in the UI.
This patch will instead make sure that always return from
processMouseEvent() after sending, or forwarding, it to the
active popup.
Note: some styles in Controls (e.g macOS) has a menu window that
is actually substantially bigger than what it appears like on
screen (to make room for a drop-shadow). This means that a mouse
press can happen outside the visual borders of the menu, but still
inside the popup window that contains it. And this is also a
reason why some bugs related to forwarding of mouse events only
surfaced on some platforms (Ubuntu), but not on others (macOS).
E.g for a Menu in a MenuBar, the menu window on macOS would actually
be placed on top of the MenuBar and block pointer events from reaching
it (because of the menu shadow). While on Ubuntu, since the menu has no
shadow, the press would instead trigger the MenuItem in the MenuBar.
But by never forwarding pointer events to windows other than the
active popup, such differences will never happen.
Note: we should actually forward pointer events to the window under
the mouse if QPlatformIntegration::ReplayMousePressOutsidePopup is
set (and WA_NoMouseReplay is not set). But this API is currently not
reimplemented after QGuiApplication was refactored to support popup
windows also in Qt Quick. And ReplayMousePressOutsidePopup seems to
be false on all platforms other than Windows.
Change-Id: I55692cf2cae4c8f9e46976b105660bca96bd65e6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit fc9af570507bf067a182ab3f1c2f51a29f59e38c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For QRhi this has been done not so long ago, but it seems the individual
classes, for example, QRhiTexture suffer from the same: the genereated
docs list the forwarding header, that does not exist.
Fixes: QTBUG-128548
Change-Id: I6a58caf45fa9bbfdb5b91311d7484c0954ad63e1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 35791751a21f709d00726fb495bebc707f90a166)
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
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>
Strictly speaking, the problem has nothing to do with QRhi. What is
special with the eglfs' backingstore is that it creates a QRhiTexture
and then pulls out the OpenGL texture ID via nativeTexture() right
afterwards.
In this setup there is nothing that would ensure glTexParameteri is
called to override the silly default of OpenGL. Normally this cannot
happen because once the QRhiTexture is used for sampling purposes
together with a QRhiSampler, all necessary state gets updated.
Starting from Qt 6.4, with the QRhi-based backingstore composition
changes, the special case where we create QRhiTextures just to get the
underlying OpenGL texture got introduced.
Ideally the eglfs side should provide its in MIN/MAG filter state, but
in the meantime, to be more robust, always set a MIN filter already in
QRhiTexture::create(). For most textures this will get changed
afterwards.
Change-Id: I305cdbb5576b977887b85a15b72455bb3ae430c4
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-123551
Reviewed-by: Karim Pinter <karim.pinter@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 88aa5250d58900653192c45e41f182ec88474e38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QUuid is a) trivially copyable, b) ≤ 16 bytes, so as per [1] should be
passed by value. Clazy, indeed, complains, so fix it.
Found in API-review.
Amends 2fbece8a73cb2d2692c78c38e1576c0c9c62fce7.
[1] https://www.macieira.org/blog/2012/02/the-value-of-passing-by-value/
Change-Id: I321ebd650dac8e58c173d957259c3700b1f59ace
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7550f0e2c1a4ca10a0e4604e2d429b98481d4e2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On some platforms (Windows and macOS) it has been observed that the
platform layer removes all screens, without providing a dummy screen.
This results in QGuiApplication::screens() being empty. As updating
the cached DPR for a window is part of the window moving to a new
screen, we have to guard for the case where the window moves to
a nullptr screen (because QGuiApplication::primaryScreen() is now
null).
We use the QGuiApplication::devicePixelRatio() fallback path, which
returns 1.0 if there are no screens.
Fixes: QTBUG-128390
Pick-to: 6.7
Change-Id: I3ba20590047f1ef49c8d3ac5b7556b814a105ce4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fbf957de5feded9cbbd60feacaa08c9902815c38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make the behavior more bounded, by disallowing keeping large sets of
buffer data for reuse.
The idea being that once I uploaded say the Sponza model (e.g. 10 MB of
vertex data merged into one blob), it is not beneficial to keep that
huge allocation since the total size of the data from per-frame buffer
changes will be in a whole different (smaller) league typically, and the
chance of another (single) buffer update that utilizes the whole 10 MB
on its own is rather small.
Have a simple (and cheap to execute) rule that no batch keeps more than
1 MB of QRhiBufferData (in total, regardless how many buffer operations
it contained/contains). If the limit is exceeded, we clear().
The catch is that even without doing the 1 MB check, there is a high
chance that the Sponza model data will be gone in a few frames
eventually, due to implicit sharing and how the QRhi backends and Qt
Quick(3D) work and shuffle their resource update batch requests and
submissions. So for many applications this is expected to change nothing
when it comes to their memory consumption profile.
Expand the comments further.
Change-Id: I93061d073b43e747a0772a3119ebdb89bed02ae0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit bc2c09a182c2bc80c307e7e71e0f12c1c31edc3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of speculating about resource update batch pools, have a
toggleable debug message that shows exactly what one needs to know. Set
qt.rhi.rub to true to enable. Note that it is not a qCDebug since we do
not want isEnabled() checks no matter how cheap on hot code paths.
Rather, the state of the category is checked just once on
QRhi::create(). As we want some output from QRhiBufferData too, this is
static (setting the bool flag may not be entirely thread safe
technically but we can live with it).
In addition, harden size() and constData() in QRhiBufferData, although
these d != null checks are a waste of time with the current
implementation, but be safe.
Remove the unused QT_RHI_MINIMIZE_POOLS environment variable. This is
forgotten completely by now and serves no practical purpose. Those who
want a proper release of all pools should call releaseCachedResources()
(i.e. QQuickWindow::releaseResources()).
Expand the comments as well.
Change-Id: I4942cf7c3f2ecff47991e42e14c61b432f232170
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit cbab56fdcbff6965d2aafd0c00eebacb7809ceba)
Since QGenericUnixServices does not derive from QObject, the connection
to QDBusPendingCallWatcher made in the ctor might outlive the lifetime
of QGenericUnixServices.
Fix it by explicitly disconnecting it in the dtor.
Fixes: QTBUG-125239
Pick-to: 6.7 6.5
Change-Id: I5fac4fd5831b2dde16b3d7b479a8ee616bfb7e3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit de609d84b9cee4a481d1718c00b09105d8c2ae69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With the introduction of QQuickPopupWindow in 6.8, much of our popup
management had to be moved from QApplication to QGuiApplication.
Most of this was done in e4ef0f03e6, but
closing popups on window deactivation and orientation changes, were
left in QApplication. This code path was used to close popups when the
user clicks outside of a window, on platforms suchs as wayland, were
QWindow::setMouseGrabEnabled(true) doesn't work properly.
As it turns out QApplication::notify() never calls
QGuiapplication::notify(), which is why I'm duplicating the code from
QApplication into QGuiApplication, instead of simply moving it.
Task-number: QTBUG-121363
Change-Id: I36bebd029a2f8e3ec0cdbab40971682cf948d438
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 914c2ef4fb926c16e8874c9c3691401f7e22ae22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These all cannot fail, so can and should be noexcept. Most were
already.
Found in API-review.
[ChangeLog][QtCore/QtGui] All qFuzzyCompare() and qFuzzyIsNull()
overloads are now noexcept.
Change-Id: I67a2981ea4af9be0370becf84103822fd766ab5e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6a3a28236c6a0c34d37a614ca4e68ccd136d90e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a window is positioned with setFramePosition, we reflect that to
the platform window via QPlatformWindow::setGeometry(), but with the
QWindowPrivate::positionPolicy set to WindowFrameInclusive. On the
platform side the position policy is read from QWindowPrivate to
determine how to interpret the incoming geometry.
When the resulting geometry is applied to the native window,
it's reflected through QPlatformWindow::geometry() and reported
back via QWSI::handleGeometryChange() as client geometry, ie.
without the frame margins.
If the platform layer later interprets this geometry in
combination with the window's positionPolicy, it will incorrectly
position the frame top left at the point of the client geometry's
top left.
It would make sense to reset the window's positionPolicy at
the point of QGuiApplicationPrivate::processGeometryChangeEvent,
but doing so might break situations where there's another in
flight geometry request.
What we can do as a first step is reset the positionPolicy when
the platform window is destroyed. This ensures that the next
time the platform window is created it will be placed at the
same position, even if the initial position was requested via
the setFramePosition() API.
Change-Id: Ic555f19884ccd68c46421d0fe666717170ba7638
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 11a09a9bd0a7e899a918b078a94c6c3b82240dee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QDoc command `\tableofcontents` was rendered useless by a change
more than a decade ago. Remove the use of `\tableofcontents` as it
serves no purpose, and ensure that the surrounding context still makes
sense for the reader, by removing preceding text that refers to a
non-existing table of contents, such as `Contents:`.
Task-number: QTBUG-128173
Change-Id: Ibb5a6af0e80f70fa487cdf6a7e38009a9ef60cbf
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit cd8244131e2d6fe2c2453ae40213e7f12bff893d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Provide VxWorks-specific implementation of keyboard and mouse device
discovery, and enable usage of evdev on this platform.
Task-number: QTBUG-115777
Change-Id: I9370ac085aa58c72e2d39731b78ebd854f5aad9a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
With Qt6.8 QIcon::pixmap() no longer scales the size by the devicePixelRatio passed to QIconEngine::scaledPixmap(). This means that external icon engines now must be adjusted to honor this change.
[ChangeLog][Important Behavior Change] QIcon::pixmap() is fixed to no longer scale the size, passed to QIconEngine::scaledPixmap(), by the devicePixelRatio.
Change-Id: Ic93e10a81cd58fba4580c3f1522cc27e2b05cea5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ecc13e3d41af89bd195e6f173b2c96d2295f407e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the list view of a QCompleter is visible, it receives mouse events.
A mouse press event outside the completer hid it.
If a virtual keyboard was active, it did not receive mouse press/release
events in case the completer's list view was active.
Add a helper to QGuiApplicationPrivate, that detects a virtual keyboard
under a mouse event position, and forwards the event if needed.
Adapt QCompleter::eventFilter() to use the helper.
If a virtual keyboard one exists and a mouse press event occurs inside
it, don't hide the completer and forward the event.
Add handling of mouse release events, and also forward them to the
virtual keyboard, using the helper.
Add logging.
Fixes: QTBUG-126752
Pick-to: 6.7 6.5 6.2
Change-Id: I613523a9c83b319810397770c43b2eb4ae01c31a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 93ce8f13fc8042eac976a3c911af7d7664e8d5dc)
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
gcc version 13.2.0 (Ubuntu 13.2.0-23ubuntu4) seems to remove some
code in release builds that is embedded in a macro in qtransfrom.cpp.
This patch changes the macro into a function such that it is not
removed by gcc.
It seems like the switch statement is (wrongly) optimized away if it is
embedded in the QTransform::map(QPolygonF) overload. nx and ny are
always 0 (as initialized by QPolygonF) after the macro (but only within
the QTransform::map(QPolygonF) function.
The bug happens only in a release build. Added debug messages of nx and
ny created no output, adding qDebug() << t, which made the macro work.
It seems that a complex combination of macro and switch statement can
tigger the bug in gcc. So rewriting the macro as a function works around
the bug.
Fixes: QTBUG-127723
Change-Id: I7e0b02cde276e591cf773f4e18dd505134421957
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 11b70b66de627d3bd0ef4193d5cfa624c88ac96a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>