summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add hyperlink to relevant sectionv6.1.0-beta2Paul Wicking2021-03-121-2/+2
| | | | | | | | Fixes: QTBUG-91734 Change-Id: I3910c7fcf1625ad08a65e691a8eaf9ed6b61779a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit b42df9756a8d72cbdfbf72f15e98385b35148eb6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Change section titles that cause bad linksPaul Wicking2021-03-126-18/+18
| | | | | | | | | | | | Section titles are valid targets for QDoc's autolinker. When they are identical to other valid link targets, such as for example a class, these sections may cause invalid links. Fixes: QTBUG-91141 Change-Id: Ie9a6258d2bf83932335976d8c0b5fc59f2028ae5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 5fa8f5df7bb722c5b7451229f5eecd13bd13326f) Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Revert "QPushButton: fix support of style sheet rule for text alignment"Volker Hilsheimer2021-03-112-4/+20
| | | | | | | | | | | | | | | | | This reverts commit 6269438af95bbd988ead08829fa3bc9dc25891e8, and adds a test. This change introduced QTBUG-91735, without fixing QTBUG-86857 correctly. The code already interprets the textAlignment values from the rule, also if no icon is set. Adding the same, or some default textAlignment to the text flags if there is no icon doesn't work. Fixes: QTBUG-91735 Task-number: QTBUG-86857 Change-Id: Iee07e63a40e72909275f32e1caa28b33a595f879 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 674747bac1c8b57d4940de2ee68b6b562dfcad61) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Limit value in setFontSizeFromValue()Robert Löhning2021-03-111-2/+2
| | | | | | | | | | | | | Avoids overflows in QFreetypeFace::computeSize and QFontEngineBox::boundingBox Fixes oss-fuzz issue 30290 Change-Id: If8e9ff74bf706a701e26832ad21b3439a3b437f7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 976fede67ca4a4d322bc8d2c00266a2e2f1a6e3d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QEventDispatcher(Win): Always honor interrupted status to avoid racesMårten Nordheim2021-03-112-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | There may be a race where e.g. thread 'B' is woken up by a queued invoke. At the same time thread 'A' asks 'B' to quit, which will set various atomics (some important ones are 'interrupt' in the dispatcher and 'exit' in the event loop), but it does _not_ try to send another wake since there is already an unhandled wake triggered by 'B' itself. Sadly 'B' reads the 'exit' atomic before 'A' updates it. Then, slightly before, 'B' sets 'interrupt' back to 0, 'A' write 1 to it, meaning 'A's interrupt is ignored. Then, since there is no interrupt, 'B' goes back to waiting for events, leaving the thread alive and running instead of quitting. Maybe this has unforeseen consequences (one consequence is that it will return and re-enter the event dispatcher once more, possible unnecessarily) Fixes: QTBUG-91539 Change-Id: Ie6f861f42ffddf4817d5c8af2d764abe9d9103c2 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit f274f91cebb0a4fd2ebe37bb3a605c47d6acd404) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: use libexec path for rcc for Android deployment settings fileAssam Boudjelthia2021-03-111-1/+1
| | | | | | | | Task-number: QTBUG-88791 Change-Id: Ie34278496e0c23a8301e7ab0f2e33e36f393d1d8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 15c2a79f19bdc3f0c0700aab1077950c2f99cf25) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qguivariant benchmark: Only use valid QMetaTypesFabian Kosmale2021-03-101-2/+5
| | | | | | | | | | Otherewise, we hit an assertion because the name is empty. Fixes: QTBUG-91709 Change-Id: I03a530d64ea8dead3efc5fcb8c00909388a387d0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 3e46c22d943233554be8897ddda191cdfdb5e44e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_bench_qguimetatype: only consider valid metatypesFabian Kosmale2021-03-101-2/+5
| | | | | | | | | | | Otherwise the benchmark crashes as the data tag for the row would be empty. Fixes: QTBUG-91708 Change-Id: I484ded5b8670571b80012e64d67846d3b8db5320 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 90dc1f9204b8f44302b57392ba2fbfdc3653bdf2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: metal: Avoid unused argument warning on iOSLaszlo Agocs2021-03-101-0/+3
| | | | | | | Change-Id: I4cb729f3d8dbe7703b89153b742ce2874f35cfd2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit dd7087342dc73ee7adf7b24fc96f79d9d1056682) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: metal: Use the layer as the single source of truthLaszlo Agocs2021-03-101-8/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...when it comes to the output size. This mirrors what all other backends do. For example, with Vulkan the only source of size is the surface (VkSurfaceKHR), never the QWindow, even though we'd expect that the surface size equals to window_size * dpr, and that's almost always true, but there are exceptions. (e.g. we have seen bugs on Windows with some drivers in high DPI situations where the Vulkan surface did not fully match the window size, yet it is the surface, and only the surface, that matters for rendering, i.e. viewports and such must match the surface, not the native window) With Metal we hit a similar problem on iOS: the QWindow's size*dpr and what we calculate from the CAMetalLayer have a height difference of 1. Mitigate this by making QRhiSwapChain::surfacePixelSize() and the calculation for currentPixelSize() done via the same route (the CAMetalLayer). Otherwise, if there is a mismatch between what the QWindow and the layer says, Qt Quick will think that there is a resize happening (has happened) whenever starting a new frame, and that has far reaching consequences (suboptimal performance, increased memory usage by buffers, etc.) Change-Id: I114df92bf35622c99f2747420fdce401db7705a6 Fixes: QTBUG-91438 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 83fb8fe208ec816df7d04c8247d5696d95f2cab1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: gl: Fix missing uniform data with certain command listsLaszlo Agocs2021-03-103-50/+203
| | | | | | | | | | | | | | | Following patterns from the other backends is insufficient with OpenGL because we do not use real uniform buffers. There is currently a possibility that a shader program will be bound without following it with setting uniforms. Correct this by having a second level of tracking of the associated srb object in the pipelines. Fixes: QTBUG-91630 Change-Id: I74a012daade826dd22c436bde06381c1233bad11 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 80029e0ca65d4bf4575f7a08d186c781ec6c2f0e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make qt_get_module_for_plugin() internal and do what its name saysCraig Scott2021-03-101-12/+7
| | | | | | | | | | | | | | | | | | | Contrary to its name, this command was also setting a target property. Since it was only called in one place and that caller can just as easily set the property instead, rename the command to make clear its internal nature and refactor it so that the caller is responsible for setting that property instead. Also make it an error rather than just a warning if the command is used for a target that doesn't belong to any module. Since this is now unambiguously an internal command, we should always expect the target to belong to a module. Change-Id: I929a652ddd482653868fc9df887f38f4bc7f35d9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit c6bbca748659468b99002ec4b71559c65963b950) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QConcatenateTablesProxyModel: skip dataChanged in hidden columnsDavid Faure2021-03-092-1/+17
| | | | | | | | | | | | | | | | | When the source models don't have the same number of columns, the proxy keeps only the smallest number of columns across all source models. Afterwards, if a source model emits dataChanged in a column past that number (a "hidden" column), the proxy needs to ignore it rather than assert. But also, if the source model emits a dataChanged signal across both visible and hidden columns, then the last column number needs to be adjusted so that the signal is correctly processed and forwarded. Task-number: QTBUG-91253 Change-Id: I939e8ec0faf41370472f86785851292e4372f72c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit f6efbd23b59bcf75866ce47fb762c99f2e4a128a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* configure: Fix error when turning on/off non-emitted featuresJoerg Bornemann2021-03-091-14/+14
| | | | | | | | | | | | | | | | | | Features that are not emitted in the current configuration (e.g. plugin-manifests on Linux) should not yield an error. Instead, print a warning message like Qt5's configure did. Set insignificant feature to OFF. Remove the now unneeded emit_if parameter from qt_feature_set_cache_value. Fixes: QTBUG-88305 Change-Id: I0f2ce152fca5f08417038c9bd2c07639ff6a3df4 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit c4f5762b20dc20bab3cc62e9166d0e5b36e21cc6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move syncqt.pl to libexecJoerg Bornemann2021-03-093-6/+2
| | | | | | | | | | | | | | To not disturb the qmake build we kept syncqt.pl in <src>/bin but installed it to libexec. This is not necessary anymore. This also removes the need for having syncqt.pl in both, bin and libexec in the build dir of qtbase. Fixes: QTBUG-91076 Change-Id: I44b014ea41e3f00c420e02fd5c76f11169340b8c Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit 800f7451406d58910568854deb4dbebbca0ee6d4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* FileChooser portal: send window id in hexJan Grulich2021-03-081-1/+1
| | | | | | | | | | We send window id in decimal, however, it is expected to be send in hex. This causes a mismatch and makes portal dialog to show in background. Change-Id: Ibd77199bbb4a2ad4782a0457ddc5506c6b5608fe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit acaabc9108dfe75530960cf8e3ec4f3602cd82e0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix the crashes when animated QTreeWidgetItems are hiddenQiang Li2021-03-082-1/+27
| | | | | | | | | | | | | | | | | | | QTreeView's drawTree implementation performs lazy layouting when calling itemDecorationAt. If animations are enabled, this can change the list of items, and invalidate the copy made earlier. Don't copy the list of items, use a reference instead so that code iterating over the items later operates on valid data. Add an assert in the private itemHeight method, it must not be called with an index that is out of bounds. Fixes: QTBUG-42469 Change-Id: Ifdb782881447912e00baffd1c407de10a1d8d0d4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f140ef04a0c54c2c8a699db33433b8d7235d137c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* High-DPI: Set the minimum scale factor to 1Morten Johan Sørvig2021-03-082-5/+18
| | | | | | | | | | | | | | | | Avoid painting errors with dpr < 1, also for the PassThrough mode. This limits the minimum high-dpi scale factor to 1, for the code path which determines the scale factor based on screen DPI. Task-number: QTBUG-89948 Change-Id: I14b3f130f0ae141d5f05c87437f926a9f76d1dec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit ee409e6f0cab4aa051f75f7c7116d4b607d137fc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc Build: Do not fail if CMakeCache.txt does not existToni Saario2021-03-071-1/+1
| | | | | | | | | If we skip module build the CMakeCache.txt does not exist. Change-Id: Ic44bddf29f1eef1e6ffc568c871d9d7e7de71f48 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io> (cherry picked from commit 22d692e9e01bcf486e2b268059c30998ca8b06bc)
* Allow disabling module build and building of tests per moduleToni Saario2021-03-071-2/+8
| | | | | | | | | | | This patch enables per module control of the build instructions. This enables documentation building in modules that are not capable of building the module itself on linux. Change-Id: I72b7931c5ffda9bf437a99c27c0bb340665ce927 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io> (cherry picked from commit 6172f3101e6606d48cca8424c5472af1daeefc17)
* Skip globalstatic threadStressTest on QEMUToni Saario2021-03-072-0/+6
| | | | | | | | | | | | | The test causes frequent failures in the CI. This is the most subtle fix until it is properly fixed. Task-number: QTBUG-91423 Change-Id: I6499378dcd3ed1c31275db38d83b572e764366cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> (cherry picked from commit 49e93b6e3928e12507ec7956d66e79a2555c13a8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make qdecompresshelper archive bomb check only trigger for large filesØystein Heskestad2021-03-074-0/+50
| | | | | | | | | | | | | This is to avoid false positives. By default files are large if uncompressed size > 10 MB. Only configurable internally. Also add auto tests. Task-number: QTBUG-91392 Change-Id: I32258cb7c957f2a23a05157ba4ed5c0af2ba585e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit be73ca7eb1cebcc15064666e647bc337b5c2baa2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add documentation for Q_OBJECT_BINDABLE_PROPERTYAndreas Buhr2021-03-071-0/+23
| | | | | | | | | | | | | | | | The duo Q_OBJECT_BINDABLE_PROPERTY and QObjectBindableProperty can only be documented together. The documentation is now with QObjectBindableProperty. This patch adds a documentation entry for Q_OBJECT_BINDABLE_PROPERTY which links the user to QObjectBindableProperty. Task-number: QTBUG-90511 Change-Id: I9af4a99d49f4b02ee9645a2cc9a9a024a6a1a552 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 89cc39a894dddaa0347ecf08438ea31b4880961c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QT_HOST_LIBEXECS for cross-builds on WindowsJoerg Bornemann2021-03-071-0/+4
| | | | | | | | | | | Like for LibraryExecutables, we must default to "bin" on Windows for HostLibraryExecutables in our generated qconfig.cpp. Fixes: QTBUG-91496 Change-Id: Ib5a4b3b3fd6192bd953e615058b482e67ad19462 Reviewed-by: Cristian Adam <cristian.adam@qt.io> (cherry picked from commit 4b9173e3540bd5a80b98be2f41832ae877c2cd1d) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Complete the renaming of qt_add_tool to qt_internal_add_toolJoerg Bornemann2021-03-071-3/+3
| | | | | | | | | | | Fix the name in the function's doc comment and error messages. Change-Id: I918db802a0dbb0508f65d227f7c896d2ad0beeae Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io> (cherry picked from commit 728baba70a389dd13411819a4ec5db6004fb1e97) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Generate information about user-facing applications in build dirJoerg Bornemann2021-03-075-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When packaging different Qt versions for Linux distributions (or any distribution with a common bin dir), Qt tools cannot be installed to /usr/bin, because the executable names of the different Qt versions clash. To solve this conflict, our recommendation is to install Qt's tools to /usr/lib/qt6/bin and to create versioned symlinks to user-facing tools in /usr/bin. User-facing tools are tools that are supposed to be started manually by the user. They are marked in Qt's build system. Distro package maintainers can now configure with -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_BINDIR=/usr/lib/qt6/bin -DINSTALL_PUBLICBINDIR=/usr/bin and will find a file called user_facing_tool_links.txt in the build directory after the cmake run. Nothing will be installed to INSTALL_PUBLICBINDIR. Each line of user_facing_tool_links.txt consists of the installation path of a user-facing application followed by a space and the versioned link name in INSTALL_PUBLICBINDIR. Example content: /usr/lib/qt6/bin/qmake /usr/bin/qmake6 To actually create the versioned symlinks, the content of this file can be fed to ln like this: xargs ln -s < build-dir/user_facing_tool_links.txt Or the package maintainer may decide to do something completely different as suits their needs. This patch adds the USER_FACING argument to qt_internal_add_tool to mark tools as user-facing. In addition, every Qt created by qt_internal_add_app is treated as user-facing. The only tool this patch marks as user-facing in qtbase is qmake. Fixes: QTBUG-89170 Change-Id: I52673b1c8d40f40f56a74203065553115e2c4de5 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit b1ad7f938e2f71288e65a8c9a86b732b89a6a345) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QNetworkInterface/Unix: fix DNS eligibility of global addressesThiago Macieira2021-03-071-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Fixed the reporting the "DNS eligibility" factor (QNetworkAddressEntry::dnsEligibility) for global IP addresses. Previously, QNetworkInterface interface erroneously reported all global addresses as eligible, regardless of whether they had already been deprecated by the OS or were temporary in the first place. From the tst_QNetworkInterface::dump output (netmask & broadcast suppressed for readability, IPv6 prefixes changed to protect the innocent, but the local part is exactly as found on my system): address 0: 192.168.26.33/24 dns-eligible preferred:33546998ms valid:33546998ms address 1: 2001:db8::800/128 dns-eligible preferred:264817000ms valid:264817000ms address 2: fd00::800/128 dns-eligible preferred:forever valid:forever address 3: 2001:db8::2f5b:342c:fc53:b9b2/64 dns-ineligible preferred:12422000ms valid:264817000ms address 4: fd00::9351:adff:333d:5c8d/64 dns-ineligible preferred:12421999ms valid:531402999ms address 5: fd00::7297:9516:fbb4:17ac/64 dns-ineligible preferred:0ms valid:445585999ms address 6: fd00::fdc8:e620:691:3b44/64 dns-eligible preferred:forever valid:forever address 7: 2001:db8::ae82:a01:5a8a:e210/64 dns-ineligible preferred:0ms valid:264816999ms address 8: 2001:db8::c673:e0a2:8927:2118/64 dns-eligible preferred:264816999ms valid:264816999ms address 9: fe80::bd89:b998:4aeb:a5d0%bond0/64 dns-ineligible preferred:forever valid:forever Prior to this commit, only address 9 was showing as ineligible. Addresses 1 and 2 come from DHCPv6 and are thus always eligible. Addresses 3, 4, 5, and 7 are temporary addresses added on account of RFC 4941 and are therefore ineligible (they have the IFA_F_TEMPORARY flag set). Note how 5 and 7 have also stopped being preferred. Address 3 is the one I see when I go to ip6.me and address 4 is the one used to reach the router. Addresses 6, 8, and 9 are the "permanent" addresses that would normally be based on the MAC address of the interface, but are actually in "stable privacy" mode for me (RFC 8064). Address 9 is the link-local one, which makes it ineligible, leaving the other two stable addresses eligible. Addresses 1, 3, 7, and 8 are global, from a DHCPv6-PD delegation from my ISP, which is why they have finite lifetime. Addresses 2, 4, 5, and 6 are from my local Unique Local Address (ULA) prefix, which is why 2 and 6 are valid forever. Change-Id: If8b43dc9678c4b4ba9c1fffd1668fdcae873c6bd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 83876c025674eba9c932c108d355ba40e7789546) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve docs for Qt Concurrent run with promise modeSona Kurazyan2021-03-051-0/+9
| | | | | | | | | | | | | For the readers that are new to QtConcurrent, it may be confusing that unlike the normal usage of QPromise, they don't have to call start() or finish() when using Qt Concurrent run with promise mode. Be more explicit about that. Change-Id: I08df6c4ca41bec4120e208a6643ee20c7adf265c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit fcc453df5cd03a24dad3328d930cc3ef2a1b05ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix a BIC introduced by extending the namespace QSsl in _p.h filesTimur Pocheptsov2021-03-0544-267/+241
| | | | | | | | | Renamed the private part of the namespace to QTlsPrivate. Pick-to: dev Fixes: QTBUG-91531 Change-Id: Id2d9c458d8d958b35e437eee42889177dad0a7a7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Fix section titles that confuse QDoc's autolinkerPaul Wicking2021-03-051-9/+9
| | | | | | | | Fixes: QTBUG-91620 Change-Id: I7c407c7158324d1fbbeb78e47d2198e8ddf5daa0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit c1c61c3bb468b9db7b3bf1ca49e8b71a146ff780) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Simplify code, remove redundant conditionWang Yicun2021-03-052-6/+2
| | | | | | | | | | | 'clazz || (!clazz && isCached)' is equivalent to 'clazz || isCached' Done-with: Tang Peng <tangpeng@uniontech.com> Change-Id: Ie9eab4a94a61be2b360f64980c4666a622f3a209 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit a913002f13d8a2faad512ffda6c70f413b8e7ee5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Protect against self-assignment, plug potential memory leakVolker Hilsheimer2021-03-051-0/+4
| | | | | | | | | | | | | | Fixes static analyzer warning f03d95823e9f1395d64501cc111f0f63 As a drive-by, plug the potential memory leak if the assigned-to QDockAreaLayoutItem already holds a QDockAreaLayoutInfo object. The subinfo is deleted in the destructor, QDockAreaLayoutItem has ownership for the subinfo. Change-Id: I8546adc6fb0537078eea9dfb45d1bd9967d8d149 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 3ae09debab67eecc48721481b76fa11a9f9a383c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: make calling exit() conditional on an environment variableVille Voutilainen2021-03-051-2/+3
| | | | | | | | | Task-number: QTBUG-82617 Task-number: QTBUG-85449 Task-number: QTBUG-83043 Change-Id: I5ac67b5d57550e5a1f816e5db01f4aab31127283 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 6e0ce4ee8005d36ee5d080212b8d83b42ebcae17)
* Doc: Use correct include for QWGLContextPaul Wicking2021-03-051-0/+1
| | | | | | | | Task-number: QTBUG-91500 Change-Id: If487a2d14dd61d127dc35aa039f9b71915128da1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 15f934dcea2743ceb59d3c9ad840e2b00b39d043) Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QMenu test: turn tooltip animations offVolker Hilsheimer2021-03-051-0/+2
| | | | | | | | | | | QTBUG_89082_actionTipsHide() is very flaky if tooltips fade in, as the mouse move might happen while the tooltip is still appearing. Fixes: QTBUG-91532 Change-Id: I55305927fcf143d99dfff28d0bc70b2e831a139a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit d76d8571e2cc9172d2800e4b53f4b6941842dc6a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Convert QDtls classes to the new plugin-based designTimur Pocheptsov2021-03-0411-278/+749
| | | | | | | | | | | | Essentially, the same code re-shuffled and placed behind the new interfaces. Pick-to: dev Fixes: QTBUG-91174 Task-number: QTBUG-65922 Change-Id: I8f14697f10713f9738c5c7805aed0150c084850c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QLabel: simplify createStandardContextMenuVolker Hilsheimer2021-03-041-7/+6
| | | | | | | | | | | | | | | | | If control is nullptr in the beginning, then it will be nullptr later as well, and the function won't do anything. And if the effectiveTextFormat is Qt::PlainText, then the linkToCopy will be empty, and the function won't do anything, either. So we can just handle these cases right away, making the code simplier. Fixes static analyzer warning 43de3f3125108b4353afd94e94f59926. Change-Id: I5b8eb94a1e40c2725de6a168298d8f3bcde748eb Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit e718818745e6db8df09ea55c4071e116f00851c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't access moved-from objectVolker Hilsheimer2021-03-041-7/+6
| | | | | | | | | | | | | | | | | | | | Clang's static analyzer tooling warns about this access-after-move [1]. While the comment above the function indicated that this was deliberate and relying on a moved-from QString being valid, it is still bad practice. Since 'str' is empty in moved-from state if - and only if - it was a non-const reference, make a compile-time check of the constness of type T instead. [1] https://testresults.qt.io/codechecker/daily_analyses/qtbase/dev/qtbase-dev-20210301-e14ccf0553/qstring.cpp_clang-tidy_b0545db57a2cc5dac67a56f76322ffd0.plist.html#reportHash=209ee3db0b17d21919326a1ad6635318 Change-Id: Iac1813b61b6a3c2ef4053b911a4043c5382f85e4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 49113c905d5868e6b76bb6b7b3e0a20b0c56a23a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Stabilize test QMenu::QTBUG_89082_actionTipsHide() on Windows, take 2Friedemann Kleint2021-03-041-3/+5
| | | | | | | | | | | | | | Use the QWindow-based overloads of QTest::mouseMove(), which do not move the cursor position. Amends ba139603925453bf79994eca48b566d8f15b2af0, 3f3d5e6716d9130776b3613ccbd5595de7d4af8d. Task-number: QTBUG-89082 Change-Id: I2cc62e4d1f24e4baebafd0d76fbf0fbdb6f588c7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 65c6fbea242e150d785ea0a7062188fdc090af32) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add nullptr checks to QGraphicsView classesVolker Hilsheimer2021-03-042-19/+23
| | | | | | | | | | | | | | | The styleInfo parameter defaults to nullptr, and the scene can evidently be nullptr since we test for it before ungrabbing the mouse. Fixes static analyzer warnings fbd03604cc701651595a2ea33c5562b4 and 30fcb05194f3a2d121fc57b05e0ccf10 Change-Id: I8e9d4fe4055115c366ada1cbb22a8f0839ba41da Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 98db99657649d4668c766eaa36b8d29c58d19754) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QGraphicsWidget: Check for nullptrs in focus chain handlingVolker Hilsheimer2021-03-041-2/+4
| | | | | | | | | | | | | | | The while loops terminate if focusAfter becomes nullptr (unless we break earlier), so don't dereference those pointers without checking first. Fixes static analzyer warnings 979f2d508db4d5838f6c9b296120ce60 and 481f2ec7b5851bf19414478428f944b7 Change-Id: I60fc5999907fe3b3146d7047ee1eff197719ab31 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 95e34f7fbc0f2e9ca582278f9a772b27ebf93d5f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QGraphicsWidget: don't dereference nullptrVolker Hilsheimer2021-03-041-1/+1
| | | | | | | | | | | | | | Unlikely that one item is nullptr and the other item doesn't have a scene, but we do already test for the scene pointer, so don't continue if it's nullptr. Fixes static analyzer warning f59576ecf6618447c4f9c7be93fc737f Change-Id: I6d436bb1211ddd412821d6978bab25192033f5e5 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit d984fd13adf1592646eafa9912bce44ee2158d92) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMetaType::create: don't leak memory if copy can't be madeVolker Hilsheimer2021-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | QMetaType::construct will return nullptr if a copy is requested but if there is no copy constructor. In that case, the memory allocated in QMetaType::create will be leaked. This case is covered in the unit tests in template<> void testCreateHelper<QMetaType::Void>() so we can't assert in construct that a copy constructor is present if a copy is requested. Fixes static analyzer warning 618b1e6877f737df57c39fd35ad91cd4. Change-Id: Ic439b36b1f120b9d0f888efaeab2801d8acc13de Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 90b51219ddc75c4dd2d171f2dba644e67d1e4a62) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QHostInfo: simplify assignment operatorVolker Hilsheimer2021-03-041-4/+5
| | | | | | | | | | | | | | | The d_ptr is never nullptr. If it could be, then other's d_ptr could also be nullptr, and we would dereference the null pointer. Guarding against self-assignment is nevertheless a good practice. Fixes static analyzer warning 5fc3780532e30c6350a0aa1ad2188a4c. Change-Id: I07ff808e4c4f5bf07b4d6663f1fb4a3301a0fec7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 6e334a85a82f1fedc39f54511a9d1b0c7b512d5b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't access data in moved-from objectVolker Hilsheimer2021-03-031-2/+2
| | | | | | | | | | | | | | | It's undefined behavior, esp since we leave it to the compiler to implement a move constructor for the ButtonInfo struct. So read the data that we need first. Fixes static analyzer warning de76eedae524c86f89d6369c0f5af8c7. Change-Id: I8fc458b7e9ba8904ec7a3b1c26aac0628e336ea2 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 4daf83a0dc05f944c066237aa95c388f29ce890a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* configurejson2cmake: Add library mapping for libmngJoerg Bornemann2021-03-021-0/+1
| | | | | | | Change-Id: Ic6a45ecf14791cd6e780b7b0cb52c7b7275e968a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 735466ed2bb45c3faeba4cc02f036d4fdf509817) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSsl: fix UB pointer useTimur Pocheptsov2021-03-022-7/+7
| | | | | | | | | | | | Weird macro had inverted notion of type safety: instead of casting parameters and return values (they are pointers) to work with generic OPENSSL_sk_xxx functions, it was ... casting a function pointer to an invalid type to get ... nothing, but UB. Home-brewed (un)'safestack'!!! Pick-to: dev 5.15 Change-Id: Ib91a7ba4cd472f370836797e422456f91a4385b0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Handle desc tags the same way for OOB checks as the other tagsAllan Sandfeld Jensen2021-03-021-7/+3
| | | | | | | | | | | Including one entry of the value in the header is pointless after the unaligned access rewrite, and a potentially dangerous pattern, though safe here due to overchecking. Change-Id: I4c0380040f89920467c309503408f1df6f88423f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 90e9974f1596cb6fd9cf15ddf9e34d15a387bb7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle para tags the same way for OOB checks as the other tagsAllan Sandfeld Jensen2021-03-021-21/+16
| | | | | | | | | | Do not include the first parameter in the main tag anymore. That is a left over from before unaligned access was added. Change-Id: I2caf027c6b9930d3e23fe5ec8bdcd45db34835a9 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit b984689ec881ffb2cf2ee56f98cfaa1e2a4da54a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Convert elliptic curves and DH params to work with QTlsBackendTimur Pocheptsov2021-03-0113-396/+372
| | | | | | | | | | | | | | The corresponding API is becoming a part of QTlsBackend interface, since it's too minimalistic and does not require additional interfaces, unlike certificates or keys. Pick-to: dev Fixes: QTBUG-91177 Fixes: QTBUG-91175 Task-number: QTBUG-65922 Change-Id: I44dd0adbdf2427962451998664efe234d59fae24 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>