Commit Graph

55530 Commits

Author SHA1 Message Date
Volker Hilsheimer
4cca8ee527 QGuiApplication: use translation-based layout direction unless explicitly set
The stored layout direction used to get changed during initialization
to what was auto-detected based on the translation. Changing the
translation then overwrote that stored value, even if an explicit call
to setLayoutDirection was made by the application.

Calling QGuiApplication::setLayoutDirection(Auto) has so far been a
no-op.

Change this logic so that the stored layout direction continues to be
LayoutDirectionAuto also if it's set based on auto-detection, and only
overwrite it when explicitly called with a non-Auto value. This way,
applications can set a layout direction that stays unchanged even when
translators are installed.

Add test coverage that uses a QTranslator.

In practice, this is not a change of behavior, unless applications called
setLayoutDirection(Auto) (which is no longer a no-op), or called
setLayoutDirection() and then installed a translator and expected the
translator's layout direction to come into effect in spite of the explicit
setting.

[ChangeLog][Gui][QGuiApplication] Calling setLayoutDirection with a non-
auto value now disables the auto-detection based on installed
translators. Applications that explicitly set a layout direction and also
want translators installed afterwards to take effect should reset the
layout direction to Auto, which is now no longer a no-op.

Fixes: QTBUG-100632
Pick-to: 6.3
Change-Id: I1fdcebd43a9b1b468ff95bf15f53f441bb214e08
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-02-24 19:46:01 +01:00
Alexandru Croitor
32b596b7b1 configure: CMake: Add -no-prefix option
Introduce a new -no-prefix option that can be used to build Qt without
having to install it.

Currently, -no-prefix is already implied by -developer-build, but
-developer-build also implies -warnings-are-errors and
-feature-private-tests, which not everyone might want to use.

Some Qt builders likely use -developer-build for the no-prefix
behavior, hence we introduce a standalone -no-prefix option to offer
a nicer user experience without -Werror and friends.

Previously it was possible to achieve the same by specifying
-prefix $PWD, but that relies on $PWD expanding property in the used
shell.

The new -no-prefix doesn't depend on the type of the shell and
is shorter to type.

Internally this gets passed by configure as -DINPUT_no_prefix=yes to
CMake, and transformed into a -DQT_FEATURE_no_prefix=ON feature.

The feature also gets automatically auto-detected to ON if
developer-build is set, -prefix is either unset or $PWD.

CMake code should still query QT_WILL_INSTALL to decide whether
files need to be installed or not.

As a drive-by, we now also export QT_FEATURE_developer_build to
be available for querying during configuration of other repos
(previously it was only possible to query FEATURE_developer_build).

Pick-to: 6.2 6.3
Change-Id: Iaa6c8d8ae2b736282e9949d2a5d7f412e290a253
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-02-24 19:46:01 +01:00
Ievgenii Meshcheriakov
7a58ca2d3a Remove util/publicSuffix
This program was replaced by psl-make-dafsa.

Task-number: QTBUG-95889
Change-Id: If52d92734ad362364c6250473281886e1ea5545d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-02-24 19:36:26 +01:00
Ievgenii Meshcheriakov
cba40055b1 Network: Use public suffix database in DAFSA format
This saves 91kiB of text size and makes it easier to use
a locally installed database when available.

[ChangeLog][Third-Party Code] Moved attribution of
The Public Suffix List from Qt Core to Qt Network.

[ChangeLog][Third-Party Code] Added attribution of new libpsl
library to Qt Network. libpsl is available under
the BSD 3-Clause "New" or "Revised" License.

Task-number: QTBUG-95889
Change-Id: Ibd37c7a94fdf235e75d96fec20d427fb5c2bd2a4
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-02-24 19:36:26 +01:00
Ievgenii Meshcheriakov
d0b22762be tst_qnetworkcookiejar: Remove tests that rely on public suffix database format
This format will be changed by the next commit. Also it is an
implimentation detail that can be changed at any time.

Task-number: QTBUG-95889
Change-Id: I00b1133078f1035e03e2cd6fae28192de54d2154
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-02-24 19:36:26 +01:00
Kai Köhne
1058f053e5 MSVC: Raise minimum version of Visual Studio 2019 to 16.7
The compile-time check for /permissive- only works from Visual Studio
16.7 onwards. Older compiler versions will fail the check, even if
/permissive- is passed.

Let's rather bail out with a more explicit error in this case.

[ChangeLog][Windows] The minimum MSVC version was raised to
Visual Studio 2019 version 16.7 (VC++ version 14.27). Trying to use
an older version will now result in a compile time error.

Pick-to: 6.3
Task-number: QTBUG-101049
Change-Id: Ibfa2930e1186eb63d8fed69efe161a9d79ccb1be
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-02-24 19:36:25 +01:00
Giuseppe D'Angelo
2b6daa610e QColorDialog: code tidies
Combine two flag-like enumerations using a bitwise OR, not a plus.
Cleanup for the follow-up commits.

Change-Id: Iceb05bf5ea0635d623ba9a7d145606e80b7f21f3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-02-24 19:36:25 +01:00
Volker Hilsheimer
a74cdf778c Implement QFormLayout::set/isRowVisible
Hiding a row in a form layout is inconvenient to do as access to the
widgets in each row is cumbersome. In addition, a row might include a
layout for the label or the field column, and we can't hide layouts and
instead need to navigate to the widgets inside the layout. And even if
an application developer does all that, the spacing calculation doesn't
ignore hidden rows.

Add setRowVisible and isRowVisible APIs with the usual overloads.
Implement the logic to traverse a layout item to its contained widgets,
so that they are explicitly hidden when a row is hidden, and skip hidden
rows in the spacing calculation.

[ChangeLog][Widgets][QFormLayout] New APIs setRowVisible and isRowVisible
to hide and show rows in a form layout.

Fixes: QTBUG-6864
Change-Id: I6af98409802f331c4523e91d7dac8a97762c579d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-24 17:07:43 +01:00
Joerg Bornemann
599c648b77 CMake: Read QT_HOST_PATH from the environment too
For cross-compiled conan packages we need conan to export QT_HOST_PATH
as an environment variable.  The Qt build now picks up this environment
variable if no QT_HOST_PATH cache variable was specified.

Pick-to: 6.2 6.3
Change-Id: I0c3e15e82842061d5db81949ffcc1c240f6ed6a4
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-02-24 17:07:43 +01:00
Joerg Bornemann
27bd7e0093 CMake: Forward QT_ADDITIONAL_(HOST_)PACKAGES_PREFIX_PATH to try_compile
All variables that are used in qt.toolchain.cmake should be recorded in
__qt_toolchain_used_variables.  This is mostly done for consistency and
to avoid surprises in future configure checks.

Pick-to: 6.2 6.3
Change-Id: I1ae18c5dfe9677c5f46a102e434e32187cb0d703
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-02-24 17:07:43 +01:00
Oliver Wolff
6b80de3915 Blacklist tst_qscreen::grabWindow for all Windows versions
The test is not only flaky on Windows 10 but also on Windows 11.

Pick-to: 6.2 6.3
Task-number: QTBUG-100412
Change-Id: I27e8179dafd4743c3eaf2c0dd8b70b804612c7c2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-02-24 13:34:33 +00:00
Andreas Buhr
4ed8e7949a Activate tst_qtextdocument for Android
tst_qtextdocument was disabled because it crashed.
It does not any more.

Task-number: QTBUG-87671
Pick-to: 6.2 6.3
Change-Id: Ie1bd75c21e481c2ecb8607c04ce9370fc6d7b00e
Reviewed-by: Samuel Mira <samuel.mira@qt.io>
Reviewed-by: Pekka Gehör <pekka.gehor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-24 14:34:33 +01:00
Andreas Buhr
fcb5e52228 Activate tst_qgraphicsview for Android
tst_qgraphicsview was disabled because it crashed.
It does not any more.

Task-number: QTBUG-87671
Task-number: QTBUG-87397
Pick-to: 6.2 6.3
Change-Id: Ib604274d098c271e22b010e6cb822fdf9553df1c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Samuel Mira <samuel.mira@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-24 14:34:32 +01:00
Andreas Buhr
2ff797689d Remove unused Qt4-compat test
There was a test for Qt4 compatibility in tst_qheaderview.
We don't run it since Qt 6.
This patch removes the unused code.

Change-Id: I751829ac5a142e79379e81e9e739107544cf7406
Reviewed-by: Arnaud Bienner <arnaud.bienner@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2022-02-24 13:51:22 +01:00
Fabian Kosmale
3fd43fafba QVariant: use std::swap for swapping known type
Amends b1b0c2970e

Task-number: QTBUG-97601
Pick-to: 6.3 6.2
Change-Id: I5161360f10e052d21c91044b2c9bf4260467e585
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-24 12:36:05 +01:00
Pasi Petäjäjärvi
055fd403c4 CI: Add docker support for tst_platformsocketengine test
Currently test relies solely for external test server. This makes it
not possible to run test successfully with environment where docker is
used.

Pick-to: 6.2 6.3
Change-Id: Ie2974a0e2fec9b16d9d023730b76fa2a32f77e65
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-02-24 09:50:31 +02:00
Pasi Petäjäjärvi
30d55abbac Core: Fix tests that did break because QProcess security fix
Amends 29fceed2ff

Pick-to: 5.15 6.2 6.3
Change-Id: Ief3317a89f7be1dd1dc249297bd16e958b9e1ef2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-24 09:49:52 +02:00
Pasi Petäjäjärvi
3a151faec2 QNX: Fix support for abstract Unix-domain socket
As QNX claims to support abstract Unix-domain sockets, its getsockname
always returns for socket that has not been bound to local name
address_len of sun_path as maximum length (106) even when it does not
contain valid address.
https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.lib_ref/topic/u/unix_proto.html

Pick-to: 6.2 6.3
Change-Id: I0f0f5c05611c8db6af35377dde16450f58c83c56
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-24 07:49:37 +00:00
Pasi Petäjäjärvi
df270368ee Fix getsockopt option_value initial initialization
On some platforms, some of the options we're getting the value
for may be a single byte, so attempting to read the full int
produces garbage.

Found with IP_MULTICAST_TTL and IP_MULTICAST_LOOP on QNX. See:
https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.lib_ref/topic/g/getsockopt.html#getsockopt__IP_MULTICAST_TTL

Pick-to: 5.15 6.2 6.3
Change-Id: Id9f7f249c6c4be0c3f94c5904d402b4ec4e17b59
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-24 07:49:10 +00:00
Alexey Edelev
708eb85e38 Allow calling qt6_android_add_apk_target twice
If qt6_android_add_apk_target is called manually in user project this
might cause duplicated targets issue when calling the finalizer(either
manually or in a defer call).
Skip the qt6_android_add_apk_target body if target is already
registered in _qt_apk_targets list.

Pick-to: 6.3
Change-Id: I36ef569227e0c5f0f077446bbe5d7e8d8fc0bfc6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-24 03:42:28 +01:00
Alexey Edelev
bb209b5715 Fix the mapping between configure arguments and CMake variables
Pick-to: 6.2 6.3
Fixes: QTBUG-101172
Change-Id: Ie1e01880911e771eedbf29b0d2d0607bc25b0549
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-24 03:42:28 +01:00
Martin Storsjö
7341251e0e QHash: Fix building for i386 after "add support for VAES and AVX512VL"
Fix a typo from da1720485e,
where mm_cvtsz_si128 was undefined when building for a 32 bit
target. The code would make it seem this was a typo, with the
listing of defines didn't match between 32 and 64 bit.

Change-Id: Ica24d88e7f71ecd1d24ed990773711f9105f3ec8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-24 03:59:53 +02:00
Marc Mutz
dd9f4a2033 Un-export QConfFile
Only clearCache() is used by tests. Ubsan build also passes.

Makes it easier to reason about the mutex handling in the class' ctor
and dtor.

Change-Id: I917991cfecda71dcd0a5bea7705a7f7f3a3e75b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-23 23:07:45 +01:00
Michal Klocek
a232927474 Add back accidentally removed check for QT_FEATURE_system_zlib
This commit amends be2745e478

Pick-to: 6.3
Change-Id: I2fd687e12440cc40ad25b65cbfcc1ce261d04258
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-23 17:41:59 +01:00
Joerg Bornemann
71d011d35a Fix QT_ADDITIONAL_(HOST_)PACKAGES_PREFIX_PATH environment variables
Except on Windows, the values in CMake environment variables that
contain path lists are separated by colons, not semicolons.  See
documentation of CMAKE_PREFIX_PATH.

This is necessary for conan's virtualenv generator which sets these
environment variables with native list separators.

This amends commit e044c94a61.

Pick-to: 6.2 6.3
Task-number: QTBUG-94524
Change-Id: I7f3d140a8462347b181f1d9601fd11cc1ba449db
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-23 17:06:20 +01:00
Alexandru Croitor
56abd7e4e0 CMake: Fix exclusion of QtFoo in QtBarDepends for 3rd party libs
When configuring a static Qt with the -qt-zlib option and the build
system creates a 3rd party header module QtZlib, syncqt
does not generate a QtZlib header file that would include all its
public headers.

Then when the QtSvgDepends header is generated, it would add an
 #include <QtZlib> which would break compilation of the QtSvg PCH
file (which compiles QtSvgDepends).

We have logic to exclude addition of headers from regular 3rd party
static libraries, but not header only 3rd party libraries.

Adjust the code to handle header-only 3rd party libraries, as well as
make sure it works across repos by exporting the relevant properties.

As a drive-by, also rename and export some other informational
properties.

Amends af00402d64
Amends 6fdeaea24f
Amends be2745e478

Pick-to: 6.2 6.3
Change-Id: I087f50b193dd845e4a5ec906e8851d63122faf80
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-02-23 15:17:42 +01:00
Andreas Buhr
2f6faca901 Add tests to QAbstractItemModelTester checking only one change in flight
This patch adds checks to QAbstractItemModelTester checking
that only one change is in flight at a time.

Change-Id: I15fe1ad1274649aa652ed6489a889df72c8a8292
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-23 14:42:27 +01:00
Eike Ziller
3ab49ee040 MimeDatabase::mimeTypeForFileNameAndData: Do not open file unnecessarily
If the file extension already matches uniquely, we do not need to do any
actual file operation.

Pick-to: 6.3
Change-Id: Ide8b82eefbcd13348b78b28b66230a91e1e3c5d8
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-23 08:44:23 +01:00
Thiago Macieira
fa2830dc6e qHash: fix running on CPUs without AVX2
The extra "V" accidentally enabled AVX2 code in the aeshash128()
function.

Fixes: QTBUG-101082
Change-Id: Ibf4acec0f166495998f7fffd16d63e220dbe02d0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-02-22 22:31:38 -08:00
Lorn Potter
af36dc7d76 wasm: move user configurable settings
Both INITIAL_MEMORY and PTHREAD_POOL_SIZE are settings users can
change, they are not interface settings.

Fixes: QTBUG-100693
Pick-to: 6.3 6.2
Change-Id: Ie1547c7f52c9fe109a313260616705728024b6b8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-02-23 12:04:37 +10:00
Sona Kurazyan
196e10bce4 Fix formatting in qbytearrayalgorithms.h
Pick-to: 6.3
Change-Id: I1ff15049e73b8ce02101b5d84b2ac02d5fb69abb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-23 02:39:14 +01:00
Giuseppe D'Angelo
8123a69e6e QRegularExpression: print the pattern when warning
Just as a minor debugging helper: when warning that an invalid
regular expression object is being used to match, also print
the used regular expression pattern.

Change-Id: I0f99bcf4ca87ec67d04ed91d9dc315814f56d392
Fixes: QTBUG-76670
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-22 21:15:31 +01:00
Marc Mutz
b727f2190f Protect headers against min/max macros
... using the usual pattern, which, being idiomatic, doesn't need a
comment explaining it.

Pick-to: 6.3
Change-Id: Id6b12450495a18f89e1f83f2018b6218b03ff6a7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-22 20:12:29 +00:00
Marc Mutz
a87edb9ae9 QStringEncoder/Decoder: make base class ctors protected
Base class dtors should either be public and virtual or else
non-virtual and protected. We don't need polymorphy, so make them
protected.

Because ~QStringConverter is now user-declared, the move special
member functions are suppressed. Re-add them using = default.

[ChangeLog][QtCore][Potentially Source-Incompatible Changes]
[QStringEncoder/Decoder] The destructors of the base classes of
QStringEncoder and QStringDecoder are now protected, to prevent
slicing.

Change-Id: I72cc5b98af1a6533a46080b537e1900808e1f130
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-22 21:12:29 +01:00
Alexey Edelev
d10bbc2e6a Convert Android paths to JSON compatible
Convert paths in the QT_ANDROID_EXTRA_PLUGINS and QT_ANDROID_EXTRA_LIBS
target properties to a JSON compatible, when generating deployment
settings using finalizers in user projects.

Pick-to: 6.3
Change-Id: I8878435d69688c21e44b22339dc84495b9cea5eb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-22 21:12:27 +01:00
Sona Kurazyan
9c35ab1cc2 Make QByteArrayView's numeric conversion methods inline
Make the implementations of these methods free functions in the
QtPrivate namespace, so that they can be called also from
QByteArrayView's corresponding inline methods.

These methods were added in 6.3, so we can still make them inline
without breaking BC.

Fixes: QTBUG-101077
Pick-to: 6.3
Change-Id: Id50c6d4df5471127ae787a544a5651ced9aece99
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-02-22 19:23:39 +01:00
Viktor Arvidsson
cfe421cee2 Windows QPA: Calculate window frame for frameless windows the same for all code paths
When we add the WS_THICKFRAME/WS_CAPTION window flags to a
frameless window the return value of AdjustWindowRectEx is no
longer 0. This works fine when creating the window since the version
of QWindowsGeometryHint::frame used during creation checks the
FramelessWindowHint, however later when the window changes
screen, the screen change code checks the fullFrameMargins which
uses a version of QWindowsGeometryHint::frame that does not
early out, causing a missmatch in the geometries of the backing
store and platform window.

This fixes aero snapping shortcuts for frameless windows on multi
monitor setups.

Fixes: QTBUG-84466
Pick-to: 6.2 6.3
Change-Id: I2357ea32669e4676645549996a3ac6073f3df15c
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2022-02-22 18:03:11 +00:00
Joerg Bornemann
d48609a9c4 CMake: Add INSTALL_DIR argument to qt_internal_add_app
Add the possibility to install a Qt app into a directory different from
${INSTALL_BINDIR}.

If INSTALL_DIR is not specified, qt_internal_add_app still installs to
${INSTALL_BINDIR}.

Pick-to: 6.2 6.3
Task-number: QTBUG-99295
Task-number: QTBUG-100047
Change-Id: I52371aa0f770d80c32bb0b3442ce3c463916be63
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-22 18:37:48 +01:00
Marc Mutz
330f2132ca QStringEncoder/Decoder: add missing noexcept
The interesting part is what cannot be noexcept:

- nameForEncoding() and ctor from Encoding: because they don't handle
  all valid values of type Encoding, so have a narrow contract

- encodingForHtml(): because it allocates memory (→ QTBUG-101046)

Change-Id: I30cdc19a32537be047e43955e3337e4d6ccc363f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-02-22 18:16:24 +01:00
Alexey Edelev
4b8bc8b5bb Make android function sequence mutable
When building Qt itself or Qt standalone tests (but not user projects),
qt6_android_add_apk_target and qt6_android_generate_deployment_setting
can now be called at any time after the Android executable target is
created.

Note: Because we're now using genexes when we build Qt as described
above, Qt developers are required to use Unix-style paths for the
following target properties:
    QT_QML_IMPORT_PATH
    QT_QML_ROOT_PATH
    QT_ANDROID_PACKAGE_SOURCE_DIR

Pick-to: 6.3
Fixes: QTBUG-100796
Change-Id: Ida788f0d58bc0c028a89eed9d115babe27144325
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-22 17:22:59 +01:00
Andreas Buhr
1ba56134f5 Repair some of tst_qtableview tests on Android
The view.resize() command has no effect if the requested
size is smaller than the screen. So the view has space for
the whole model. It then won't scroll, so scrolling cannot
be tested.
This patch enlarges the model so that scrolling is always
necessary and thus possible.

Task-number: QTBUG-87407
Pick-to: 6.2 6.3
Change-Id: Ibff512158d9c16be120a69c7328b6d0ae2c3b551
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-22 17:22:59 +01:00
Andreas Buhr
b39d3cfe30 Activate all tst_qgridlayout tests on Android
Some tests were blacklisted, but the problems cannot be reproduced
any more. This patch activates them.

Fixes: QTBUG-87404
Pick-to: 6.2 6.3
Change-Id: I5944c750a5717daaf43a22d6d1fa51ae54fc3da2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-22 17:22:59 +01:00
Andreas Buhr
9e7a5bb513 Activate tst_qopenglwidget for Android
tst_qopenglwidget was disabled because it crashed.
It does not any more.

Task-number: QTBUG-87671
Pick-to: 6.2 6.3
Change-Id: I7ea55f262f362c098b52e1b1a319b26c31a7e067
Reviewed-by: Pekka Gehör <pekka.gehor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-22 17:22:58 +01:00
Andreas Buhr
1ae662cad0 Activate tst_qdom for Android
tst_qdom was disabled because it crashed. It does not any more.

Task-number: QTBUG-87671
Pick-to: 6.2 6.3
Change-Id: I41117938fe9d93b510c4a60beb4c2f5b20991434
Reviewed-by: Pekka Gehör <pekka.gehor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-22 17:22:58 +01:00
Andy Shaw
baa2d09d0d SQLite: Update SQLite to v3.37.2
Fixes: QTBUG-100907
Pick-to: 6.2 6.3 5.15
Change-Id: I6e31b2ba19443ed6554a343423dcfd2ca6d0ac2f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-02-22 15:44:48 +01:00
Shawn Rutledge
c5792dcfd6 Make QGuiApplicationPrivate::lastCursorPosition.toPoint() safe to use
QGuiApplicationPrivate::lastCursorPosition is initialized with qInf();
so before Qt has seen a mouse move event, attempting to convert to
QPoint is an error. It's best to have one place where we do the qIsInf()
check rather than several (and otherwise prefer using the QPointF as-is
rather than converting to QPoint at all).

Introduce a helper class that contains a QPointF, and provides a safe
conversion to QPoint, as well as simple accessors for clients using
QPointF.

Fixes: QTBUG-52472
Task-number: QTBUG-45045
Change-Id: I83fad1bfb658e03fa876344552f1d5bb751d9f81
Pick-to: 6.2 6.3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-02-22 14:48:38 +01:00
Volker Hilsheimer
29a7489769 Always include qt_windows header first
qt_windows takes care of setting NOMINMAX, which prevents native headers
from defining `min` and `max` as macros, breaking the build. So include
that header always as the first header.

Pick-to: 6.3
Change-Id: I82cd8b21d263102000e6e66f135465bc2c126db4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2022-02-22 14:48:38 +01:00
Marc Mutz
66203133e3 QStringConverter: make explicit what should never have been implicit
As a drive-by, remove the GCC 7 constexpr work-around.

[ChangeLog][Potentially Source-Incompatible Changes]
All QStringEncoder/Decoder constructors are now explicit.

Change-Id: I0972e2736115993d44a48e73dbf4b08a1c94bef2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-22 12:20:15 +00:00
Friedemann Kleint
9ddc020246 Stabilize tst_QTabBar::hoverTab()
Port the test to use the QWindow* based overloads of QTest::mouseMove()
and move the cursor away.

Pick-to: 6.3
Task-number: QTBUG-98489
Change-Id: Id1ac0ef176c6f9bf179f989ddd5775877525fc0d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-02-22 07:55:30 +01:00
Marc Mutz
87c6e340a9 QStringConverter: fix move special member functions of State class
By copying 'd' instead of the (larger, on 32-bit platforms),
state_data variadic member, we may corrupt the state (by copying only
half the state).

Fix by copying state_data instead, which is guaranteed to be the
larger of the two.

The move-assignment operator must be self-assignment-safe in the
moved-from state (Hinnant Criterion), so we need to use memmove(), not
memcpy().

[ChangeLog][QtCore][QStringEncoder/Decoder] Fixed a potential data
corruption in the move constructor and move-assignment operator on
32-bit platforms.

Pick-to: 6.3 6.2
Change-Id: I7bbc475a6eecec618a011b23814cada35ce61d10
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-21 23:20:18 +01:00