This is hot code, run early in the application's life, usually as a
result of the first qDebug() because QLoggingRegistry wants to find
qtlogging.ini. So let's not use QFileInfo, which allocates memory, just
to do string manipulation. These are always filesystem paths.
See commit d59e640c868f3db2d661970f3d34a22013d49053 for a similar change
in findConfiguration().
Change-Id: I012daf4a3aa2ebc2c5abfffd2ef7ceac1df2626d
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c74cba1117355a6312b1f0cc815efa4cdea4bbfa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3d43223448b4d5c1828501de4ec23edb2edc64d7)
This commit adds a new parameter (--pre-test-adb-command) to
AndroidTestRunner. The new parameter allows to pass an extra adb command
which will be called by AndroidTestRunner after installation and before
running the test.
To set the mentioned argument the new parameter for qt_internal_add_test
was proposed: ANDROID_TESTRUNNER_PRE_TEST_ADB_COMMANDS.
The new parameter is needed especially for multimedia screen capture
tests. ScreenCapture feature needs an acceptation of Security Popup. It
can be automatically accepted with additional adb command.
Fixes: QTBUG-132249
Change-Id: Ib70cd05d60d4594961ca68b554c7aae11cf42240
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit b4c82eba03388aa4f9e5b56f633e0e679a3b0123)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit bc533b0fb2d50a8e124e5e54628ad847733a8de8)
Reviewed-by: Bartlomiej Moskal <bartlomiej.moskal@qt.io>
Previously we had complicated logic trying to differentiate between Qt
targets, system libraries, vendored libraries, custom sbom targets,
whether they are in external documents or not, when generating SBOM
dependencies for a target.
We also lacked the ability to handle regular non-Qt non-system
libraries. This was discovered while creating the SBOM for Qt Creator,
where the code treated all Creator helper libraries as system
libraries rather than just regular dependencies.
Simplify the code by unifying most of the code branches, removing
nested ifs, and removing special handling of some targets when
checking whether they are in external documents.
Now system libraries are marked at qt_find_package time by setting the
_qt_internal_sbom_is_system_library property on the target, rather
than trying to infer it base on the target name and other markers.
Now the logic goes as follows:
- check if system library based on the presence of the
_qt_internal_sbom_is_system_library property
- check if it's a vendored lib based on walking its libs and checking
if the _qt_module_is_3rdparty_library property is set
- mark system libraries as consumed
- if not a system library, handle it as a regular dependency, taking
into account if it's external or not
Also add some debug messages to help keep track of system libraries.
And remove some of the unnecessary code in
in _qt_internal_sbom_is_external_target_dependency and
_qt_internal_sbom_add_external_target_dependency.
Task-number: QTBUG-122899
Change-Id: Ic43fe53446b74badee2cde6d18146e952587c292
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 66261ac0f1f2807916c80b2050536d52b8fe6d3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b91da6c94348b3225bd0a43141f34ec4e5e1f216)
The SBOM functions so far had a lot of Qt-specific logic inside them.
Decouple this logic into separate Qt-specific functions or explicitly
guard the code with Qt-specific handling options, to prepare for a
cleaner SBOM public API.
The generic functions then call the Qt-specific ones if various
internal options are set.
This approach is used, rather than directly passing values to the
generic functions because:
- we have cases where we need to recursively pass the values all the
way down to all recursively created attribution targets
- some of the logic needs to know about values before and after qt
processing, and this could be achieved with something like lambdas
but it's not worth the complexity
Task-number: QTBUG-122899
Change-Id: I4399c41f4d976f20b16a0bb0c674d4f07ee1ccd4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit f1ac316191c010b1389f6f3549c9f0b4424b9936)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 59a571c75dbbe3cd425629ad309bdf143f0616de)
For build time sboms to be found in a no-prefix qt build of a repo,
specifically when finding external sbom documents, the build time
sboms have to be in the same location.
Previously they were in each repo's build dir.
Align the location to be in the qtbase build dir, just like for super
builds.
Also check for QT_BUILDING_QT because we don't want to apply the logic
for QT_WILL_INSTALL not being set in user projects.
Task-number: QTBUG-122899
Change-Id: I04a066fc0efc91a4f2ee938c190b8632c8c946aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 3a5c62d4af9cb07fba065de8a2d1b97531b6fd30)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 90b128e4cc7be623c67bd02128bf82a26efe2b57)
tst_QGestureRecognizer::swipeGesture() is flaky as sometimes the
gesture event is being sent before the widget's position has
been updated.
The gesture starts in the window frame.
Set flag Qt::FramelessWindowFrame to prevent this from
happening.
Fix flakiness on Opensuse 15
Change-Id: I794b022b5a51146ddfa7d6029509c6fa43b9aad6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 6dc0e593939cbeaeb45392d8daf7fcd90e8cb0f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 829b67074e2d1523ec9730fc76e31f41c416ad87)
tst_QGestureRecognizer::panGesture() is flaky as sometimes
the gesture event is being sent outside of the parent. It
is being sent in the window frame instead of in the widget.
Fix position of the parent and verify that it is correct.
Fix flakiness on Opensuse 15
Change-Id: I00eacb80a7e2e658345d3bc56cdef0c0024d1a1d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 3766b9cb3cb49fdef626526181b6a7fe26870e29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 69738c76b49dc2f6ce77d9db0fbcb08eed7ecff9)
QStringViews should be passed by value, not cref, so sane ABIs pass it
in registers instead of forcing the variable to the stack.
As a drive-by, s/QVector/QList/ in the return type.
Amends 51e2a64ed9.
Pick-to: 6.5
Change-Id: I6b51dfda87643f6c7ec219ac4a8970537bb6b2ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8113a50d71cb9ea320e69c2b10452972e3310f4d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 76c50ca1674eecca230d4bff9001fc952cc20b3b)
QAnyStringView is designed to replace overload sets containing QString
and QChar, among others, so it needs to accept types that merely
implicitly convert to QString and QChar. It achieves this by
maintaining a hidden container to hold the converted QString or QChar
for the duration of the full-expression, much like the compiler would
do if the function took QString/QChar.
This patch adds a check for the single-char ctors to determine whether
they convert or not, by comparing QASV::data() to the address of the
QASV's argument. While it would be interesting to have the same test
for QString, that is outside the scope of this patch.
Task-number: QTBUG-126054
Pick-to: 6.5 6.2
Change-Id: I30ac2d1199da5a03fe6fee4c9d5ea2a209a003d6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit f31c37a1312fc4e21a58906e2b883099629fb9e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 18b56bbae2cb1e775b5155f8fc019081780a9867)
Amends commit 6708107873 from 6.8, which
removed qloggingregistry.cpp from the bootstrap library build.
Change-Id: I3bb5609707478df771b8fffd3e71eb889eaac53f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 696e11ec729452d246e736e54790411b408f9c3c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 00caa645ff064d9c26e70699b9f14c62172b71c9)
After the commit 28df9a49776a88cb1a8e69348ae19a59b16a5b7e, a regression
occurred in the positioning of cursorHandle and EditPopup.
Previously, these positions were calculated using QtEditText
coordinates, which worked correctly because the QtEditText size matched
the QtWindow size. However, after the mentioned commit, the QtEditText
size no longer reflects the window size. In this case, we need to use
the parent View for calculations.
This adjustment was already made for the single cursorHandle.
This commit also updates the positioning of selection handles and the EditPopup.
Fixes: QTBUG-132589
Change-Id: I861292e363452d487284e3f603fe03a21a334aa4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 5bd26fda7a3f0a509a64847b58b916830ebc2d0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 941434e81fe073d55607267ea839025282413900)
ReadOnly was used in places where ReadWrite was the correct value.
Change-Id: I26a2f0de55665ac015fe269e8e5f0d23a2f00e5f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 4dcff4ed6d24e6aa061e145bb9de9ff93351a2b1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a8fe95f0eab7facc274327a54ca88d4b139eb385)
tst_QGestureRecognizer::panGesture() is flaky as sometimes the gesture
event is being sent before the frame and position has had time to
update. The event then starts in the frame and is not received by the
widget.
Set FramelessWindowHint flag to the widget, to remove the need of
updating its frame position and position.
Fix flakiness on Opensuse 15
Pick-to: 6.5
Change-Id: Id88510a91e3ed0d5ff92fdc31422503744448b3e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit fc0e788d029beac251fda40650154fc6865e1649)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ea55328741c6a1aceb7b1a456c00d976be940a42)
The format of the Xcode preferences has changed, so we need to account
for the new format when looking up the default development team.
The account identifier (previously an email address) was not used by
any consumers of the provisioningTeams() function, so it was left out.
Pick-to: 6.5
Change-Id: I81a400000615594336e14c95db86ffa71a5c5ff9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 380a9fdc872e14e537f3e148c7a1e72be5face2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 761d516fd4ee10fe943a54743795a91c1d9d3acc)
The format of the Xcode preferences has changed, so we need to account
for the new format when looking up the default development team.
Pick-to: 6.5
Change-Id: Ib34c2e5245c13db4d81218a5a2460417e4fc6347
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 469e4237cf32d27609661132727555490086750b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8f837f6e6f4a9d5c118514dcc80894406e9b5dcb)
As well as the _qt_internal_apple_development_team_id_computed
property.
It's used for macOS as well, so use `apple` infix instead of `ios`.
Pick-to: 6.5
Change-Id: I7932166d094a14ac32cce95e6c9fcbfa44bb97b4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit d688c73e083cecc9b9478f09b202b66b92c87e4d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6a23dfba362e683f94a34d0b7f5e2bfa6002370f)
On MSVC the values stored end up as negative.
Conflicts resolved in cherry-pick:
- The emoji-data code didn't exist in this branch
Task-number: QTBUG-132902
Pick-to: 6.5
Change-Id: I963c57c34479041911c1364a1100d04998bdfaed
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 62685375a2d71fa34015faac76f03e709e4217c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 09b06a740dd5e2ea08b49f76a2c384e6eb6fa6c6)
On 150% DPI scaling, the Radio/Checkbox indicators were clipped. This
patch adds an extra margin to the left to avoid this clipping.
Fixes: QTBUG-133117
Change-Id: I2e0186cbdad12481922de5ddf00f50daeb94bb37
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 3d45d22b536cd5fa074f6de4d02b1fd049e6b220)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9f7437fb858cc69fcd50b32809e9bd83355d0947)
Insert line breaks in the content the \tab macro expands to. This
produces nicer-looking html and also fixes an issue related to
the post-processing done to the generated files.
Fixes: QTWEBSITE-1202
Change-Id: If4e7f7242f8687ef84ad715744653c4167cf907f
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
(cherry picked from commit 88e4e952d73db9bc442593a96c88ca22ba7ab673)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f490b4de058d7fa91b42cf48524131b965524177)
It was using int for two flag columns; we can pass the relevant flag
types now, and we get better type-checking by doing so. Expand the
integral numeric column from int to qlonglong, since that's the type
we actually end up with by the time we're asking QLocale to do our
formatting for us. Add test-cases for things we've lately noticed
aren't right, notably including the min-qlonglong test (which passes
because compilers handle the UB straightforwardly), that needed the
integral numeric column's expansion. Sign-handling for negative values
in hex fails; a later commit shall fix and remove the QEXPECT_FAIL().
Pick-to: 6.5 5.15
Task-number: QTBUG-133269
Change-Id: I39c5339b144b40a30886d8253fa464828ed87629
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 5a230596c8c1f63e662ce17e094e2ae187066d6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 055b5a83b4b1fa224b075cbc35490e8e2db2225c)
Having the input field length too wide causes the view to scroll
to contain it. Since it is not visible, setting it to 1px width and
height should work.
Further, input field contents where set on the showInputPanel
call. At this point in time we do not necessarily have an updated
focus object. Hence the input contents is now set on the
setFocusObject call.
Ignore input on showInputPanel/hideInputPanel. This reflects
the current design where showInputPanel do not act unless
inputMethodAccepted(), and hideInputPanel do not act if
m_focusObject.
Still hideInputPanel used to set m_usingTextInput to false,
this behavior is not kept.
Fixes: QTBUG-132057
Change-Id: I2d7088def8060df267c5da9e045824decd913faa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 7dd94d74e4497647ff62c85460643487baf372bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 43eb0dbd38e74158e7eb36a28cb416b357445d6b)
When rendering hinted text on Windows with DirectWrite, the goal was
to keep the rendering and metrics as close to GDI as possible,
minimizing the impact of changing the default font backend.
Therefore, the DWRITE_RENDERING_MODE_GDI_CLASSIC was always preferred
when hinting was on.
However, DWRITE_RENDERING_MODE_GDI_CLASSIC only applies antialiasing
in the horizontal direction, but GDI applies vertical antialiasing
as well. The result is that text will look more aliased with
DirectWrite than it did with GDI, which arguably looks ugly
especially at large sizes and can be perceived as a regression.
Microsoft documentation recommends using symmetric antialiasing
when the pixel size exceeds 16, so this patch enables
DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC for fonts larger than
16px regardless of whether hinting is on.
It's worth noting that for fonts with heavy hinting, such as
Times New Roman, the rendering using
DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC is different from
GDI, although more similar to Freetype. However, the impact
of not having vertical antialiasing is worse and as native apps
are moving towards using DirectWrite, the GDI rendering is not
going to be the definition of a "native" look anymore.
A second thing to note in this patch is that we always pass in false
for the useGdiNatural argument in GetGdiCompatibleGlyphMetrics().
According to the documentation, we should be passing in true for text
rendered with CLEARTYPE_NATURAL_QUALITY. However, doing this causes
wider kerning in certain cases. Since the tighter kerning matches
the layouts we get in native apps, as well as when using Freetype,
I've chosen to pass false for now, to be consistent.
This change also adds a manual test which can be used to switch
between DirectWrite, GDI and Freetype rendering on Windows, so
that it's easy to compare.
[ChangeLog][Windows] Improved hinted text rendering at font sizes
larger than 16px.
Fixes: QTBUG-131946
Change-Id: Iebbe5c7affe7df6266ade6b161c31bde3d2caa84
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 407a98d94fb05780f30e77463fb2bd535041a044)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e59362678880cf89a2e7870365a030f0b9c254a7)
Like QGuiApplication does as well. Also add a note that screen and
window DPR can be different.
Change-Id: I1a24cf7f11e945187da9dce4421039350e811997
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 97049278443860d3dd1b1efd20d1f7dabaf72a35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 281c45452b93b38d50b4c43a743017c5a1aa7cd1)
Reviewed-by: David Redondo <qt@david-redondo.de>
We look it up with a binary search, so it needs to be sorted.
Pick-to: 6.5
Change-Id: I0aa25e6ff9722372c0a09f2dce9f9c839fedf00e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 382a7d006b52faa08b84e56d97cc6c216925a43e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 00ddc174b49ef4ed0e2384a2377df55d9201ad9f)
isActive() may return true if a (transient) parent window
is active (has focus).
Compare against QGuiApplication::focusWindow() instead.
Fixes: QTBUG-129233
Change-Id: I834a5814a5db161bdea2ba3524d1010e0c0e3e6e
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
(cherry picked from commit 31762e2e704673057a292ac59977b501919f2450)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 55148eb94d314187986492214415e0f0472bbb26)
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
A project might want to find_package all available (installed) Qt CMake
packages that contain qt modules.
A use case might be a qml app that needs to link to all of Qt, and
support showing qml files that can load any Qt qml module.
Add a new Qt6 COMPONENT called ALL_QT_MODULES.
It can be used like this:
find_package(Qt6 COMPONENTS ALL_QT_MODULES).
The implementation will find all installed Qt modules by globbing over
all json files installed in $qt/modules dir, and treat the file names
as package names.
It will then tell Qt6 to find_package each of those packages.
Change-Id: I89242307438576a0cbb3cdca80a9cb72818b6035
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit c7027880aa746a01362ac12491910479d7fc67e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 54cb92d58b33a7a8cc387bc84643e5d55e84b88c)
- The docs were restructured in v. 13.0 and 14.0, so most headings
changed, some topics were removed and lots of topics were added
- Use the macro \QC
- Fix the broken links in qtbase
Fixes: QTBUG-132516
Change-Id: Ic173a3e9a1c80322162c3feb277098de2a9f1cc6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 7419c9f77c0b56cc98d5b44f1fd89da6bca8b148)
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
memcpy() takes void*, not char*, so the cast from QChar* to char* is
not necessary (and potentially harmful).
Amends the start of the public history.
Pick-to: 6.5
Change-Id: I7b7178290bd30d93ed9e64b6b84294d0f7576c80
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 7206f6a39d298ed9c94bccf7bdc57498fa73ac36)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 0e5e850691250144eb9bd5a3f88c7e2f3264e940)
The test is flaky every now and then on the CI, so increase the timeout from
5s to 20s (a previous TRY_VERIFY precheck reported just shy of 10s waiting
time, doubling should be™ sufficient).
Amends the start of the public history.
Pick-to: 6.5 6.2 5.15
Change-Id: I8e64bf8ac1576c0ac71790a03936635016b3b2b7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 40e65f029341a01e16dc88871eb7b24979aea9bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 267acbc534095b17b139fb819ee854baf3c0f24b)
When UUID definitions are placed within Qt namespace MinGW build fails because specializations of struct __mingw_uuidof_s are now defined in a different namespace.
Fixes: QTBUG-133516
Pick-to: 6.5
Change-Id: I49270aa2a892d407675dab7b90d3929d120c5224
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
(cherry picked from commit 84b7cef13913139b2ed7e506ace0fa6b97269829)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 775d56f01d39c438c48397bdd571a607fb03abc3)
Amends 73405890b8911dd1a58120665ce63a38281c6ce4. The patch here
does the same for D3D12 as that previous one did for the Vulkan
backend.
Others, like D3D11, are not effected because the loop logic there
does not branch.
Fixes: QTBUG-133405
Change-Id: I88ac7c841dc0c28fc3f6b37c3402315b52de0a66
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 68e48ac60a9681887999e31f6dff622eb81bdb7d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 987ff07a85e7d9676e10e1792a1749d290d7ffa5)
Fixes clicking UI elements with a mouse on Android.
8d8cbe87e2 introduced changes to support
mouse buttons other than Qt::LeftButton, but the release always looked
like no buttons changed, nor were they tracked (m_buttons is always
Qt::NoButton). Qt was not notified of mouse up, so nothing was clickable.
Now all mouse events go through sendMouseButtonEvents, and the last seen
button state is tracked for every event. If a mouse up with no buttons
occurs, the last seen set of buttons is used instead, so Qt correctly
handles the event. Also adds the mouse button state information to
mouse move events from Android, so the workaround for delivering
Qt::LeftButton when a window is tracking a move while a button is
pressed has been removed.
Tested on a Samsung A1 with a Bluetooth mouse.
Fixes: QTBUG-132700
Fixes: QTBUG-130297
Change-Id: I241282c2915d7e6cf99db7f0bc1ad2d541349077
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d908e043984dcfed3aa80e30cd1cafacd13b644d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 65e9eca63b3f522065018777ac07c5a71c08ff37)
The various base classes that abstract away template-independent parts
of QVLA have protected destructors to prevent slicing. Re-add the
special 5 (using the macro) and a defaulted default constructor.
Pick-to: 6.5
Change-Id: I60f036eafc808862a1abee72fd53023dd99b4cc3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c10072895d1061e258d23f3cc2a9050de5236a46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5ca7ad268a3b2fb68c9505eee888aa62c2aa6189)
If a class honors the RO0 we usually just leave a comment in the class'
body, and don't explicitly redeclare any of the RO5 special member
functions.
In some cases we may need to redeclare (some of) them. The main use-case
so far is to declare a protected destructor for a base class that is
not polymorphic, in order to prevent slicing; the compiler-provided
destructor is always public.
We can easily declare and default such a protected destructor, but that
comes with the problem that now we're violating the RO5 (as far as C++
is concerned, declaring a SMF counts towards the RO5, even if it's
immediately defaulted).
Specifically: by declaring the destructor, the class loses the
compiler-generated move operations, and the copy operations are
generated but deprecated. Clang >= 18 warns about this.
In such a scenario we *must* redeclare all five SMFs... and default them
all. This is boilerplate, therefore I'm adding a macro to streamline it.
Apply the new macro to a couple of cases were manual refactoring has
already been done.
Pick-to: 6.5
Change-Id: I5dc0ff9770621fbec0b1057c164d0623f901e3e9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fcb57391f73d36914e10ba964dbd9b01fe6f3af2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 711b86fa2471cb294d02b2ace89204b22fef0120)
Amends commit 0756cc1eae.
The generic instantiation of this function had a std::nullptr_t *
parameter, but callers had special code to pass a nullptr there because
we never needed a value of a nullptr (it's always a null pointer). For
example, in compare_ptr_helper():
auto lhsFormatter = Internal::pointerToString<QObject>;
auto rhsFormatter = Internal::genericToString<std::nullptr_t>;
return compare_helper(t1 == nullptr, "Compared QObject pointers are not the same",
const_cast<const QObject *>(t1), nullptr,
lhsFormatter, rhsFormatter, actual, expected, file, line);
But in debug mode, some compilers did emit a load from this memory
location, causing a crash. So we just specialize this function to avoid
such.
We had a test for this... except it was never reached because the
earlier QCOMPARE() had already failed. For the test, this amends
commit ae02188233.
Conflict resolution for 6.8: regenerated the expected output for
tst_selftest.
Fixes: QTBUG-133330
Change-Id: I2cd3bb475788431c6a0dfffd28e730e8b613e033
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit e19b633c468123526660b40ae110f46090682c76)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 042e713cb7800f97c10d2d75a717ceb3e41ab29a)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit partially reverts fde57300ab.
The reason for the revert is that tst_selftest has some tests that are
expected to continue the execution after a failure (see the follow-up
commit for one example of such test).
This patch is 6.8-only, because in 6.9 and dev the same is done by
ad568b859a6f0a16dd243f1ca2cdc19571337da3, which could not be directly
cherry-picked to 6.8 because it also reverts the testlib support for
command-line arguments.
Change-Id: Ie3fd2f755e69d05d359cdc4d1c57267ca2edb339
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Definitely a compiler bug because it passes for everything we threw at
the compiler in the CI but fails for a user. At least the workaround is
simple.
Fixes: QTBUG-133032
Change-Id: Ie84590c466cf1d6f01bbfffd3ca1d6c262d77200
Reviewed-by: Irfan Omair <irfan.omair@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 0a5b37b706ee72c7d9042efcde244aa93a5ce9a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d37960b35ab17fddd6b52862f33f07b82d83145c)
Amends commit 19b7f854a2, which removed
the __PIE__ check because of the GCC version check that was alongside.
GCC and Clang define both __PIE__ and __PIC__ for -fPIE, so checking for
__PIC__'s presence isn't enough.
Drive-by amend the no-PIC #error message to also suggest
-DFEATURE_no_direct_extern_access=ON, which is more modern and produces
better code for executables too. Because of that, I've also changed the
reduce_relocations option to the CMake one, as there is no configure-
style equivalent for the modern option.
Pick-to: 6.5
Fixes: QTBUG-133101
Change-Id: I957b264eaee360fd964afffd60617964b26fe934
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 014e77801fa4b99cdb03330ccce1e212ac13a0af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d07a849e9853c200556abf277759679d50c645de)