Commit Graph

55763 Commits

Author SHA1 Message Date
Pasi Petäjäjärvi
fe93a5f42d CI: Add docker support for tst_qiodevice 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: Idf7e99c19ab630065b651f2f6d957311f45f0db7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-24 22:09:43 +02:00
Pasi Petäjäjärvi
f00e332d39 CI: Add docker support for tst_qtextstream 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: If716921ce6ceea1ced2d0d7025c6e9768b4ed7a7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-24 22:09:43 +02:00
Laszlo Agocs
e25fc5a197 rhi: d3d11/vulkan: Allow passing in an array range override
Only (straightforwardly) implementable with modern APIs, and
only really exists to handle special platform cases, such as
when a video framework gives us a D3D texture array with
D3D11_BIND_DECODER | D3D11_BIND_SHADER_RESOURCE
which is only possible to use as a shader resource if the SRV
selects a single array layer.

Has no effect on the normal usage of texture arrays, where all
array layers are exposed, and it is the shader that selects the
layer when sampling or loading via the sampler2DArray. That
continues to be the standard way to work with texture arrays.

Change-Id: I0a656b605da21f50239b38abb83067e0208c1dbe
Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-03-24 19:19:35 +01:00
Volker Hilsheimer
1fe5ea3f83 Fix compiler warnings in tests
Don't mix unsigned and signed types in comparisons.

Pick-to: 6.3
Change-Id: Ia4ba9c114177425a21cadc8cafe8179928315a5d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-03-24 13:23:16 +01:00
Iikka Eklund
c0dbc02680 Conan: Fix used function name for parsing 3rd party sw dependencies
This got broken in: 58c6f37ed06c9cbc4de2ce8c87a9608bd628c64d
Fix it to use the correct function from qt-conan-common.

Pick-to: 6.3 6.3.0 6.2
Change-Id: Ia381672d17ce5bd33e0a9aded3b7125ebb0bcb6e
Reviewed-by: Toni Saario <toni.saario@qt.io>
2022-03-24 12:14:56 +02:00
Giuseppe D'Angelo
5f8e11981c QStandardItemModel: use the right datatype for text alignment
Now that views can deal with Qt::Alignment returned by a model,
use the right type.

Change-Id: Ib6de5f7acbc76e9529451ddb494e808a41c59021
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-03-24 07:20:12 +01:00
Giuseppe D'Angelo
56f2407dc0 QAbstractItemModelTester: use the right types for some roles
Models are expected to return Qt::Alignment and Qt::CheckState
when asked for the text alignment / check state roles, respectively.
However, for legacy reasons, models may return `int` for either
possibility. Extend the tester to cover this.

Task-number: QTBUG-75172
Change-Id: I64bfc898466e8bb4d4a8a35726986ae610a8ffbe
Pick-to: 6.2 6.3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-03-24 07:19:54 +01:00
Aleix Pol
3ec95f943a qdbusxml2cpp: Improve error message
Instead of saying:
You should add <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="<type>"/> to the XML description
It now says
You should add <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="<type>"/> to the XML description for 'Bind'

So you get an idea of which type it's asking to annotate.

Change-Id: Ia0842d3b54681825201813fe0875014cd35d8192
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2022-03-24 05:24:13 +01:00
Fan PengCheng
897845ca7f widgets: Disable "Pick color" in QColorDialog when unavailable
On Wayland, you can't read screen content, so the "pick color"
feature does not do anything. In cases such as these, we should
detect that the platform does not support the feature and hide
or disable the button.

Fixes: QTBUG-101145
Change-Id: I192ca2aac78b3df5352b4dc71100b93f69dc5efb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-03-24 12:24:13 +08:00
Rafael Roquetto
e555069151 QNX: remove mmrenderer overlay window support
QtMultimedia no longer supports overlay windows. The QNX multimedia
plugin now relies on the canonical rendering codepath via QVideoWindow.

Change-Id: Ic3bb14865f147a47200554e4791c191540e5bb75
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2022-03-24 09:42:03 +10:00
Volker Hilsheimer
dfb4697e4a QAbstractItemView: with single selection, deselect on Ctrl+Release
After cbf1b4bc60bca3994b8f8685ee922e53a6b4eed2 the selected item got
deselected on Ctrl+Press, which made Ctrl+dragging a selected item
impossible.

Only deselect on Ctrl+Release. Add scenario to existing test case,
and update the documentation to clarify the properties involved, and
to point out that the event parameter might be nullptr.

Fixes: QTBUG-101647
Pick-to: 6.3 6.2
Change-Id: I749b1cb1a0a311f5c1d4c333984716f05f2c90b5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Enderlein <volker.enderlein@ifm-chemnitz.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-03-24 00:42:00 +01:00
Giuseppe D'Angelo
6880b7c39b Itemviews: start fixing mixups of int/enum for Qt's item roles
A model is supposed to return a Qt::CheckState for a CheckStateRole,
and a Qt::Alignment for a Qt::TextAlignmentRole. This is what the
documentation says (and what makes sense), but unfortunately
Qt's default delegate expected a plain `int` instead.
This sometimes worked (via QVariant conversions, e.g. when using a plain
enum) and sometimes didn't (e.g. when using a flag type).

This is confusing for end-users (and type unsafe, killing the whole
point of using enums and flags in the first place).

Adding some automatic flags<->int conversions through QVariant is
frowned upon, so I don't want to go there. Instead, add some private
convenience functions that extract either the right type from a variant,
or try to extract an `int` and convert it to the expected type.

Use these from within itemviews code.

Change-Id: I44bee98c4a26a1ef6c3b2fa1b8de2edfee7aef32
Pick-to: 6.2 6.3
Fixes: QTBUG-75172
Task-number: QTBUG-74639
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-03-23 23:06:23 +01:00
Niklas Wenzel
af875e88f4 FreeType: Load multiple font faces from the same file on macOS
Previously, if a font file contained multiple font faces, only the first
could ever be loaded. This could lead to Qt loading different font
styles than requested by the application.

[ChangeLog][Text][Freetype] Fixed a bug where the macOS FreeType backend
would fail to load font faces from font files containing multiple faces.

Fixes: QTBUG-100666
Pick-to: 6.2 6.3
Change-Id: I6a126266a2e15f843dd578ab25c11748881bb932
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-03-23 23:05:18 +01:00
Mårten Nordheim
d34ae86a00 tst_QLocalSocket: Add helper to dependencies
To enable using `ninja tst_qlocalsocket_check` and have the
helper (re)built as part of the dependencies.

Pick-to: 6.3 6.2
Change-Id: I8703c4202a97606991d1cffe0d0f8e909a51f12f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-23 21:19:35 +00:00
Ivan Solovev
21e7216670 Android: activate tst_QLineEdit
Skip some of the obviously failing QCompleter-related tests instead of
blacklisting them.
Skip a test that causes a crash.

This allows to re-enable this test in CMakeLists.txt for Android.

Task-number: QTBUG-87417
Pick-to: 6.3 6.2
Change-Id: Ie7ee708df8ceddf117689e8ac749850ba86e8816
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-23 21:03:03 +01:00
Alexey Edelev
de582a26c3 Use the CMake path format when passing the CMAKE_PREFIX_PATH to ctest
The generated 'CTestTestfile.cmake' file contains unescaped '\' symbols
in --build-options argument that causes an issue if the Windows path
format is used in CMAKE_PREFIX_PATH.

Change-Id: Ic03934fcb7bc6230cef72584fef81b01026d5f3b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-23 20:14:18 +01:00
Tor Arne Vestbø
ee15aa7482 CoreText: Maintain theme fonts in the font database instead of themes
The ownership of the fonts were handled in the iOS and macOS themes,
but the CoreText font database also kept a reference to these fonts.

As there was no way for the themes to reset the font database
references we could potentially end up in a situation where the
font database had stale references. And as the font database
would not rebuild the theme fonts once populated the themes
then would not be able to build a new list of theme fonts.

Moving the ownership to the font database makes semantics
and management of the fonts clearer.

Pick-to: 6.3 6.2
Change-Id: I61756abaf5487f28d520dfa1cf7a8ee2d716cce6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-23 20:14:18 +01:00
Assam Boudjelthia
8c4894f94b Android: don't QEXPECT_FAIL in tst_QTextDocument::task240325()
This test doesn't fail on Android anymore, so don't use QEXPECT_FAIL.

Pick-to: 6.2 6.3
Task-number: QTBUG-100470
Fixes: QTBUG-69242
Change-Id: I5a96566728a486c701656aede1818e7ab7f019be
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-03-23 18:22:06 +00:00
Alexandru Croitor
384dfceb53 CMake: Mention where the configure summary can be found
when configuring for the first time.

Also mention how to increase output verbosity.

Unfortunately there is no way to check what is the current log
verbosity to only show the latter message conditionally.
Setting --log-level does not assign the same value to
CMAKE_MESSAGE_LOG_LEVEL.

Amends e2a0ddbb69

Pick-to: 6.2 6.3
Change-Id: I22101b9dc7c407cc54aa5e7964dec50c7490f8f5
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-03-23 19:09:21 +01:00
Sona Kurazyan
76db8a0b1b Use QLatin1StringView in QString/QLatin1String APIs and docs
- Replaced QLatin1String with QLatin1StringView in QString/QLatin1String
  APIs and docs (except for QLatin1String class declaration and ctor
  names).

- Made the docs look like QLatin1StringView is "The Real Thing".

[ChangeLog][QtCore] Made QLatin1StringView the recommended name for
referring to a Latin-1 string view (instead of QLatin1String).

Task-number: QTBUG-98434
Change-Id: I6d9a85cc956c6da0c910ad7d23be7956e4bd94ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-03-23 18:06:51 +01:00
Marc Mutz
4167a920ed QDateTime: enable larger ShortData for bootstrapped build
Ensures we get a modicum of testing of the Qt7 32-bit code in.

Change-Id: I0838e4340265e19ab2b17a1a91a11ef5f9948893
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-03-23 13:46:33 +00:00
Marc Mutz
4cf299eb5b QSettings: port API from QString to QAnyStringView keys
With the public interface ported to QAnyStringView, we can now
internally optimize memory allocations _in a central place_ (e.g. by
returning std::u16string or QVarLengthArray<QChar> from normalizeKey()
instead of QString). But first we needed to get rid of all the
unwarranted allocations in user code.

Effects on Linux AMD64 stripped C++20 release builds:

GCC 11.2 libstdc++ (TEXT -= 6.5%):

     text    data     bss     dec     hex filename
   635148   10992    2824  648964   9e704 tst_qsettings-01-baseline
   593691   10992    2824  607507   94513 tst_qsettings-02-qanystringview

Clang 10.0.0 libc++ (TEXT -= 11.6%(!)):

     text    data     bss     dec     hex filename
   790336   10640    2832  803808   c43e0 tst_qsettings-01-baseline
   698572   10640    2832  712044   add6c tst_qsettings-02-qanystringview

That's the beauty of QAnyStringView: transparently reducing temporary
QString creation; and the simplest code is also the most efficient.

[ChangeLog][QtCore][QSettings] Keys can now be passed as
QAnyStringView (was: QString). The most efficient way to pass literal
keys is now "key"_L1, the backwards-compatible way is
QStringLiteral("key").

Fixes: QTBUG-101390
Change-Id: I510fb4ce17ef109dac7c9cdc5d90ede0d1a9db5f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-23 14:46:33 +01:00
Fabian Kosmale
a9cef86b8f Remove qipaddress from boostrap lib
Change-Id: I31a883404f34d0933fe8b316d05b0f28103e48ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-23 08:17:44 +01:00
Fabian Kosmale
c25a5b4e1f Remove QTemporary(file|dir) from boostrap lib
Change-Id: I851f0fd8150592784a7b38d3d30d69d8346de112
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-23 08:16:49 +01:00
Volker Hilsheimer
49a5512f0b Document that native file dialogs might not show a title
Native dialogs on macOS haven't shown a title bar since macOS 10.11.
The caption string passed in might not be visible to the end user, which
can be problematic for certain applications that use the title text to
provide context to the user.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-59805
Change-Id: I3a1cea8f11a62c0927a9ba00159a118e2b078956
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-03-23 03:31:45 +01:00
Volker Hilsheimer
3fbe201d21 Try to stabilize QWidget::enterLeaveOnWindowShowHide
The test is very flaky on Windows 11. Make sure that we have a secondary
window to close before proceeding, and wait for fade effects to finish,
otherwise we might never get the leave event from the windowing system.

Also replace a QVERIFY(qWaitFor) construct with a simple QTRY_VERIFY.

With these changes, a local run of 20 repeats of this test on a stressed
VM improves from 75% to 100%.

Pick-to: 6.3 6.2
Fixes: QTBUG-98477
Change-Id: Iedcc175b336e3cab23817b954aba1736d02f1b9d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-03-23 03:31:44 +01:00
Fabian Kosmale
aa29de37a7 Remove QUrl* from boostrap lib
Change-Id: I669ad12588adfd6fb409525616e145120e5a7c76
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-23 03:13:02 +01:00
Eirik Aavitsland
d0a299869b Jpeg handler: Detangle error reporting from the abort handling
If libjpeg has detected a fatal error, wait until after the longjmp to
report the error using qCWarning(), as some compilers don't like that
happening before the stack has been restored.
Also avoids code duplication.

Fixes: QTBUG-100821
Pick-to: 6.3 6.2
Change-Id: I8d0e6e1bcc4f2a85dae06b3879453ee9077288c0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2022-03-22 18:52:23 +01:00
Edward Welbourne
5a4106748c Document some details of TAP's use of YAMLish
... along with how QtTest soon shall be using it.

Change-Id: I9c723ebdb8ee5be1c4152aa911ae7c846ea61b5c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-22 17:43:13 +01:00
Edward Welbourne
90406af31a Use a cheaper is-empty test for a C-string
We only need to look at the first byte to determine whether the length
is > 0; no need to count how many more bytes after it aren't '\0'.

Change-Id: Id2db2a9a993086c0aee02c99396fcb346b1a348e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-22 17:43:13 +01:00
Edward Welbourne
02d130db7e Avoid duplicate descriptions in TAP's incident YAML
When a B?Fail's description doesn't match the QVERIFY/QCOMPARE
regexes, it got output as a comment in the YAML block after the test
line had already reported it as a TODO comment. An empty description
would also have lead to an empty comment in the YAML block. Condition
this fallback output case on there being a description that hasn't yet
been reported in the test line.

Task-number: QTBUG-96844
Change-Id: Id7fe81d26ddb01da3d8003ada8fa590a5e1a166f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-22 17:43:13 +01:00
Edward Welbourne
d52fbfe924 Fix indentation of some continuation lines in qtaptestlogger{.cpp,_p.h}
Change-Id: I33dc05b61b07f077edc7c4816d43d0b53f5f4b43
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-22 17:43:13 +01:00
Edward Welbourne
58b0d72f8d TAP test logger: treat blacklisted XFail the same as XFail
In all places but one they were treated the same; fix that last one to
match the rest. This removes one line from the YAML block for each
blacklisted XFail test; in each case, this message duplicates the one
on its "not ok ... # TODO..." test line.

Change-Id: Iff2028afccd979db7f2c84e85d1b78541900008e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-22 17:43:13 +01:00
Edward Welbourne
44d0cbc7b1 Match QtTest command-line output options to the help output
Reorder the different formats to match the order in the help output
and include missing entries from the list of formats supported by the
-o filename,format variant.

Change-Id: I884f9facc7cfde7cec0bee75944efdd72d66a83e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-22 17:43:13 +01:00
Edward Welbourne
0e5c39ee13 Document what QtTest's various loggers do
Provide basic (internal) documentation of each logging class and link
the command-line documentation to pages relevant to the formats not
defined by Qt.

Change-Id: I3251dd1304203c6ab87dfe1f2dec0e9787ab69f8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-22 17:43:13 +01:00
Sona Kurazyan
401349af26 QFuture: fix a codechecker warning
Codechecker complains about passing a forwarding reference to std::move,
which may unexpectedly cause lvalues to be moved. We should use
std::forward instead.

This amends cbf8fc0ac4

Change-Id: Ieba9e960b5dfb448e9cebabe9541967698995b8f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-03-22 17:43:12 +01:00
Samuel Mira
2ba3cde348 Android: Blacklist failing tests on tst_QGraphicsProxyWidget
Backlist failing tests on Android. To be fixed later.

Task-number: QTBUG-100470
Task-number: QTBUG-101888
Pick-to: 5.15 6.2 6.3
Change-Id: Iaa33b555f6063702af683c683e0b07ce2910fe13
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-03-22 17:49:05 +02:00
Andreas Eliasson
c1dc32185b Doc: Reorganize sections structure in Qt Widgets landing page
Also, use the global include snippets for the 'Using the Module'
section.

Task-number: QTBUG-100369
Pick-to: 6.3
Change-Id: Ib9e32dd48689879c91c7c307f8cf0f01dc478efe
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-03-22 16:49:05 +01:00
Iikka Eklund
061541ea44 Conan: Fix typo in recipe
Fix indentation of a function declaration.

Pick-to: 6.3 6.3.0
Change-Id: Ib2aed12f2549e4b0ee5ee21a59c2c7b9db726a7e
Reviewed-by: Toni Saario <toni.saario@qt.io>
2022-03-22 15:01:07 +00:00
Pasi Petäjäjärvi
7cb047128c QNX: Fix compiler warning by when FEATURE_clipboard is not enabled
warning: unused parameter 'selectionClipboard' [-Wunused-parameter]

Pick-to: 6.2 6.3 5.15
Task-number: QTBUG-101382
Change-Id: I4f42a6f41c8f8a8b3edd3a042c89b7a2a49a96fe
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-03-22 08:26:22 +00:00
Thiago Macieira
32e24e011e qversiontagging.h: remove the attempt to use the "retain" attribute
GCC 11 knows about it, meaning __has_attribute(retain) = 1 regardless of
whether GCC can emit code for it. Clang has a similar limitation.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99587

Fixes: QTBUG-101753
Change-Id: Ic30914a4448d4bc28974fffd16dce9a78cdefe5b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-21 18:06:13 -07:00
Pasi Petäjäjärvi
5c85b0c7a4 CI: QNX qemu need docker service ports explicitly defined for visibility
Network autotests cannot connect to services on docker containers from
QNX qemu without all ports explicitly defined (both host and container)
side.

Pick-to: 6.2 6.3
Task-number: QTQAINFRA-4684
Change-Id: Iba44cfa17d42d43ecec3e29985e404f75d5fc232
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
2022-03-21 22:30:01 +02:00
Alexey Edelev
ea30708972 Install QtCopyFileIfDifferent as the 'public' cmake helper
QtCopyFileIfDifferent needs to be both installed and copied to a build
folder as a public CMake helper. Otherwise it's not found when building
tests inside the Qt build tree.

Pick-to: 6.2 6.3
Fixes: QTBUG-101916
Change-Id: I8d081e594fe694f528ebac4c13bbdf6d3b8402b9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-21 21:16:14 +01:00
Shawn Rutledge
f0254ef50c qsql_ibase: fix includes
QMap was a transitive include, apparently; and we have mostly
standardized on specifying the module where each include comes from.

Change-Id: I1a54db879e744120f5b10eb0b16f8ba36cde8300
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-21 20:41:23 +01:00
Ulf Hermann
908ee8aab1 QProperty: Allow manual scheduling of binding notification
In some situation we want to notify even if the value didn't change.

Task-number: QTBUG-101771
Pick-to: 6.2 6.3
Change-Id: I7d82a9f6e0f7d5eb48065e3f428b814939181ea8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-21 20:41:23 +01:00
Volker Hilsheimer
cbf8fc0ac4 Fix warning in tst_qfuture
Explicitly move the argument into the return value to silence:

qfuture_impl.h:153:20: warning: local variable 'arg' will be copied
despite being returned by name [-Wreturn-std-move]
            return arg;
                   ^~~

[...]
qfuture_impl.h:153:20: note: call 'std::move' explicitly to avoid copying

Change-Id: I49fab7c31efb7d809182c8d56e6a5ed8f05a5622
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-03-21 20:41:23 +01:00
Volker Hilsheimer
c924c05ae2 Replace deprecated QColor::fromString in tests and documentation
Don't use deprecated methods in tests, and don't refer to them in
documentation.

Change-Id: I110480742d9a7b9b0a2e194e3fe610208c1e07da
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-21 20:41:23 +01:00
Volker Hilsheimer
4ac00ca901 QTabBar: let styles draw tab text with foreground role
QTabBar::setTabTextColor's documentation and implementation suggests
that the set color will always be used unless invalid, and that the
foreground role is used otherwise. QTabBar then sets the foregroundRole
palette entry to the specified color before calling the style. The intent
is evidently that the tabTextColor is used no matter the foregroundRole
(which by default is the role that contrasts with the background role).

If the styles always paint the text with WindowText, then the tabTextColor
gets ignored if the foregroundRole is not WindowText (perhaps because
the backgroundRole is set to Base).

Fix this by respecting the widget's foregroundRole when painting the tab
label in the common style (which is the only style that implements
drawControl for CE_TabBarTabLabel). QMacStyle and QStyleSheetStyle
need to be adjusted to prepare the palette consistently with the logic
in QTabBar.

Pick-to: 6.3 6.2
Fixes: QTBUG-101456
Change-Id: I077a2034eebfe3f56cea28917494f4db01e48747
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-03-21 19:41:23 +00:00
Øystein Heskestad
eaabd0c545 QAnyStringView: constexpr detect 8-bit ASCII as Latin 1
This has performance benefits when doing comparisons.
The check is only performed at compile time.

Task-number: QTBUG-101014
Change-Id: I55694b045fe5e75d9671d0a3a70c80d998cf98c8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-21 20:36:23 +01:00
Janne Juntunen
64847af6e6 QtPlatformSupport: add support for detecting webOS
Some autotest CMakeLists.txts need to know whether the target is webOS.
This change enables that.

Task-number: QTBUG-101933
Pick-to: 6.3
Change-Id: I7b4ebe89622a4ad8bc313e807d9fa50152c96d14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-21 21:36:23 +02:00