Commit Graph

53802 Commits

Author SHA1 Message Date
Jonas Kvinge
5ed0974ef4 concurrent: Fix typo in documentation
Pick-to: 6.2
Change-Id: Ibe3715de704f420ba3796d19c9e78cd6204eb4e5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-12 10:52:03 +00:00
Jonas Kvinge
aa97bc5f6c concurrent: Fix namespace typo
Change-Id: I7fed1f3965f97a4e1c4d096bc19f98572ea35c53
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-12 12:52:03 +02:00
Jonas Kvinge
13b5c269d6 gui: Fix typos in documentation
Pick-to: 5.15 6.2
Change-Id: I533f5a55cd0cd60a76990b552d7dab51a301ac1c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
30613163ba widgets: Fix typos in documentation
Pick-to: 5.15 6.2
Change-Id: I6b77f0ec043d08da3b7958d780dce9595daf97a6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
616802fe88 QEventDispatcherWasm: Fix typo in debug message
Pick-to: 6.2
Change-Id: I183de5fd477b9529dd5272c88a196b9bebf4ab66
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
00ebab71d3 gui: Fix typo in CMake feature
Pick-to: 6.2
Change-Id: Icf81eac4d12fb61bcec2ca92d118ce88f970522e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
6c4403e92a network: Fix typos in source code comments
Change-Id: Iff505451e3f00de2d753de0f1d891a73cf73ef0d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
1cebe7d7db network: Fix typos in messages
Pick-to: 5.15 6.2
Change-Id: Ibad852372c80a988efeabc2b0757bf238b92b9a3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
dce874415d QWindowsWindow: Fix typo in documentation
Pick-to: 5.15 6.2
Change-Id: Ib20b2f23e399b295e26b8c29084023e4e1361579
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
18e1711f7a corelib: Fix typos in documentation
Pick-to: 5.15 6.2
Change-Id: I64d63af708bc6ddaabd12450eb3089e5077f849e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
231fec7ca2 corelib: Fix typos in source code comments
Pick-to: 6.2
Change-Id: Ic78afb67143112468c6f84677ac88f27a74b53aa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
651d7debe1 gui: Fix typos in source code comments
Pick-to: 5.15 6.2
Change-Id: Ie53e5542a8f93856470982939ecd8ec90b323d69
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
5cb48619e2 xml: Fix typos in documentation
Pick-to: 5.15 6.2
Change-Id: Ie2a4df380dc2e519a55db4457bd17e326e62046f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
9f701b6ffc tools: Fix typos in source code comments
Change-Id: I9666104a320f66b22c5144375ce7440bb59737e6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
f55c1fb3b4 cocoa: Fix typo in debug messages
Pick-to: 5.15 6.2
Change-Id: I0a4c344f2104241175a9bfce7cfc7128c3f7d3ed
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-10-12 12:52:02 +02:00
Jonas Kvinge
93f808b781 qcocoa: Fix typos in source code comments
Pick-to: 6.2 5.15
Change-Id: Ide20e1d133891890a7673c8403ea91b489baa8f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-10-12 10:52:01 +00:00
Jonas Kvinge
9bf555e3c8 qcocoa: Fix typos in documentation
Pick-to: 5.15 6.2
Change-Id: Ibf86b9b95715e20e8bf9c49a347f9c8ca0c04bb5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-10-12 12:52:01 +02:00
Jonas Kvinge
84d0d089a8 qwindowsxpstyle: Fix typos in documentation
Pick-to: 5.15 6.2
Change-Id: I5dc4649783b0d4c2b17e0555b98874b83a5b9f30
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-12 12:52:01 +02:00
Jonas Kvinge
12f937d909 styles: Fix typos in source code comments
Change-Id: If0f140f4ad02395bd0dd5eee08f90318d3a7e930
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-12 12:52:01 +02:00
Jonas Kvinge
72c7c96143 network: Fix typos in documentation
Pick-to: 5.15 6.2
Change-Id: I386c6e4a21dacb2553a39a073052dcf6d92a9854
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-12 12:52:01 +02:00
David Rosca
5f01d33dbf evdevtouch: Fix loading screen name for output mapping
Accidentally broken in 4b899a29fa

Change-Id: I8ff52153c3549fcda4ebd178cc4fc1ea9538be86
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
2021-10-12 12:52:01 +02:00
Jonas Kvinge
b64c6285f7 tls: Fix typos in source code comments
Change-Id: Iec42e4d0f3476bd421861a0139731ff89788ee23
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-12 11:29:15 +02:00
Mårten Nordheim
dc01509878 QNI: Add missing transportMedium documentation
I forgot

Fixes: QTBUG-97409
Change-Id: I5ee94b2cc4c70b6408bb9bb9368c6876f3179783
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-12 08:54:17 +00:00
Shawn Rutledge
826765f654 Select a single range of cells in QTableView, away from merged cells
- when there is no intersection between the current selection and the
  spans collection, get ranges for all cells, just as if no span exists
- when there is an intersection between the current selection and the
  spans collection, get separate ranges for each cell (as before)

This fixes the regular case of selecting multiple non-spanned cells
after some cells are merged (get a single range for all cells instead of
separate range for each cell). However, when selecting together a group
of spanned and non-spanned cells, you still get a separate range for
each cell. But this is normal behavior in similar applications; for
example in LibreOffice, you cannot select and merge spanned and
non-spanned cells: an error dialog tells you that it's not allowed.

Done-with: Christos Kokkinidis
Pick-to: 6.2
Fixes: QTBUG-255
Change-Id: Ic38f9a064a1f499825e7f750668013fc2dc564ba
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-12 09:07:54 +02:00
Volker Hilsheimer
9a77230685 QTableWidgetSelectionRange: Make it possible to compare for equality
Add operators as hidden friends, add test case to make sure that
basic value-type operations are possible with this type.

Task-number: QTBUG-255
Change-Id: I7fbf453aa16084c0b2a0079487cacb4e092ff664
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-10-12 09:07:54 +02:00
Jonas Kvinge
9684764bda xml: Fix typos in source code comments
Pick-to: 6.2
Change-Id: I33aaefec7128009ca5e1b368fdb67e2fbcd06e30
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-12 07:07:54 +00:00
Thiago Macieira
f11bc38850 QOffsetStringArray: rewrite in modern C++17
Less clunky due to having better constexpr support, plus fold
expressions.

Change-Id: I3eb1bd30e0124f89a052fffd16a6bc73ba79ec19
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-11 19:00:52 -07:00
Thiago Macieira
d105a7bd62 qconfig.cpp: Remove the install date
It's not used anywhere. It's been a legacy since 5.0 anyway.

Pick-to: 6.2
Change-Id: I2bbf422288924c198645fffd16a9740444c7f13b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-10-11 19:00:31 -07:00
Thiago Macieira
8e5fcf02bd QPlugin: add qt_plugin_query_metadata_v2() to dynamic plugins
They return a pointer to the actual header, skipping the magic string.
This is done in preparation for the header located in an ELF note, which
won't have the magic.

Change-Id: I3eb1bd30e0124f89a052fffd16a8229bec2ad588
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-11 18:59:52 -07:00
Thiago Macieira
c89286b26a QPlugin: suppress the "QTMETADATA !" magic in static plugins
The .qtmetadata section is already suppressed for static plugins, but we
carried this unnecessary magic string. For library file formats where we
don't have a scanner (Windows COFF PE), a library that linked multiple
static plugins could end up with multiple metadata found.

We can't suppress the header because the version of moc could be
different to the version of Qt, so we need to read the header version
too. Right now, the version isn't output by moc (all the logic is in
qplugin.h), but this could change again in the future. In any case, 4
extra bytes are not a big deal, so the header stays.

Change-Id: I3eb1bd30e0124f89a052fffd16a82088d8303081
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-11 18:59:45 -07:00
Joerg Bornemann
326b91ea78 Fix missing QT.<module>.run_depends entries in module .pri files
The .pri files for public Qt modules were missing run_depends entries.
Those entries are used by qmake when linking plugins of a static Qt
build.  In shared builds, run_depends entries are used to decide whether
to add the -rpath-link argument to the linker.  In that matter,
run_depends entries serve a similar purpose as CMake's
IMPORTED_LINK_DEPENDENT_LIBRARIES.

In Qt5, run_depends entries consist of the qmake values QT_PRIVATE and
QT_FOR_PRIVATE.

QT_PRIVATE contains the Qt modules that are privately linked to the
public module, and QT_FOR_PRIVATE are the dependencies of the private
module.  That loosely translates to LINK_LIBRARIES of the public module
and INTERFACE_LINK_LIBRARIES of the private module.

Private modules whose public counterparts are already public
dependencies don't have to be added to run_depends.

Pick-to: 6.2
Fixes: QTBUG-84310
Change-Id: If7025c98ea462a2d5a143202df3d98d88e4fee08
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-12 01:07:21 +02:00
Sona Kurazyan
64e9312464 Fix compilation error with MSVC 2019 and C++20
Fixes: QTBUG-97425
Pick-to: 6.1 6.2
Change-Id: Id327e3494d1deae852f953211c0409a80beafe88
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-10-12 00:51:27 +02:00
Thiago Macieira
333b40a12e QUtf32: fix bad assertion in convertFromUnicode
Looks like it was copied from QUtf16::convertFromUnicode(), but for the
UTF-32 case that is not correct. UTF-16 to UTF-32 conversions can change
the length of the string due to surrogates.

There are unit test tests for creating and parsing UTF-32 headers, and
for detecting content as UTF-32, but there aren't any for UTF-32
conversions. I don't have time to add a full test for that.

Fixes: QTBUG-97122
Pick-to: 6.2 6.1
Change-Id: Ic17a33f599b844d8ab5dfffd16ab2c4cb6b0547d
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-10-11 11:08:15 -07:00
Mitch Curtis
2b77e779ce QGtk3Theme: implement appearance function to detect dark themes
This allows Qt Quick Controls to detect if a dark theme is in use,
and if so, use a dark theme of the current style (if available).

Fixes: QTBUG-93955
Pick-to: 6.2
Change-Id: I15fc8a2271acf9ba27232359056d5a681d4cffca
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-10-11 16:18:38 +02:00
Edward Welbourne
04419c2852 Set tm_isdst = -1 before calling mktime()
Leaving it set to 0 will cause mktime() to interpret other fields as
in standard time, potentially "correcting" them and tm_isdst to
represent the equivalent moment in daylight-saving time. Set it to -1
to tell mktime() to let the system work out whether the time is
standard or daylight-saving.

Change-Id: Id33d4cb0afdb14f236ca5ce04cf605610a30d712
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-11 16:01:56 +02:00
Edward Welbourne
299f016b5d Broaden condition on use of MS's localtime_s()
It's available on MinGW, so not limited to MSVC; and the MinGW
localtime() and localtime_r() fail in some cases where it works.

Use the generic name rather than _localtime64_s(), since localtime_s()
now just calls it; and, in any case, we were assuming time_t is
__time64_t when calling it.

Change-Id: I316cc5b1a3e19cd6725555042dfaba3124a25a03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-11 16:01:56 +02:00
Alexander Neumann
a4e9ea7a1f avoid max macro expansion on windows if NOMINMAX is missing
Pick-to: 6.2
Change-Id: I1c19da59bdf97a434be52239c2a5b1b517341bcb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-11 14:01:56 +00:00
Volker Hilsheimer
9d26de4069 Activate tst_QDialog::showAsTool test on macOS
The skip-reason only cites Qt/X11. Convert the #ifdef into a platform
name check instead. The test also fails with the offscreen plugin, so
skip it for that as well.

Pick-to: 6.2
Change-Id: I49607b89f4b32359e81e1d9aadff2c3e03035c53
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-10-11 15:48:33 +02:00
Volker Hilsheimer
44b9aec8d9 QDialog: respect WA_ShowWithoutActivating
QDialog overrides setVisible to set focus on the default push button, or
(if there is no such button), make the first autoDefault push button the
default button. QDialog also explicitly sends a FocusIn event to the
focus widget in the dialog.

All this should not be done if the dialog does not become active after
getting shown, which will be prevented if the WA_ShowWithoutActivating
attribute is set.

Add a test case.

Fixes: QTBUG-8857
Pick-to: 6.2
Change-Id: If47021a4721a280ba45e95b43d0424cdacd9b4ea
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-10-11 15:48:33 +02:00
David Skoland
3fc58a5ed8 Remove union in QFileSystemEngine
The need for this union has disappeared at some point during refactoring
It does confuse MemorySanitizer, though, so it's good to remove it.

Change-Id: I5f5050adba302bf96db96d5f303d2a25630543ce
Fixes: QTBUG-97109
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-11 15:46:46 +02:00
Volker Hilsheimer
6c4dc722cb Reduce the width of a hfw-widget if scrollbar would be flipping
For a widget that implements height-for-width, the vertical scrollbar
becoming visible might be just enough to make the scrollbar unnecessary.
In that situation, the scrollbar flips on and off continuously.

To avoid that situation, make the width of the widget smaller until the
height fits without scrollbar, up to the point where we have space for
the scrollbar anyway.

The calcuation here is assumed to be cheap, but depends on the
heightForWidth implementation in the widget. Running the while-loop a
few dozen times should have no performance impact during resizing
and laying out the scroll area contents.

Add a test that confirms that within a brief period of time we only get
the one hide-event we expect.

Done-with: Zou Ya <zouya@uniontech.com>
Fixes: QTBUG-92958
Pick-to: 6.2 5.15
Change-Id: I0faeb5f9b1a226aada958c18333d9c2ac8203dd1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-10-11 10:49:57 +02:00
Timur Pocheptsov
dd57605b9e Http/2 - handle PADDED flag correctly
Previously, when deciding where the actual data is, Frame was calling
padding() to test if offset is needed. A curious case with a DATA frame
containing compressed body and having 'PADDED' flag set with a padding
equal to ... 0, ended in a decompression error (and assert in 6.2 code).

Pick-to: 6.2 5.15
Fixes: QTBUG-97179
Change-Id: I9341a4d68510aa4c26f4972afdcd09a530d5a367
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-09 12:49:01 +02:00
Qiang Li
5d4b91ea66 Fix QTabBar's SelectPreviousTab behavior
When setCurrentIndex is called by removeTab, the old current index
might no longer be valid. Only update the lastTab value of the new
current tab if the old current index is still valid.

As a drive-by, use the validIndex helper function.

Fixes: QTBUG-94352
Pick-to: 6.2
Change-Id: I945e2093a90a1fccbba86d32b1113f83fedd41de
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-10-09 05:41:00 +02:00
Ievgenii Meshcheriakov
4682af483f QString: Use QStringIterator in QtPrivate::isRightToLeft()
This simplifies the code. While at it, also expand default case
so changes in the QChar::Direction enum don't go unnoticed.

Change-Id: Id52140b0aaf7fd259c4b8079462811603eb3ff93
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-09 02:54:45 +02:00
Joerg Bornemann
f19668ce65 Don't use libs in /usr/local for configure tests by default on macOS
Since commit f3c7d22dd0 we do not use
libraries from /usr/local and other non-system locations on macOS.  But
our configure tests still did.  This led to discrepancies between
find_package calls in configure tests and the Qt project itself.

Mentioned commit removed /usr/local and friends from
CMAKE_SYSTEM_PREFIX_PATH.  But we can't pass this variable to the
configure tests, because CMake sets it up and overwrites our value.

Pass CMAKE_SYSTEM_PREFIX_PATH and CMAKE_SYSTEM_FRAMEWORK_PATH as
QT_CONFIGURE_TEST_CMAKE_SYSTEM_{PREFIX|FRAMEWORK}_PATH variables to
tests.

Tests with separate project files that call find_package() must add code
like this after the project() command:

if(DEFINED QT_CONFIGURE_TEST_CMAKE_SYSTEM_PREFIX_PATH)
    set(CMAKE_SYSTEM_PREFIX_PATH
        "${QT_CONFIGURE_TEST_CMAKE_SYSTEM_PREFIX_PATH}")
endif()
if(DEFINED QT_CONFIGURE_TEST_CMAKE_SYSTEM_FRAMEWORK_PATH)
    set(CMAKE_SYSTEM_FRAMEWORK_PATH
        "${QT_CONFIGURE_TEST_CMAKE_SYSTEM_FRAMEWORK_PATH}")
endif()

Adjust pro2cmake accordingly.

Task-number: QTBUG-97076
Change-Id: Iac1622768d1200e6ea63be569eef12b7eada6c76
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-08 23:15:31 +02:00
Fabian Kosmale
e5183c49dd androiddeployqt: Use QElapsedTimer to get elapsed time
No need to reinevent the wheel. Also, use nanoseconds
now that we have the precision available.

Change-Id: I287d06198edc3f5bdf7f85bd5f3e235b1fea95a3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-08 20:03:22 +02:00
Sona Kurazyan
ce59ccb334 Optimize QPromise destructor
Unify cancel and finish in QPromise destructor in a single call. This
saves us one extra mutex lock and atomic state change.

Task-number: QTBUG-84977
Change-Id: Iac06302c39a2863008b27325fcf6792d4f58c8ae
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-10-08 17:17:20 +02:00
Mårten Nordheim
22248a4e96 QNI: Windows: Remove unneeded friend
Change-Id: I5d66a67a5c16a479f62b9f43cb769d5ee5f66b60
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-08 14:46:14 +02:00
Joerg Bornemann
01bfed1d0a CMake: Generate relative #line directives in qlalr output
When passing an absolute input file name to qlalr, the #line directives
in the output will contain absolute paths.  For reproducible builds,
it's desirable to have relative paths.

Pass the input file as relative path to qlalr to produce relative #line
directives.

Fixes: QTBUG-96267
Change-Id: I4ef1e4d5be7cbaf25a54a34ab7c2dbec06411a1d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-08 14:16:52 +02:00
Joerg Bornemann
08a0ba5733 Doc: Prettify -G cmake arguments in SQL drivers documentation
Use '-G Ninja' instead of '-G"Ninja"'.

Pick-to: 6.2
Change-Id: I53a77ea3b2d1547bb516b3ab756f5ae0f24092b1
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-10-08 14:16:51 +02:00