Commit Graph

59007 Commits

Author SHA1 Message Date
Thiago Macieira
dbc9467ca3 QBenchlib/Perf: use one system call to enable/disable measurements
The man page says the prctl() should apply to any performance counters
measuring the current process, so it should work with a perf stat
started with --delay=-1... but I couldn't make that work.

Change-Id: I3c79b7e08fa346988dfefffd172032f06cc10fa0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-09 02:18:45 -07:00
Thiago Macieira
1fef390ad7 QBenchlib/Perf: use C++11 range-fors for the event list
This code predated C++11 and thus had a sentinel element.

Change-Id: I3c79b7e08fa346988dfefffd17202ef3f9735683
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-09 02:18:45 -07:00
Thiago Macieira
3cafd26c1d QBenchlib/Perf: parse multiple counters from -perfcounter
Change-Id: I3c79b7e08fa346988dfefffd17202ec98947308e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-09 02:18:45 -07:00
Thiago Macieira
4731baf6d3 QBenchlib: add support for a measurer reporting multiple results
Implemented for the Linux Perf measurer, with four measurements by
default.

RESULT : tst_MyClass::QString_toInt():
     149.574444 CPU cycles per iteration (total: 149,574,445, iterations: 1000000)
RESULT : tst_MyClass::QString_toInt():
     620.000181 instructions per iteration (total: 620,000,182, iterations: 1000000)
RESULT : tst_MyClass::QString_toInt():
     131.000046 branch instructions per iteration (total: 131,000,047, iterations: 1000000)
RESULT : tst_MyClass::QString_toInt():
     32.118771 nsecs per iteration (total: 32,118,771, iterations: 1000000)

Change-Id: I3c79b7e08fa346988dfefffd17202cda3df8431b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-09 02:18:45 -07:00
Thiago Macieira
b5b00e7790 QBenchlib: use QBenchmarkMeasurerBase::Measurement in QBenchmarkResult
Change-Id: I3c79b7e08fa346988dfefffd17202a818cde1d84
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-09 02:18:44 -07:00
Thiago Macieira
985b942152 QBenchlib: pass the metric type alongside the measurement value
And pass the value in a qreal, which is what QBenchlib stores
anyway. This increases the code size a little because the conversion
from integer to qreal is in multiple places, but doesn't meaningfully
increase the overhead: in the SysV ABI, we still return Measurement in
registers and even using the floating point registers where applicable.

This is the first step in allowing the Perf benchmarker to benchmark more
than one event.

Change-Id: I3c79b7e08fa346988dfefffd172027a8677f17c0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-09 02:18:44 -07:00
Thiago Macieira
0f55580ec5 Update the poll-exit-on-error code: include the message for everyone
I think it's useful for everyone to know what error it was, not just if
it's about to abort. And then simply abort() when we want to.

Change-Id: I3d74c753055744deb8acfffd1724c5b2b293ca9a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-08 23:07:22 -07:00
Thiago Macieira
fd34da6c47 Update the poll-exit-on-error feature to be private
User code shouldn't have to know about this.

Amends 0e1ce757d5.

Change-Id: I3d74c753055744deb8acfffd1724c5282f60ea59
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
2022-11-08 23:07:21 -07:00
Axel Spoerl
ca254a0937 Stabilize flakiness in tst_QOpenGLWidget
qWaitForWindowActive was called in two test functions without
activating the relevant widget.
This patch adds widget activation before calling
qWaitForWindowActive.

Helper function verifyColor:
A loop made six comparison attempts of widget size, pixel color and
image with a 200ms waiting time after each unsuccessful attempt.
The widget size was tested at the beginning of the loop.
The test was failed on the first size mismatch, which occurred when
verifyColor was called before the widget was rendered.
That has lead to flakiness (e.g. on openSuSE).

This patch encapsules each check in a lambda and calls qWaitFor to
ensure event processing until each condition has become true.

Change-Id: Ic98f93c8acf41459bc728f2969fe8b01768048dd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-08 21:51:14 +01:00
Tor Arne Vestbø
fe67c69643 tst_QGraphicsEffectSource: Reset effect repaint count after flushing events
Follow-up to 8222e06d12, which only reset
the item repaint count.

Flushing the queued paint events will bump numRepaints, and the whole
point of calling reset() is to prepare a consistent state before the
next test, so we need to call it after flushing the events.

Pick-to: 6.2 6.4
Change-Id: Id1fe840c14c0940d7020cf8f8cc6a3aeceaa5fb5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-08 19:44:59 +01:00
Tor Arne Vestbø
3d03001d2d macOS: Add dependency to Foundation for permission plugins
Fixes: QTBUG-108270
Change-Id: Ic09c3422d2006e18ab355af564ac1bb3f24318c2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
2022-11-08 19:44:58 +01:00
Mårten Nordheim
53788ff7b8 QWindowsMime: Fix namespace issue
Change-Id: Iac40ee9dc92a27a53491ffa7f4359ec37fef77a5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-08 19:44:58 +01:00
Timothée Keller
1498c82073 Update list of windeployqt modules
Added QtMqtt and QtPdf to the windeployqt module list

Task-number: QTBUG-105135
Pick-to: 6.4
Change-Id: Ic8a8a0c157663088341ed5a1a417dcb57a717286
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-11-08 19:44:58 +01:00
Axel Spoerl
7d54632fdd Stabilize flakiness in tst_gestures
This patch replaces the first instance of QCOMPARE with QTRY_COMPARE /
QVERIFY with QTRY_VERIFY after a call to QWidget::grabGesture.
It re-groups verifications so that the verification of the highest
event count is on top.

The test function customGesture is skipped if
QGestureManager::deliverEvents cannot establish a target to deliver
the custom event.

Change-Id: I8188559a40ed5be86f3c6e9c82fa54a97ce5d7d6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-08 18:52:26 +01:00
Morten Sørvig
25b07371e1 wasm: add accessibility logging category
Use it for logging TODO items.

Change-Id: If3218effcc7f044269defd5187ec080d4132d674
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-11-08 16:54:36 +00:00
Morten Sørvig
af987e0f66 wasm: tidy up qwasmcclipboard.cpp/h
Use private class functions and data. Move static paste
function out of the class, next to the other static event
handlers. Remove writeToClipboard()'s unused argument.

Change-Id: I9098290a3885dc540ea29a989fe3e83f8f4d5396
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-11-08 18:54:35 +02:00
Bartlomiej Moskal
153a3245dc Android: Do not override app_pal by AndroidPlatformTheme
It may happen that other styles (especially QtQucik styles) apply
different palette for applications. In such case AndroidPlatformTheme
should not override it when Light/Dark mode is changed

Task-number: QTBUG-83185
Pick-to: 6.4 6.2
Change-Id: I6a3b7ee047fcd729be03271a7202cd260360f83b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-11-08 13:26:33 +00:00
Giuseppe D'Angelo
7cfc531382 QPdf: code tidies
Refactor an if/else chain over an enumerator into a switch.
This unveils that the last else is actually dead code, as there
is no Qt::UniteClip any more (removed 11 years ago in
01b72952c3).

Change-Id: Ib702e3f5bfdc39e580a4d872e54a5239d62204f7
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2022-11-08 13:12:49 +00:00
Alexey Edelev
10372c074b Make sure that module can be imported by the provided QML import path
When resolving QML module dependencies we scan the produced by the
build system import paths for the required QML modules. Previously the
check in androiddeployqt only was confirming that the required import
starts with the one of import paths. This worked well unless the
required import is nested in higher level import path. In the situation
when we have the following build structure:
  build_dir/
    imports/
       MyModule/
          ...
and both 'build_dir' and 'build_dir/imports' directories are in QML
import paths, the MyModule QML module is resolved by the
'build_dir/imports'. But androiddeployqt assumed that it's found by
'build_dir' import path and copied the whole 'imports' directory as
the 'MyModule' QML module. The resulting bundle then had the
following content:
  qml/
    imports/
      MyModule/
        ...
  ...
instead of the correct one:
  qml/
    MyModule/
      ...
  ...

This checks if import path contains the required url-based module
path before using it as the base directory to copy the module.

Amends 0a73fb10005053945571e6cdb0b03d916715c112

Pick-to: 6.2 6.4
Fixes: QTBUG-108194
Change-Id: I79e1a8a67f62e5ae4a899ba1a4f49ee4ad44ebf9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
2022-11-08 14:08:51 +01:00
Jan Grulich
c0b0c7bebb Gtk3Theme: set XCURSOR_SIZE and XCURSOR_THEME for wayland sessions
GNOME doesn't set these for Wayland session and without those env
variables set users might experience broken cursor with Qt apps
as QWayland reads them to setup QWaylandInputDevice.

There is no cursor protocol available on Wayland yet, see also
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/58

Qt Wayland QPA plugin still tries to load from those two envs.

Fixes: QTBUG-67579
Fixes: QTBUG-87778
Pick-to: 6.4 6.2 5.15
Change-Id: I4e7f6871b56599170b12e796858238b1df6d47d1
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-11-08 13:42:27 +01:00
Timur Pocheptsov
02b9033d50 getProxyAuth: stop using deprecated API
A new SDK marked several functions in SecKeychain family as deprecated.
Fortunately for us, Security framework on the whole is not deprecated
and thus provides an alternative API to inspect keychain items, and also
much nicer one - instead of having a function with 15 parameters, those
parameters are 'collapsed' into one, the 'query', which is a dictionary.

Pick-to: 6.4 6.2
Fixes: QTBUG-108196
Change-Id: I602d1a846ff9683cac724859a776de2b901f5c1c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-08 07:12:05 +00:00
Giuseppe D'Angelo
2ec77f4f11 QFlatMap: fix a declval usage
The comparator object is allowed to reject rvalues. Use a const
lvalue ref.

Change-Id: Id4ab5e094f3a0f4e6b2549ee5d3105d93faf1d14
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-08 01:05:20 +01:00
David Skoland
ffb44ad8ef wasm: Add missing batchtestrunner files to copy logic
qtestoutputreporter.js and qtestoutputreporter.css were added to
the batchtestrunner, but not to the list of files copied from
sources, so make sure to add those and add a note for future reference.

Change-Id: If7f323b3051ee9b6fb4bedc3ee314e4941b41f0b
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-11-07 16:56:46 +02:00
Timothée Keller
cbd688d410 Update list of windeployqt modules
Added QtCharts, QtDataVisualization, QtRemoteObjects, QtScxml, and QtNetworkAuthorization to the windeployqt module list

Task-number: QTBUG-105135
Pick-to: 6.2 6.4
Change-Id: I16f2897583518c4577eeeda2dc0a6f413fef9794
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-11-07 10:47:49 +01:00
Samuel Mira
d53ea82950 Android: Fix incorrect fullscreen dimensions
The insets used to calculate the correct height were not the best
choice. It used display cutout insets which would work correctly on
most devices, but in the case of an emulator or a device without a
camera, it could fail to calculate correctly.

Task-number: QTBUG-107604
Task-number: QTBUG-107709
Task-number: QTBUG-107523
Pick-to: 6.4 6.4.1 6.2 5.15
Change-Id: I8c4da83ae7359a0c133dbeb02dbd2cd260565f78
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-11-07 09:06:34 +00:00
Volker Hilsheimer
de0ff0d428 macOS: clean up clipboard code
Replace flavor with uti, remove unused parameters, remove unused
hasOSFlavor function. Hide QMacMimeData as an implementation detail, it
is generally undefined behavior to cast an object to a type it is not an
instance of (even if related and without new data members).

Apply const, fix coding style.

Task-number: QTBUG-93632
Change-Id: I3bc05a72bc47c78958f26211211e734387fbb024
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-07 09:31:18 +01:00
Volker Hilsheimer
2c54086317 QMacMime API cleanup: use uti instead of flavor
Update documentation.

Task-number: QTBUG-93632
Change-Id: I69a57608ba2a06211e89fcf511bc582509c00dc4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-07 09:31:13 +01:00
Volker Hilsheimer
9f35db2a8a Standardize QMacMime and QWindowsMime
Make name of virtual functions explicit, following the QWindowsMime
API.

Task-number: QTBUG-93632
Change-Id: I7ada2b1aa86bc6e28b47383a32ab9cbaf9ad93e5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-07 09:31:08 +01:00
Volker Hilsheimer
bf08aac46a macOS: Make QMacMime's handler scope type-safe
The value indicates for which systems the handler is relevant, e.g.
clipboard and/or drag'n'drop. Rename the enum from "MimeType", which is
something else already, to "HandlerScope".

Make the enum a scoped enum to avoid implicit conversion to uchar, and
to allow for better value names. Use the type in APIs and only convert
to uchar when needed.

Make respective arguments default to both DnD and clipboard implicitly,
instead of explicitly interpreting an invalid zero-value as a default
value.

Task-number: QTBUG-93632
Change-Id: I85ab982f6c9fe78ea4d030dd0b0791c8ab866f67
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-07 09:31:04 +01:00
Volker Hilsheimer
a1622083db QWindowsMime: port to use modern string literals
Task-number: QTBUG-93632
Change-Id: I75e780a0bf1137e99c6726fbff15be5cc68accd5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-07 09:30:59 +01:00
Volker Hilsheimer
76fcd436c1 Rename QMacInternalPasteboardMime to QMacMime
We want to make it public, and there is no need for "pasteboard" since
it also coveres drag'n'drop. Add a default constructor that defaults to
supporting both clipboard and drag'n'drop, and clean up the code by
using that constructor where applicable.

Historical note: the converter interface was called QMacMime up to
Qt 4.2, when due to macOS changes it had to be replaced by
QMacPasteboardMime.

Task-number: QTBUG-93632
Change-Id: Id9712300039375aa6394598b104827e6f5d6c948
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-07 09:30:55 +01:00
Volker Hilsheimer
fe1075332c Windows: simplify registration of QWindowsMime implementations
Register the QWindowsMime implementation instance in the QWindowsMime
constructor, and remove it again in the destructor.

Provide a convenience static method to register a mime type.

This makes it a lot easier to use the type, without having to use native
interfaces.

Since this requires adding a qwindowsmime.cpp file, move the (so far
internal) documentation there.

Task-number: QTBUG-93632
Change-Id: I3b5e45be6255bd11a576127304c4aec9d7364e69
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-07 09:30:48 +01:00
Volker Hilsheimer
68f097923f Fix registration of Windows-specific custom mime types
Data received by Qt from a native clipboard- or drag'n'drop-source is
mapped to a application/x-qt-windows-mime;value=... mime type, where the
"value" corresponds to the native clipboard format name, e.g.
"FileGroupDescriptor". When we register such a mime type in Qt, then we
need to get the same clipboard format number back. I.e. registering
'application/x-qt-windows-mime;value="FileGroupDescriptor"' needs to
produce the same Windows clipboard format identifier as the call to
RegisterClipboardFormat("FileGroupDescriptor").

Otherwise, a mime converter implementation has to operate on different
clipboard format values in the implementations of the different virtual
functions that are operating on FORMATETC data structures.

Task-number: QTBUG-93632
Change-Id: I0b7e3a2fc0e3f72bffc4490fc0ff4b190e0929a3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-07 09:30:42 +01:00
Kristoffer Skau
c9ad5ad3b7 Add support for stereoscopic content in QRhi::OpenGLES2
Setting the flag QSurfaceFormat::StereoBuffers does not actually do
anything, because we do not utilize the extra buffers provided. We need
to expose setting the correct buffers using glDrawBuffers between draw
calls.

Change-Id: I6a5110405e621030ac3a2886fa83df0cfe928723
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-11-07 09:08:44 +01:00
Ahmad Samir
516871d3e5 Use strlen instead of magic numbers
Change-Id: I47289b62771f358669d5a6279c1c8f4bd149cd72
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-06 20:21:02 +02:00
Thiago Macieira
21cb6287a7 QCryptographicHash: fix build: #include <array> was missing
MSVC 2022. Must have been some indirect include I'm modifying.

qcryptographichash.cpp(266): error C2079: 'QCryptographicHashPrivate::SmallByteArray::m_data' uses undefined class 'std::array<char,64>'

Change-Id: I3d74c753055744deb8acfffd172492257099f14d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-05 22:03:01 -07:00
Thiago Macieira
93be493ee1 QEventDispatcherUNIX: remove unused include
Helpful hint from Qt Creator.

Change-Id: I3d74c753055744deb8acfffd1724c53a97bd6132
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-05 22:02:52 -07:00
Thiago Macieira
f642bdf69e QByteArray: move the high-memory-using and slot tests away
Otherwise, tst_QByteArray takes 97 seconds on my laptop to run. Makes
design iteration difficult.

Pick-to: 6.4
Change-Id: I07ec23f3cb174fb197c3fffd17220e6737907415
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-05 11:15:40 -07:00
Tor Arne Vestbø
8222e06d12 tst_QGraphicsEffectSource: Reset repaint count after flushing events
Flushing the queued paint events will bump numRepaints, and the whole
point of calling reset() is to prepare a consistent state before the
next test, so we need to call it after flushing the events.

Pick-to: 6.2 6.4
Change-Id: Iaefc9854caafe82c65c9587e18fd081439e8dda6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-05 14:03:09 +01:00
Mårten Nordheim
47576af348 QMetaType: Document the default ctor
It wasn't showing up in documentation.
Amends 33cd680ddb.

Pick-to: 6.4 6.2
Change-Id: Ifb5d38fd3d4eb2ecd109ce53809fae5382916dff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-11-05 08:35:59 +00:00
Thibaut Cuvelier
dd1b21dbf3 Adapt qdoc macros and documentation for DocBook
Change-Id: I91e380e7670964937d90e478029f367177bf339b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-11-04 18:39:03 +01:00
Alexey Edelev
7b9bb698b9 Add support of Android multi-ABI builds
This patchset adds the rules to utilize build artifacts from multiple
android abi builds and to use them for building and running tests.
If target.arch has the value 'Multi', coin will now skip building Qt
itself, since this means that all Qt versions were build previously.
It only builds test using the pre-built Qt for Android archives and
then runs the regular Android tests using multi-ABI apks. The rules
are implemented for qtbase only.

Change-Id: I265c70c45caa2155c75cd15c7e3a4f6a863252b8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-11-04 18:39:03 +01:00
Samuel Mira
8d76c5af51 Android: Fix qfiledialog test for emulator bump to API 24
The qfiledialog test was failing on completer_data test. The fix
available for Android 11 also works in Android 7, so removed the if
clause.

Task-number: QTBUG-105377
Change-Id: I76a4c1073a754c9b299cfe731f42b80da1a6f8e2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-11-04 19:39:02 +02:00
Tor Arne Vestbø
e4147992df tst_QAccessibilityMac: Wait for accessible window to become available
It may take some time before the shown window is available through the
accessible hierarchy, so do an asynchronous test for that to happen.

Pick-to: 6.4
Change-Id: I3f312ae636505b805899973678b1bf10a65f96b3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-04 16:51:38 +01:00
Tor Arne Vestbø
16b9f9a9aa Merge Objective-C++ parts of tst_QAccessibilityMac into main source file
There's no need to split it, we can use the -x compiler flag to build
the .cpp file as Objective-C++, or, as done here, just rename the file.

This allows us to use QVERIFY and friends, giving more precise failure reporting.

Pick-to: 6.4
Change-Id: I6fb1c4454335082c8a39010c5b75c59e6ec6561b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2022-11-04 16:51:37 +01:00
Eirik Aavitsland
7c4b3648ca Handle allocation failure in QImage rotate 90/180/270 functions
Fixes: QTBUG-108186
Pick-to: 6.4 6.2 5.15
Change-Id: I354e75d9f063cdea0340b84e9585a61651a7c70f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-11-04 15:50:10 +01:00
Paul Wicking
124d682739 Doc: Clean up qforeach docs
* Don't attempt to link to std::as_const with \sa.
* Don't say 'please'.
* Describe what is, never what may come to be at some
  undefined point in the future.
* Format text properly.

Change-Id: I496d98c143d693b3f09753f91f2fa5327bbb9402
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-11-04 15:50:10 +01:00
Volker Hilsheimer
46648436d4 Fix focus chain with compound widgets if created out of order
When a compound widget is created not directly before its children,
then another widget will be in the focus chain between the compound and
the compound's first child. If one of those children is then made the
focus proxy of the compound, then the widget in between becomes
unreachable by tabbing.

To fix this, detect that we set the focus proxy to be a descendent of
the compound widget, and then move the compound widget directly in front
of its first child in the focus chain. This way we can't have any gaps
in the focus chain.

Augment the test case with a corresponding scenario. As a drive-by, move
the debug helper up in the code so that it can be easier used, and set
object names on relevant widgets.

Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-89156
Change-Id: I17057719a90f59629087afbd1d2ca58c1aa1d8f6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-11-04 15:04:42 +02:00
Mårten Nordheim
35e54f9b7b QNetworkInformation[Win]: Catch potential exceptions
Some Windows SDKs seem to throw an exception (sometimes?) when
calling ConnectionProfile::NetworkAdapter.
Catch the exception and ignore it, we would return Unknown anyway.
And just in case it is needed, do the same for GetConnectionCost.

This requires enabling exceptions for the plugin.

Fixes: QTBUG-108156
Pick-to: 6.4 6.4.1
Change-Id: Ie6c5adb3715578aa94ef3391afae79d9aecdc5d3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-11-04 11:54:31 +01:00
Ahmad Samir
7000e2dd5c QByteArray: add erase() unittests
Basic unitttest and one to verify erase returns iterator, not
const_iterator.

Change-Id: I44c3b82b4686ff3809648063376f5e36fb7e181d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-04 09:32:01 +02:00