summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* qsocks5socketengine: use qintptr when referring to socket descsMårten Nordheim2020-12-011-1/+1
| | | | | | | | One patch from many years ago already did most of it, but the key of the hash was still int. Change-Id: I557fa19d2573addbef7557d1a16fdd6554a117cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSocks5SocketEngine: Add missing return on errorMårten Nordheim2020-12-011-0/+4
| | | | | | Change-Id: I199b7156c280e02c3ce37bd72ba0dc1febf10fe9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QDuplicateTracker: add testsMårten Nordheim2020-12-016-0/+211
| | | | | | | | | | It didn't initially have tests. To avoid relying on realizing breakage implicitly through other classes we'll just add tests instead. Task-number: QTBUG-88183 Pick-to: 6.0 Change-Id: I7449dc1f9a118d4b7a8158a2c34563dbd9c43c66 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* CMake: Allow WIN32 and MACOSX_BUNDLE arguments for qt6_add_executableCristian Adam2020-12-011-0/+1
| | | | | | | | | | | | | | | qt6_add_executable will forward all arguments to add_executable, which works fine on Windows and macOS in regards of WIN32 and MACOSX_BUNDLE arguments. On Android however add_library is being used, and those arguments need to be removed otherwise they will be consided as source files. Pick-to: 6.0 Fixes: QTBUG-88926 Change-Id: Id22fdf91d58d9053eaad2d3c080ea72060d928c0 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Cosmetic stroker: avoid overflows for non-finite coordinatesEirik Aavitsland2020-12-011-0/+2
| | | | | | | | | | | | | | int overflows are usually avoided by clipping the qreal coordinates to the device rect. However the clip function did not handle inf or nan coordinates, so such values would be passed on. Fix by treating any line with such coordinates a fully clipped away, i.e. rejecting it, since it cannot be meaningfully stroked anyway. Fixes oss-fuzz issue 25330. Pick-to: 6.0 5.15 5.12 Change-Id: I4646172fc7a7e0a3a5f5cf03ce10ff0fb56b0d03 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Robert Loehning <robert.loehning@qt.io>
* Disable some OpenGL and QRhi tests for offscreen backendAndreas Buhr2020-12-013-1/+11
| | | | | | | | | | This patch disables four failing unit tests when executed with the offscreen backend. Change-Id: Ie67341b886984e6de19cd8dd8a8a237a620a1b7a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix documentation of QMetaType::TypeFlagAndreas Buhr2020-12-011-1/+1
| | | | | | | | | | | QMetaType::TypeFlag::IsQmlListType was renamed to QMetaType::TypeFlag::IsQmlList . This change was not reflected in the documentation. This patch adapts the documentation to this change. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: I70be218f5f72b42aacb15ecd46972d5c808d86de Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: fix indentations in Qt6AndroidMacros.cmakeAssam Boudjelthia2020-12-011-11/+8
| | | | | | Pick-to: 6.0 Change-Id: I1403101fb2ab6a25ab1a2258f9a832f706b8b547 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: print tailored warning if qml dependency path is a dirAssam Boudjelthia2020-12-011-0/+6
| | | | | | | | | androiddeployqt might be misleading when the path is adir and the warning says that the file does not exist. Pick-to: 5.15 Change-Id: I1129f49af58a0637a240fcfd425a61b2ed15c840 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Android: avoid reflection with ClipData addItemAssam Boudjelthia2020-12-011-22/+5
| | | | | | | | Task-number: QTBUG-81687 Pick-to: 6.0 5.15 Change-Id: If07fff6f371d2c05cb61a1a7695c96219d0260d2 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CMake: don't add empty QT_ANDROID_APPLICATION_ARGUMENTS to JsonAssam Boudjelthia2020-12-011-2/+4
| | | | | | Pick-to: 6.0 Change-Id: I471da3f733046aeaa8381bbdeeba3ee2775b97eb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix qdoc warning about unknown commandsAndreas Buhr2020-12-011-3/+3
| | | | | | | | | | | Qdoc generated warnings like the following: qt6-changes.qdoc:771: (qdoc) warning: Unknown command '\w' This patch correctly escapes backslashes to fix these warnings. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: I7849f49fd0e950c3c366cfa88b299f827b39c05a Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix compiler warnings from mixing signed/unsigned intsVolker Hilsheimer2020-12-011-3/+3
| | | | | Change-Id: I146203dd8b6dddabc0a7cf4b3db8a3fd379fc0c6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* tst_QSslError: improve the code coverage, as pointed at by LCOVTimur Pocheptsov2020-12-013-38/+98
| | | | | | | | | | | | | And also, reduce the utter sloppiness, weirdness of the test and make it more a test and not a joke. Since the test itself depends on !QT_NO_SSL, why bother building and running its main, to create a useless tst_QSslError and do nothing then? Exclude test from no-ssl build. Pick-to: 5.15 Pick-to: 6.0 Change-Id: I67879b0de036cbc8c2f75a18f4cf94e6c43c5af0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Make \youtube macro work with litehtml help backendTopi Reinio2020-12-013-3/+8
| | | | | | | | | | | | | Unlike the QTextBrowser backend, litehtml does not render elements inside <iframe> correctly. This prevented external links to YouTube from working in offline documentation. Move the <iframe> to a macro override specific to online doc builds. Pick-to: 6.0 6.0.0 Fixes: QTBUG-88975 Change-Id: Iff7828ddeed353620eaa9ac669a3e0c03749daa2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add instructions to build documentationToni Saario2020-12-012-0/+42
| | | | | | | | | | | | This enables documentation building in add-ons and other modules that need to build docs. Task-number: QTQAINFRA-3972 Change-Id: Ic2763d6d36d26e5a1267b312727c3c268ad6d114 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit e84e85dd4c59f2c79f81ba4d8d7f04397eb0003c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Discourage the foreach keywordOle-Morten Duesund2020-12-012-63/+110
| | | | | | | | | | Stop endorsing the foreach keyword, suggest C++11 range-based loops instead. Task-number: QTBUG-86584 Pick-to: 6.0 Change-Id: Icaf537aded6557b7864d731217e967ac56a84928 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix perfect forwarding of callables in QFuture's continuationsSona Kurazyan2020-12-012-28/+40
| | | | | | | | | | | | Use universal references instead of rvalue references for passing callables in the implementations of QFuture's continuations. Change-Id: I1288c78f78f84f30c6607e505e7f9807a9272071 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit b002722dabef794da0e80010b115b2c6cd6dc6b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMetaProperty: Enable constructing only DataFabian Kosmale2020-12-012-3/+13
| | | | | | | | | | | Constructing a QMetaProperty can be unnecessarily expensive due to the QMetaEnum resolution. Add a private method to construct only QMetaProperty::Data. Make us of it in indexOfProperty. Task-number: QTBUG-82931 Change-Id: If954538106bcfaa7d088db26591f6bd6eeaf3731 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify the safeguarding logic in notify()Lars Knoll2020-11-303-118/+80
| | | | | | | | | | | | | | | | | | The logic in notify() was doing quite a bit more work than it needed to. By inserting a dummy node after the current one instead of replacing it, we can avoid half of the data shuffling that has been happening and also don't need a back pointer when executing the notification. Also avoid calling a semi expensive destructor of QPropertyObserver. Reduces the overhead of notify() by ~30%. Change-Id: I7ce16bcf9cd9c4368c18bf875fc959223452fd4f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit e8ef871e3522f340b4efe32382af7e35ef908665) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Inline the fast path for removeBinding()Lars Knoll2020-11-302-10/+17
| | | | | | | | | | | Save a function call in the common case where we don't have a binding This makes a rather large performance difference for setters that do not have a binding. Change-Id: I140f29790f6fe868721a33b9fad37205e547b8e9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit c63901c5f3195596eb81e5f5ae5483ca5a0b6d35) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Smaller cleanup in QBindingStorageLars Knoll2020-11-301-11/+11
| | | | | | | | | Unify code paths and avoid excessive code generation. Change-Id: I4a54234dd322bba380cc45d4f9c97d97a0c93303 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 65759c9867321d978c1f98f5cf66bef11c8f5c15) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Inline the fast path of a few methodsLars Knoll2020-11-303-18/+37
| | | | | | | | | | No need to do function calls for the case where we return immediately after checking a boolean. Change-Id: I3e449850a10fcf82acb843cce6da6dfd98de32ad Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit e165f416a752398079590161a18255f9a0058a3e) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove ExtraBit and FlagMask from QPropertyBindingDataLars Knoll2020-11-303-22/+11
| | | | | | | | | | They are not needed and removing it can simplify the code in some places and avoid a couple of masking operations. Change-Id: I0e4241a2784026aa89deed35f408b094e89a11a0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit b1be6e6e6f355bfcb0c3814516f6009c91d2de89) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Inline the QPropertyBindingPrivatePtr destructorLars Knoll2020-11-302-4/+8
| | | | | | | | | | In many cases, it only derefs and does nothing else. Inline the fast code path. Change-Id: Ib605c385c1683f7833f7189c84d6cf4eb5b0e59e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit eda4c29eb26dab32e22040bdda0b9b9109b1408b) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Optimize code in QTaggedPointerLars Knoll2020-11-302-7/+6
| | | | | | | | | | | | | | | Don't execute instructions that will never do anything. Directly add the tag to the pointer in the constructor to avoid additional masking operations, and avoid a masking op that is in practice a no-op in setTag(). Do the same optimization in QTagPreservingPointerToPointer. Change-Id: Ia364f89cbe6ccc876ec9bda0c239fc4f57c10501 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 2721728c9056b442c0281f20792f19eb6a491aa0) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Inline access to the QBindingStorageLars Knoll2020-11-308-42/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | And inline the fast checks inside the methods in QBindingStorage. This allows QObjectBindableProperty and friends to inline all the fast checks and almost completely eliminates the overhead for property accesses when no bindings are being used. Read and write times of QObject based properties when no bindings are being used: Read Write Old style property: 3.8ns 7.3ns QObjectBindableProperty (no notification): 4.5ns 4.3ns QObjectBindableProperty (with signal): 4.5ns 7.6ns QObjectBindableProperty (inline accessors): 3.2ns 3.4ns Numbers without this patch: Old style property: 3.8ns 7.9ns QObjectBindableProperty (no notification): 7.2ns 7.7ns QObjectBindableProperty (with signal): 7.2ns 16.0ns QObjectBindableProperty (inline accessors): 6.3ns 6.7ns Change-Id: Ifd1fa3a489c3be8b1468c0b88af547aac397f412 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 98c82fb445acf45cc4c4bc86a5adda43358127bf) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Fill QT.<module-name>.uses entries in module .pri filesJoerg Bornemann2020-11-302-5/+38
| | | | | | | | | | | | | | | | Those entries were always empty. The INTERFACE_QT_MODULE_USES property was never set. Map each public dependency to its qmake lib name and place this value into the module's QT.<module-name>.uses variable. Take into account the "_nolink" target modifier and translate it to qmake's "/nolink". Pick-to: 6.0 Fixes: QTBUG-88951 Change-Id: Ib6ef65b842a1fe1da3ade55867583343b4ee76ee Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Rename internal variableJoerg Bornemann2020-11-302-2/+2
| | | | | | | | | | | Rename QT_QMAKE_LIB_TARGETS_foo to QT_TARGETS_OF_QMAKE_LIB_foo, because we want to introduce the counterpart QT_QMAKE_LIB_OF_TARGET_bar in a subsequent commit. Pick-to: 6.0 Task-number: QTBUG-88951 Change-Id: I33f00f4fe65c5977da6e74c632ebeab3b891c89a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Do not discard empty QMAKE_LIBS_FOO entriesJoerg Bornemann2020-11-301-8/+8
| | | | | | | | | | | | Consider a qmake lib 'foo' that doesn't have entries in QMAKE_LIBS_FOO. Then we must not discard this entry in the generated module pri file, because otherwise any attempt to QMAKE_USE 'foo' will fail with the error message "Library 'foo' is not defined.". Pick-to: 6.0 Task-number: QTBUG-88951 Change-Id: Ibed283857f5f66b1b79459fe7b7cf06c7ce0691d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix QMAKE_LIB of WrapOpenSSLHeaders libraryJoerg Bornemann2020-11-303-3/+12
| | | | | | | | | | | | | | The correct entry for this lib is 'openssl/nolink', not 'openssl_headers'. In configurejson2cmake's helper.py we already have this information encoded such that the no_link_so_name field of 'openssl' points to 'openssl_headers'. Extend configurejson2cmake to take this into account, and re-generate src/network/configure.cmake. Pick-to: 6.0 Change-Id: I9817ea7722503a373d309b7e6fa201448d403e8d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Work around building dbus 'controller' example with qmakeJoerg Bornemann2020-11-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to what has been done in 5138a970f31, we need to adjust the remotecontrolledcar/controller dbus example to be built with qmake. In the CI we first build the examples with CMake in the source directory. That creates some generated source files in the dbus example dir. Then, the examples are (will be) built ouf of source with qmake, and those generated source files will be placed in the build directory. When building with MSVC, there's a peculiarity with nmake/jom's inference rules that lead to picking up the generated car_interface.cpp from the source directory, instead of the build directory. See QTBUG-13496 for details. car_interface.cpp, built with CMake is generated to include car_interface.moc. car_interface.cpp, built with qmake does not have this include, but the build system calls moc on car_interface.h. All this leads to duplication of the meta object for OrgExampleExamplesCarInterfaceInterface, preventing successful linking. Work around this issue by turning off the generation of nmake/jom inference rules. Task-number: QTBUG-85986 Change-Id: I0a6ca9f880b63f05a4e9f2032e44d3b391d8a756 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Re-generate project files in srcJoerg Bornemann2020-11-3012-11/+37
| | | | | | Pick-to: 6.0 Change-Id: I1f5f822d68129490f1a7c495f718aead0b520ca9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Fix is_public_module calculationJoerg Bornemann2020-11-301-5/+19
| | | | | | | | | | | | | | | | | | | write_library_section traverses the parent/child hierarchy of scopes to determine whether the scope belongs to a public Qt module. This doesn't work for scopes that stem from included .pri files, because each included file has its own parent/child hierarchy. We already have an include scope hierarchy in the form of Scope._included_children, but lack a way to get to the including scope. Add Scope._including_scope and adjust the is_public_module calculation to take that into account after hitting the top of the parent/child hierarchy. Pick-to: 6.0 Change-Id: I8fee1cfbf048e7afc6783b0a52eaca75be17072f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add debug information for 'qt_evaluate_config_expression'Alexey Edelev2020-11-301-3/+64
| | | | | | | | | | | | Add '_qt_internal_dump_expression_values' function that dumps all values evaluated by 'qt_evaluate_config_expression'. '_qt_internal_dump_expression_values' doesn't evaluate undefined features, only collect actual values. Fixes: QTBUG-88476 Pick-to: 6.0 Change-Id: I9d09ffbd9f9fa91bc4f36536c58e7f118b06f9b9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QMacStyle - remove vertical adjustment for inactive tabTimur Pocheptsov2020-11-301-2/+0
| | | | | | | | | | While it worked as expected with beta, with final release this thing looks wrong again, especially in the dark mode. Pick-to: 5.15 Pick-to: 5.12 Change-Id: I6857344de897e0f39d9d8e66431635dbe2f4d077 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QSslSocket::verify: do not alter the default configurationTimur Pocheptsov2020-11-304-8/+108
| | | | | | | | | | | | | | | | | | | | | QSslCertificate::verify() has an undocumented and not very desirable property - on some platorms it updates the default configuration, which can be surprising. For example, we deprecated QSslSocket::setDefaultCaCertificates() and recommend using QSslConfiguration::defaultConfiguration(), QSslConfiguration::setDefaultConfiguration(), and QSslConfiguration::setCaCertificates(). If an application does this to select CA roots it trusts explicitly, and then for some reason is calling verify, the application can have its QSslSockets successfully connecting to a host, whose root was not trusted by the application. Also, on Windows, defaultCaCertificates() include system roots already, no need to have them twice. [ChangeLog][QtCore][QtNetwork] QSslSocket::verify - do not change the default configuration Pick-to: 5.15 Pick-to: 6.0 Pick-to: 6.0.0 Fixes: QTBUG-88639 Change-Id: I1cd40b259d0a6dcd15c78d1e7c027ff10859595c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDtls(cookie verifier): make sure a server can re-use 'Client Hello'Timur Pocheptsov2020-11-301-0/+14
| | | | | | | | | | | | | | | | And extend an auto-test for this. When a cookie verification mechanism is enabled, and verifier, indeed, verifies that some datagram is a 'Client Hello' message with a proper cookie attached, we start a real DTLS handshake creating a QDtls object and calling 'doHandshake'. In case cookie verification was enabled, we need parameters from the verifier (it's a crypto-strong 'number' and hash algorithm) to 'lock and load' the TLS state machine in a freshly created TLS session object. This code path previously was only tested manually and was found by LCOV as untested. Pick-to: 5.15 Pick-to: 6.0 Change-Id: Ieacb8c989997999ea10e15bda6ae106a0338b698 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Let QXcbConnection::getTimestamp properly exit when X server quitsSheng Mao2020-11-301-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | QXcbConnection::getTimestamp uses dummy events to get timestamp from X server. However, in some cases, X server shuts down while client tries to get timestamp. In this case, QXcbConnection::getTimestamp keeps getting null event and thus falls into indefinite loop. This fix checks if xcb connection is still valid and use a special xcb_timestamp_t value, CurrentTime (0L), as returned value. CurrentTime should not be generated by X server and if getTimestamp returns this value, it means an "exception" case is triggered. This fix is introduced because in kwin_x11 (KDE project), X server can exit on logout. kwin_x11 should handle disconnection from X server. But the indefinite loop prevents kwin_x11 to process disconnection event and therefore kwin_x11 cannot quit properly. Fixes: QTBUG-88435 Pick-to: 5.12 5.15 6.0 Change-Id: Iaf7ef3f8a35fa8389d22a608e3c49041bf90e1b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Revert "xcb: add xcb-util dependency for xcb-image"Liang Qi2020-11-304-33/+4
| | | | | | | | | | | | | | | This reverts commit 39b1dea2ec5cde9523df61c78dec5d4b195f66d2. 39b1dea2 is wrong, the bug is for static build of qt with static xcb. It adds the explicit dependency of xcb-util 0.3.9, which is not available on Debian yet. Task-number: QTBUG-86287 Fixes: QTBUG-88688 Pick-to: 5.15 6.0 Change-Id: Iffc821f49bdfcad3f2556951d3677c35a7682266 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* tst_QSslKey: remove blacklistTimur Pocheptsov2020-11-302-6/+6
| | | | | | | | | | | And do not run the test with QSslSocket::supportsSsl() returns false - this may mean unresolved symbols and thus missing functionality, like i2d_X509 etc. This also makes cases more like other, that already had those checks. Fixes: QTBUG-87386 Change-Id: If4e9a650ca325b6f70956f532891a4c1d50465c0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Extend container overview documentation, mention Q_DECLARE_TYPEINFOAndreas Buhr2020-11-302-3/+33
| | | | | | | | | | | | The container overview documentation did not mention Q_DECLARE_TYPEINFO and the related optimizations. This patch adds a short paragraph about it. Task-number: QTBUG-86584 Pick-to: 6.0 Change-Id: I5b0b8ce92a47da5f0398cc413fbf3e07b0921e59 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Add widget-based test for TouchCancel eventKirill Burtsev2020-11-301-1/+83
| | | | | | | | Follow up for 45a65cbeb2 Pick-to: 6.0 Change-Id: Idb4f4eaaa3ee583462430c530f88a4cc32378d6c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_QSslCertificate - improve code coverageTimur Pocheptsov2020-11-306-1/+216
| | | | | | | | | Some code-paths were never executed by auto-test, thus giving us LCOV's diagnostic. Extend existing tests and add new ones. Pick-to: 5.15 Change-Id: I648747547f0525a482216b1e1972fcc698c73f65 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Fix various documentation warningsTopi Reinio2020-11-305-15/+10
| | | | | | | | | | | | | - QList iterators are now nested classes inside QList. - Drop reference to Qt OpenGL Widgets landing page, there is no such page. - Fix typos and linking issues. Fixes: QTBUG-86295 Pick-to: 6.0 Change-Id: I964843deb81aa55ff8ddb9a1c2b004cb72e68de9 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix QVector[2|3|4]D documentationTopi Reinio2020-11-301-84/+57
| | | | | | | | | | The \fn commands for friend functions need to include the class scope for QDoc to find the declarations. Pick-to: 6.0 6.0.0 Fixes: QTBUG-88932 Change-Id: Icbb45c12d7d657d95243231148483c00baf07c36 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Document BINDABLE attribute for Q_PROPERTY macroTopi Reinio2020-11-302-0/+7
| | | | | | | | Pick-to: 6.0 Fixes: QTBUG-87036 Change-Id: Ia6067d887b9b697dbcb8e02bce5a560a8ac5eaf3 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Add thumbnail for Widgets Gallery ExampleTopi Reinio2020-11-301-0/+1
| | | | | | | | | | The example won't show up in Qt Creator's Welcome mode without either an \image or a generic thumbnail. Add the latter for now. Pick-to: 6.0 Fixes: QTBUG-88970 Change-Id: Id5ec236ef4760e678921bc2a90608d66ac35394d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QMetaObjectPrivate: Add firstMethodFabian Kosmale2020-11-303-0/+58
| | | | | | | | | | | QMetaObject::indexfOfMethod returns the method corresponding to a specific signature. In QML, we however only want any of the methods with a given name (and do overload resolution at a later point). For this usecase this patch introduces the internal QMetaObject::firstMethod function. Change-Id: Ie3820354edffb273c4cbe1399201a955ebe79344 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QVariant/QMetaType::compare APIsGiuseppe D'Angelo2020-11-3014-29/+511
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::optional<int> is the wrong datatype to use for compare. First and foremost, it can't be used in the idiomatic form of auto r = a.compare(b); if (r < 0) ~~~ // a is less than b if (r > 0) ~~~ // a is greater than b which we *already* feature in Qt (QString, QByteArray). Also, std::optional<int> (explicitly) converts to bool, which is a trap, because the result of the comparison can be accidentally tested as a bool: if (a.compare(b)) ~~~ // oops! does NOT mean a<b Not to mention extending this to algorithms: auto lessThan = [](QVariant a, QVariant b) { return a.compare(b); }; // oops! std::ranges::sort(vectorOfVariants, lessThan); which thankfully doesn't compile as is -- std::optional has an *explicit* operator bool, and the Compare concept requires an implicit conversion. However, the error the user is going to face will be "cannot convert to bool because the operator is explicit", which is deceiving because the fix is NOT supposed to be: auto lessThan = [](QVariant a, QVariant b) { return (bool)a.compare(b); }; // big oops! Instead: backport to Qt the required subset of C++20's <compare> API, and use that. This commits just adds the necessary parts for compare() (i.e. partial ordering), the rest of <compare> (classes, functions, conversions) can be added to 6.1. Change-Id: I2b5522da47854da39f79993e1207fad033786f00 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 3e59c97c3453926fc66479d9ceca03901df55f90) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>