Commit Graph

49128 Commits

Author SHA1 Message Date
Volker Hilsheimer
61574ee963 Remove documentation for removed qHash overload
QPair is an alias to std::pair in Qt 6, so no need for two qHash functions.
Also remove note and snippet from std::pair overload documentation.

Change-Id: Ica8f6961af1eac493e909ad06fe46f8f68542bc5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-10-29 09:48:15 +01:00
Karsten Heimrich
173615222a Doc: Scrub QByteArray/QByteArrayView documentation
Fixes: QTBUG-86555
Change-Id: I3221e0de10e692ca767eeb69daa82da55b93e395
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-10-29 09:26:33 +01:00
Jerome Pasion
b961fb42e2 Change terminology to "look and feel"
-should be "look and feel"

Task-number: QTBUG-88010
Change-Id: Icd71c84e2331faa317a228cdbaaa82e7598b781f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-10-29 09:26:05 +01:00
Assam Boudjelthia
950e628fd8 Android: replace stacktrace with debug message in search for setActivity
Don't print stacktrace when setActivity is not found but only print a
debug message, QtActivityDelegate will continue to look for setContext
which might actually be a problem if not implemented.

Fixes: QTBUG-86733
Pick-to: 5.15.2
Change-Id: Iaf7f347ae04605a1f616f24d25cac4938c1640a4
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2020-10-29 08:00:05 +00:00
Assam Boudjelthia
90912b657e Android: disable Gradle caching by default
If enabled by default, the cache size will grow quickly, especially
if multiple different projects are managed every day. Keep the option
commented, which can be enabled manually by the user.

Pick-to: 5.15.2
Change-Id: I6d4a67f4f1bb3e37b02de7ff4c534ec4d006f9a3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2020-10-29 07:59:32 +00:00
Tapio Oksa
2ff546e030 [Android] Request cursor to be in proper position
Cursor were set to incorrect position (-1) causing first character overwrite in password field,
fixed by setting position to '0' for the first character

Fixes: QTBUG-85090
Pick-to: 5.15
Change-Id: Ia2333803d5fe8f274f1ad1a643e4ff5aa8556b81
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-10-29 07:54:38 +00:00
Kai Koehne
342cc61d3e CMake: Support installing extra cmake files for tools
Add an EXTRA_CMAKE_FILES argument to qt_internal_add_tool()
that allows tools to install an additional Macro.cmake file.

This is modelled after similar functionality in qt_internal_add_module.

Task-number: QTBUG-87870
Change-Id: I80838b8966f1018fdd379b1da877b6bc418de075
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-29 08:53:07 +01:00
Volker Hilsheimer
7372dde4ec Math 3D classes: make comparison operators hidden friends
Reduce ADL noise from QVector2/3/4D and from QQuaternion. Also mark as
noexcept.

Task-number: QTBUG-87973
Change-Id: Id14fd17c0da43517766b218ed85c3b41f91b43c8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-10-29 08:51:44 +01:00
Volker Hilsheimer
2222e695fc QMetaMethod: Make comparison operators hidden friends
Reduce ADL noise.

Change-Id: Ic747c2d76b7ce66b222e08eeaf6f1d193ba99f81
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-29 08:51:26 +01:00
Volker Hilsheimer
5866b82e24 Fix documentation for QTest touch APIs
Change-Id: Ifd9a3161e8ee422f8b0ce3adba8ae1b029c096d1
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-10-29 07:13:34 +01:00
Eskil Abrahamsen Blomfeldt
a332f3fabc Fix delay first time a font is used
Since 066daf750f, we would mistakenly populate the
fallback list for all ensureAt(index) calls, even when index == 0. This index
indicates the main font, is always valid and does not require knowledge of any
fallbacks.

On Windows (and other platforms where QPlatformDatabase::fallbacksForFamily() is used)
this would cause all fonts on the system to be loaded and should only be done when
we actually need one of the fallbacks.

With the GDI font database, in which font loading is slow because we have to manually
read font data, this is especially bad. If we can later move to using DirectWrite
for this, we should be able to improve on it, but in any case there is no need to
pay the cost of the fallbacks when the application is just using the fonts it has
selected (memory-wise this is also a bad idea). On my machine a simple text layout
went from 370 ms to 37 ms.

[ChangeLog][Text] Fixed an issue where on some platforms, there would be a delay the
first time any font was used, sometimes causing a visible delay in the UI.

Fixes: QTBUG-71737
Pick-to: 5.15
Change-Id: Ie8ce9b73f02a0e5cf39a2b280968b89f4caaf39e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-10-29 07:06:50 +01:00
Hiweed Mandriva
b75d60abd2 doc : remove redundant ')'
Change-Id: I84a1a08889e04b4d6a33384a3f91d5bf3976871c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Hiweed Mandriva <hiweedmandriva@163.com>
2020-10-29 10:47:16 +08:00
Hiweed Mandriva
300953ed9e doc : fix typo 'consise' => 'concise
Change-Id: Ife2fc3b61b03b741b41bd703c3caf8180c6868fa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-29 10:47:16 +08:00
David Skoland
7d0faad43c Initialize values in collection tests
This silences a compiler warning

Change-Id: I8d01b5d008ab4f90d5551fef522e2e3c3adb02ba
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-28 22:19:05 +01:00
David Skoland
913c0d56e5 Update tst_qspinsbox test to use metaType system
Change-Id: Ib744a1ceb3d90ae443ee754f97c0ef1edbbac52f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-28 22:18:53 +01:00
David Skoland
56a1a645ac Update tst_qguivariant to use QMetaType
Change-Id: I4c789ecfc9f4613bd4820a8a6530249c51344a83
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-28 22:18:45 +01:00
Volker Hilsheimer
be10808279 Make QAccessible::State's equality operator a hidden friend
Reduce ADL nose.

We already have an inline default constructor calling memset, so can have
the comparison operator calling memcmp also inlined.

Task-number: QTBUG-87973
Change-Id: If8e0ae98b0c44fc3fddac7ef57c5ff021c80dad6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-10-28 22:15:05 +01:00
Volker Hilsheimer
a45a3b1ece Make comparison operators in gui/painting classes hidden friends
Reduce ADL noise from QColorSpace, QPageSize, and QPageLayout with the
help of a private equals method.

Change-Id: I0082597dd216b982e8d8eb5a4bd7dd29a5d3263b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-10-28 22:14:56 +01:00
Volker Hilsheimer
979c8cf1b7 Always return initialized data from QBindable::value
clang warned about result being uninitialized if iface is nullptr. Return
a properly initialized result in that case as well.

This might break RVO, but the alternative is to always initialize result,
even if we are going to call the getter anyway, which I assume would be
more expensive.

Change-Id: I5d6d243b3094b79bf021725d017be5c72b1089bb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-10-28 22:14:37 +01:00
Fabian Kosmale
bcd2f3f99e Add QVariant/meta-type system migration guide
Fixes: QTBUG-87100
Change-Id: Ib87b8d566f11bf226345101f665c675489a06d6a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-10-28 20:37:50 +01:00
Volker Hilsheimer
39aa070e96 QSurfaceFormat: Make comparison operators hidden friends
Reduce ADL noise. Also add noexcept.

Task-number: QTBUG-87973
Change-Id: I83787264b00b084ecdc85b6b3c2a8d95db94a05e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-10-28 20:36:18 +01:00
Volker Hilsheimer
a3d71792ca Make comparison operators hidden friends
Reduce ADL noise from QKeyEvent, QKeySequence::StandardKey, and
QPointingDeviceUniqueId.

Task-number: QTBUG-87973
Change-Id: Ib4a3190d03046949acb25b3fe68c611689b82565
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-10-28 20:36:12 +01:00
Kai Koehne
9b35f22b58 Doc: Remove mentioning of old macos versions from QSettings
The specific mentioning of macOS 10.2, 10.3 goes back to Qt
4 times. Anyhow, both versions aren't supported anymore, and
the logic in qsettings_mac.cpp is the same for all versions.

Pick-to: 5.15
Change-Id: Ibac503cb7c8563dec8560cc41c471c1db0f20566
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-10-28 17:15:09 +01:00
Kai Koehne
1f6543902d Fix qdoc builds for non-top-level developer builds
Fixes a regression introduced in commit 748b3b9c89 for builds
that are both not a QT_SUPERBUILD and not QT_WILL_INSTALL.

Change-Id: I52b920176a2696fa6206b89b2b69ae1a7f3fbc25
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-28 17:14:57 +01:00
Tor Arne Vestbø
5c2656cfb6 cmake: Allow specifying module 'uses' entries
Change-Id: Iee02654e0f52e36e026b8074e0eacb0ea1804685
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-28 16:52:32 +01:00
Liang Qi
53da9f5816 tests: blacklist tst_QUdpSocket::multicast() on CentOS
Task-number: QTBUG-84254
Change-Id: Icf50e7c85a0434ecdf29ae70776b274789b9eb45
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-10-28 16:13:33 +01:00
Allan Sandfeld Jensen
375a8b735b Remove qstring_compat left-over
Was missed when it was removed

Change-Id: I36c33be9240fa5567a65488d6fd0e14b8c3ad8cd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-10-28 15:57:34 +01:00
Andrei Golubev
6b0330317c Fix QList snippets to use qsizetype instead of int
Task-number: QTBUG-86553
Change-Id: I37e9607e014deaeebfa9fddf2e49a04ee2194cce
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-28 15:45:53 +01:00
Allan Sandfeld Jensen
5dc1780369 Pass SameSite through QNetworkCookie
It is an important new details in cookies, as a minimum pass it through,
before we add API for it.

Pick-to: 5.15
Change-Id: I5222a24e0f50f3822a94cce126b5055fed1a8008
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-10-28 16:42:12 +02:00
Jarek Kobus
c34673e5d9 QtConcurrent: Handle running with promise inside QTaskBuilder
Please note, that in case of run with promise it doesn't make
sense to provide the overload taking the FutureResult, as if we are
going to ignore the returned QFuture object, we can't communicate
with the passed QPromise.

Fixes: QTBUG-87083
Change-Id: I4066506736c2bbeea3e42030b9495f13e06cb27e
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-10-28 15:38:52 +01:00
Jarek Kobus
cf043a785a QtConcurrent: Integrate runWithPromise into run
Change-Id: I6eb95aa66ff847e8bb9aac348fded3a5d55015b6
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-10-28 15:38:44 +01:00
Konstantin Ritt
bb8c24e467 QFontEngine: get rid of userData() trickery
it is only used by QWin32PrintEngine and we know for sure
QWindowsFontEngine::handle() returns HFONT

Change-Id: I7656801e4642caf7df612d2f686061dca92707e0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-10-28 17:27:37 +03:00
Andrei Golubev
f9f2107cef Clean QList documentation
Updated QList documentation pieces:
- Several descriptions revised
- Irrelevant things removed
- Descriptions wrapped at 80 characters

Task-number: QTBUG-86553
Change-Id: Ic6de44520a76677aa5e8d9e91caa03e5aa198812
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-10-28 15:27:37 +01:00
Timur Pocheptsov
524b19fc23 Selftest - copy XAUTHORITY environment variable
Otherwise XOpenDisplay in a newly spawned process may fail with
a 'No protocol specified' message (as it recently happened in
CentOS 8.1 vm).

Fixes: QTBUG-87621
Pick-to: 5.15
Change-Id: Ib6c08c7f154fb2a126d32a4aa52b535e5daa1589
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-10-28 14:27:37 +00:00
Edward Welbourne
07ff70a0da Remove QItemSelectionRange's operator<()
As advocated in a ### Qt 6 comment.

[ChangeLog][QtCore][QItemSelectionRange] QItemSelectionRange no longer
supports ordering. The prior ordering was inconsistent with equality
and should not be needed.

Task-number: QTBUG-85700
Change-Id: I5eb372c203cae19db40fa67f706d911785652d5f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-10-28 15:27:37 +01:00
Edward Welbourne
29c113d912 Deprecate ordering on QItemSelectionRange
Ready for removal at Qt 6, as advocated in a ### comment.
It was never done consistently with operator==(), apparently, and
should not be needed in any case.

[ChangeLog][QtCore][QItemSelectionRange] Ordering of
QItemSelectionRange is now deprecated. It was not consistent with
equality and should not be needed.

Task-number: QTBUG-85700
Pick-to: 5.15 5.15.2
Change-Id: Ie99294bd7fc18f2a497598ae08840886b0a6d62d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-10-28 15:27:37 +01:00
Joerg Bornemann
da1854c683 CMake: Re-work documentation targets
The top-level prepare_docs target is supposed to run before the
generate_docs target.

The repository-level targets like prepare_docs_qtbase now also run
before their respective generate targets.

To achieve that, several intermediate targets had to be introduced.
The dependencies for top-level generate_docs look like this:

              /--> generate_top_level_docs_Core --\
generate_docs ---> generate_top_level_docs_Gui  -----> prepare_docs
              \--> ...                          --/

The dependencies for repo-level generate_docs_<repo> look like this:

                     /--> generate_repo_docs_Core
generate_docs_qtbase ---> generate_repo_docs_Gui
                     \--> ...

generate_repo_docs_Core --\
generate_repo_docs_Gui  -----> prepare_docs_qtbase
...                     --/

Analoguous for qch_docs.

And last but not least, the module-level generate_docs_<module> depends
on prepare_docs_<module>, just like before.

The strangely named top-level install targets have been renamed to
install_html_docs, install_qch_docs and install_docs.

The html_docs target is now merely an alias for generate_docs.

Apart from prepare_docs, the top-level targets do not depend on the
repository-level targets anymore. Targets that are just an alias (docs,
install_docs, ...) have been re-defined to depend just on the respective
top-level targets.

Fixes: QTBUG-87758
Change-Id: I24466d3a252d518a30a2064bf876be881c46231f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-28 10:38:28 +01:00
Mårten Nordheim
dfca01e186 Update the HTTP example
- Extended the documentation talking about it
- Initialize members in the header rather than in the ctor
- Some formatting changes
- Prefer connect-ing to QNetworkReply rather than QNAM for sslErrors
    - Because we didn't use the QNetworkReply* argument
- Put the QNetworkReply pointer in a managed pointer
- Removed the code explicitly handling a redirect (it's the new default)
- Edited HttpWindow::httpFinished so that there're less places to reset
    the reply pointer
- Updated some ifdefs I didn't update when I was revamping this example
    3 years ago

Task-number: QTBUG-87306
Change-Id: I10a6f756c09908f199ac9c61e28b49625af10105
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-10-28 08:48:26 +02:00
Mårten Nordheim
cf03874dbb qsslsocket_schannel: update QMutexLocker usage
Following 77d812683f QMutexLocker is now a
templated class which should in most cases be deduced automatically.
Doesn't work here because of the global static wrapper.

Change-Id: I62fda0651eac12f3234396cb7e41a26df8cc8b46
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-10-28 07:48:24 +01:00
Mårten Nordheim
205629bb62 QByteArray: make (ap|pre)pend(const QByteArray &) consider reserved
Append was previously optimized for lhs being empty but it should've
also taken into account if space had been reserved.
Apply the same optimization to prepend while we're at it.

Change-Id: I5e5d33a3189b9ad88d45e858a2ac412cbc294f79
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-28 08:48:23 +02:00
Edward Welbourne
2c4874be40 Deprecate old aliases for two countries and several languages
[ChangeLog][QtCore][QLocale] Deprecated several Language and Country
aliases, ready for removal in Qt 6.0, in favor of their newer names.

Task-number: QTBUG-84669
Pick-to: 5.15 5.15.2
Change-Id: Iebaa0a5a77bfa12f7014de53fab4a25b5f1cc92c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-10-28 06:26:01 +01:00
Edward Welbourne
2575a8ced3 Deprecate QLocale::Language entries that no locale data relates to
These are languages for which CLDR does not even recognize the claimed
language code (three-letter codes except for bh = Bihari, which might
be an old name for bho = Bhojpuri, which CLDR does give, but provides
no locale data using it).

[ChangeLog][QtCore][QLocale::Language] Many obsolete language names
are now deprecated in preparation for removal at Qt 6.0. No data has
been available for any locale using these languages since CLDR v29 (at
least; Qt now uses v37).

Task-number: QTBUG-84669
Pick-to: 5.15 5.15.2
Change-Id: I2bf2d49211ade7cc511277f35fb1a247e7048b31
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-10-28 06:25:47 +01:00
Timur Pocheptsov
3857f104ca QMacStyle - more pixel refinements
There is 1 pixel of a rounded corner visible both on NSButton and
NSPopupButton in a tab widget (all orientations) - adjust the rectangle
for this.

Pick-to: 5.15
Pick-to: 5.12
Task-number: QTBUG-86513
Change-Id: I5e203adc583d2fba6323b18328ccbc8b0c0666ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-10-28 05:54:57 +01:00
Volker Hilsheimer
7ae1dcbb04 Remove QT_NO_FLOAT16_OPERATORS macro
It's documented to be a workaround for VC++2017 and earlier, which are
all not supported in Qt 6 anymore. VC++2019 does not show the problem.

Change-Id: Ie66b303a75bb5791675fc9e62bf4a84510068d6d
Reviewed-by: Keith Kyzivat <keith.kyzivat@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-28 00:25:58 +01:00
Tor Arne Vestbø
e24be7b6c3 cmake: Avoid -NOTFOUND suffix in module pri config
Change-Id: I1407a661c482d918dd143f291ee648bc7b18feef
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-28 00:22:30 +01:00
Tor Arne Vestbø
1ce3a89487 cmake: Add missing aliases for entrypoint implementation
Change-Id: I2fda3a84ca2d12f74b68a8bbe6c6ae9cd04b5aea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-28 00:22:27 +01:00
Tor Arne Vestbø
ba661f6bf1 cmake: Don't limit qt_internal_add_cmake_library to tests
Change-Id: I2dbe8075de6704a7a6557b877dc279a4b4cddd54
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-28 00:22:22 +01:00
Tor Arne Vestbø
598e873c84 cmake: Don't add module header for interface libs without headers
Change-Id: Ifba869586a65f28d5ff47bb2c01ce638110f493f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-28 00:22:19 +01:00
Elvis Lee
4b899a29fa webOS: Support mapping evdev keyboard and touchscreen to specific window
First we refactor QTouchOutputMapping into a QOutputMapping base class and
a QDefaultOutputMapping subclass, because it will be used to map more kinds
of devices, not only touchscreens.

On WebOS, the plan is to have a custom subclass that overrides an
additional windowForDeviceNode() virtual function, so that events from
specific devices can be sent to specific windows.  But in the future,
Qt may have a more generic mechanism for mapping devices to screens,
and of course windows are displayed on screens; so this direct
device->window mapping is likely to be temporary.

In the QT_QPA_EGLFS_KMS_CONFIG JSON configuration, symlinked device
nodes are now supported.

Task-number: QTBUG-85268
Change-Id: Id1f0bb59f4a439abaec6bd35016c95de1cbdb26a
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-10-27 23:37:41 +01:00
Volker Hilsheimer
fd8e6a203e QPushButton: if mouse tracking is off, ignore state only updated when tracking
Amends 3310e13a17. The explicit hovering state
is only updated when handling MouseMove events, and those are only
delivered when mouseTracking is set. Without mouseTracking set, the state
was always false, and QPushButton didn't set the MouseOver style flag.

Ignore the new state if mouse tracking is not set.

Task-number: QTBUG-87706
Change-Id: I2718fb23c206fd8dfd427edc987ff193ba1be8a0
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-10-27 22:29:05 +01:00