summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add changes file for Qt 5.15.2v5.15.2Antti Kokko2020-11-061-0/+282
| | | | | | Pick-to: dev 5.15 Change-Id: Ia696a7768934e11114fce11d1da3359266fce952 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix compilation when using -no-mimetype-databaseHelio Chissini de Castro2020-11-061-0/+4
| | | | | | | Change-Id: I4f706a26d73f61e4a6022338e0fc0be48627e4a1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit c67ea659e5447fc2d898dbb78189bfe22893522c)
* Android: replace stacktrace with debug message in search for setActivityAssam Boudjelthia2020-10-291-2/+4
| | | | | | | | | | | | | 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 Change-Id: Iaf7f347ae04605a1f616f24d25cac4938c1640a4 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> (cherry picked from commit 950e628fd842f22ac741b18440fcc99213820587) Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Android: disable Gradle caching by defaultAssam Boudjelthia2020-10-291-2/+4
| | | | | | | | | | | | 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. Change-Id: I6d4a67f4f1bb3e37b02de7ff4c534ec4d006f9a3 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> (cherry picked from commit 90912b657edf27d40aa1a8ac8fbc3bae8d285e25) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QScreen orientation not being updated when setting a platform screenFriedemann Kleint2020-10-291-3/+3
| | | | | | | | | | | | ScreenPrivate::updatePrimaryOrientation() depends on the geometry being set which is calculated by updateHighDpi(). Move the call up. Amends 370289bef68d8505b66cb27150a3f596e23c5ed3. Pick-to: dev 5.15 Task-number: QTBUG-76902 Change-Id: I8188e04ad4a2ef7d414a2b78ecb3dd6c64528fa6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Deprecate old aliases for two countries and several languagesEdward Welbourne2020-10-297-42/+40
| | | | | | | | | | | [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 Change-Id: Iebaa0a5a77bfa12f7014de53fab4a25b5f1cc92c Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 2c4874be40aa40b698315cac0ad768e5c650a740) Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Update CLDR to v37, adding Nigerian Pidgin as a new languageEdward Welbourne2020-10-298-3978/+4142
| | | | | | | | | | | | | | | | | | | Routine update by running scripts, ignoring clang-format's extensive grumbles. Added notes to util/locale_database/'s README, on the need for that, and enumdata.py, on when to add entries. As usual, several new locales are also added, for existing languages, territories and scripts. [ChangeLog][QtCore][QLocale] Updated to new version of CLDR (the Unicode Consortium's Common Locale Data Repository) v37. Various Adlam-script locales are dropped due to its use of a number system unsupported by 5.15's QLocale. Support for these locales shall be restored in Qt 6. Task-number: QTBUG-84669 Change-Id: Ib76848bf4bd1219180faf46820077e8d8049a4e3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit cb23d50f38ec9d1daed570aa2b89e6d4b3f45c3f)
* Deprecate ordering on QItemSelectionRangeEdward Welbourne2020-10-293-3/+11
| | | | | | | | | | | | | | | | 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 Change-Id: Ie99294bd7fc18f2a497598ae08840886b0a6d62d Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 29c113d912fdf96f99503c9635bf89c4cabcc6fb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Deprecate QLocale::Language entries that no locale data relates toEdward Welbourne2020-10-283-96/+144
| | | | | | | | | | | | | | | | | | 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 Change-Id: I2bf2d49211ade7cc511277f35fb1a247e7048b31 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 2575a8ced39b607ed320ed230c83119eaad4b33b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix locale look-up when language is unspecifiedEdward Welbourne2020-10-261-5/+15
| | | | | | | | | | | | Looking up a locale with unspecified language got the C locale, due to taking a short-cut that would make sense if no locale were found for a specified language. Stop assuming the language was specified. Task-number: QTBUG-74287 Change-Id: I8b3c232da584fb187ebb6c190729c377d0083808 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit e69b81101c6e09d1c1b81d50ea868a8625c9f248) Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Revert changes in strto(u)ll.c to avoid integer overflowsRobert Loehning2020-10-264-25/+36
| | | | | | | | | Found in oss-fuzz issue 26045. Change-Id: Id9eac1b4f67ad9bbe2d92dd69cd03338a6ced74e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 2096400d6e8249e49df049f9600073fb2219c97a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Show the year correctly after it has been editedAndy Shaw2020-10-262-1/+5
| | | | | | | | | | | | | When converting the year as an integer via the locale then it can add in group separators which would not be desired here. Therefore it should be converted via the QDate approach to get the right output for the year. Fixes: QTBUG-86307 Fixes: QTBUG-85966 Change-Id: I092bd1e5f69e544843fd5f28c96b94c9066490c5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit d9edad81177954c89619b6dee70ca76f2f4709ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QSaveFile always failing on content: URLsVolker Krause2020-10-262-2/+14
| | | | | | | | | QSaveFile needs QFileInfo::isWritable() to work, which 7e5f38aec667 caused to always return false for content: URLs. (cherry picked from commit d53bbecf4c2565f2e5fd834b20ff90b073a25189) Change-Id: I2c5749a852e8233f80aba99ce2a9b6dddd132d2a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* CMake: Document versionless variants for CMake commands for DBusKai Koehne2020-10-262-15/+38
| | | | | | Change-Id: I7168a2d2589ef72d6e6f4bc568c5a914faa777df Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 66c94b83565d2db79307124b6cd797da33a5a7ef)
* Fix included license text for PCRE2 - Stack-less Just-In-Time CompilerKai Koehne2020-10-251-1/+1
| | | | | | | | | | | [ChangeLog][Third-Party Code] Changed license text of "PCRE2 - Stack-less Just-In-Time Compiler" component. The documentation (incorrectly) included the generic PCRE2 license so far. Change-Id: I7b36a640ba83fb6087fe28d77f9435af13f8c84d Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit ae18502151fff72885237897f1ffff79166e536c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix copyright information for src/3rdparty/xcbKai Koehne2020-10-251-1/+1
| | | | | | | | | | | | The new copyright lines are taken from xcb-proto-1.13/COPYING, and xcb-proto-1.13/src/xinput.xml. [ChangeLog][Third-Party] Fixed copyright information for "XCB-XInput". Change-Id: I8afa4dab39765b85a015524fe16b085dcfe5a864 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 9079e3f2fcfca8fe7747d8b38ea4e97d9261a024) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix copyright year of tinycborKai Koehne2020-10-251-1/+1
| | | | | | | | | | | [ChangeLog][Third-Party Code] Fix aggregated copyright information of TinyCBOR component to reflect the years in the individual source files. Note that this is not same as the Copyright year in the upstream MIT license text. Change-Id: I238d973d937fbfc3a81627c4c65491fbb5cb3c30 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 7c12c8d113b9a7eae00e06ba75a6c6cce0d97d3d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* OpenFile portal: use "writable" option to specify our FD is writableJan Grulich2020-10-251-2/+4
| | | | | | | | | | | | | When using OpenFile portal and passing a file descriptor, we open the file with qt_safe_open() which by defaults make the file descriptor writable. However we didn't specify in options that the FD is writable which leads into rejection on xdg-desktop-portal side as there is a mismatch between writable FD and read-only request. Change-Id: I7a430339a9615f0a054e777e0f3de56e219d1706 Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 3e09ac369dc8e2851ff772b9d9dde92fffd959b2)
* Fix QLocale's findLocaleDataById(): skip likely sub-tag look-upEdward Welbourne2020-10-231-4/+1
| | | | | | | | | | | | | | It was always called in pairs, first with likely sub-tags added, then with the base that started from. So doing a likely sub-tag lookup inside the function was redundant for the former while making the latter redundant - and it's needed. Task-number: QTBUG-84669 Change-Id: I18bf1d4976a51d9436efd20d1a84a36cfc60f618 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 55e16b25f52fdd1b945d3f94d79ce85d88cb69ec) Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QRectF/QPointF/QSizeF: document that operator== and != are fuzzyGiuseppe D'Angelo2020-10-233-8/+37
| | | | | | | | | | | This has been the case for a _very_ long time, and I can't believe this hasn't been documented anywhere. Change-Id: Ib157edf14e87a6f546c155496f70a760ab218cca Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit cca62a7360a117880eea5821fd7403d68a1431c8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tests: blacklist tst_QGraphicsAnchorLayout::layoutDirection()Liang Qi2020-10-221-0/+2
| | | | | | | | | | | | on Ubuntu 20.04 There is some issue with the glib event dispatcher. Task-number: QTBUG-87728 Change-Id: I4d64206898dd2c8356d5fc51a68c2e5759b38aac Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io> (cherry picked from commit 88f3f33beba48250ac82c92aac239ba4c1b0cdee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix to make g++-10.2 happyAndreas Buhr2020-10-221-0/+2
| | | | | | | | | | | | | | | g++-10.2 fails to compile qregion.cpp in RelWithDebInfo configuration, with error message: qregion.cpp:3617:12: error: ‘ET.EdgeTable::ymax’ may be used uninitialized in this function [-Werror=maybe-uninitialized] g++ is right here, for Count==1, 'ET' is not initialized but used. This patch fixes this by Q_ASSUMEing Count > 1. Change-Id: I3b9f1f58de9f3811c60640a08334487e3f8f2b23 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit dd0647b17aa43bccf36285285ecccb54f18176ad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Do not crash if QPA plugin does not support cursorsJan Arve Sæther2020-10-211-1/+4
| | | | | | | | | | | This was the case on Android, and caused a crash Fixes: QTBUG-83916 Change-Id: Iabc17237498091d815241730a2b14ece5a45d0b9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 2a5afb88dbf675c39e0671b11870596fdb3b6725) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* [Android] Make sure expose events are emitted after window resizePiotr Mikolajczyk2020-10-213-9/+2
| | | | | | | | | | | | | Expose event would not be sent when window was resized Fixes: QTBUG-69155 Change-Id: I81bf2d54f830a0dabf15398e1f25b55ff7ff4479 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io> (cherry picked from commit a02ea26b469a32fbdcd9ce777dd46aeacc5cd82f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use valid glyph index for box font engineEskil Abrahamsen Blomfeldt2020-10-211-2/+2
| | | | | | | | | | | | | | | | | | Glyph index 0 is reserved for "glyph not found", which can confuse Harfbuzz. For QFontEngineBox we always return a valid glyph since it is the fallback font when no other fonts are available. Symptom of issue was that we could get to Q_UNREACHABLE for certain strings when Harfbuzz returned a glyph count of 0. [ChangeLog][QtGui] Fixed a potential crash when rendering text with an empty font database. Fixes: QTBUG-85016 Change-Id: Iaf1d003cdff57320bf4327aa8e63dffd9d1da82c Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 05078459de5dae65b9bb7cf2a1bc216528291648)
* CVE-2020-15999: Heap buffer overflow in freetypeWerner Lemberg2020-10-201-7/+7
| | | | | | | | | | | | | | Manual cherry-pick of fix in freetype: Fix heap buffer overflow (#59308). This is CVE-2020-15999. * src/sfnt/pngshim.c (Load_SBit_Png): Test bitmap size earlier. Change-Id: I23824074f134802b3e4f737877d144b59e6b8151 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 0948846b42e0009ed2c9211c6995ce228db07032) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix building of snippets on 5.15Edward Welbourne2020-10-203-3/+3
| | | | | | | | | | | OpenGLWidgets wasn't a separate module in 5.15, it was part of Widgets. It's been split out on dev, as part of the RHI work. So a recent cherry-pick back from dev broke the build for snippets. Change-Id: Ia076a0d6db835b3c11d59ffe320a25bb2c849870 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* WinTab: Switch stylus pointer type when the tablet is in the tablet proximityDmitry Kazakov2020-10-201-4/+21
| | | | | | | | | | | | | | | | | | | Some convertible tablet devices have a special stylus button that converts the stylus into an eraser. Such button can be pressed right when the stylus is in tablet surface proximity, so we should check that not only during proximity event handling, but also while parsing normal wintab packets. Make sure that we don't switch tablet pointer type while any **mapped** stylus button is pressed. Pressing the "eraser" button is reported in pkButtons, but it maps to none by CSR_SYSBTNMAP https://bugs.kde.org/show_bug.cgi?id=405747 https://bugs.kde.org/show_bug.cgi?id=408454 Change-Id: I1d254f0cf79be6ceb194b1c4b314a11831f50170 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit f4442d467039b1161a5025bf5d728adf0e73a077)
* Fix QFontDialog::selectedFont() does not return actual selected fontZhang Yu2020-10-191-1/+1
| | | | | | | | | | "QFontDialog::accepted" was emitted before setting "selectedFont" to current font. So when calling "QFontDialog::selectedFont()" in slot of signal "QFontDialog::accepted",it does not return actual selected font. Fixes: QTBUG-87483 Change-Id: Ic9303e3df73ddd876fc78a0038f9379dbdf1853c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 407e171b40c3be3036ef71227d43c49f0b8d5788) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add QStringView overloads to QRegularExpression::(global)Match()Lars Knoll2020-10-192-0/+63
| | | | | | | | Add these to simplify porting from Qt 5.15 to Qt 6. Task-number: QTBUG-86516 Change-Id: I39f9c61e66a8084c7a4a6c5424e5b1a0b09beeff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* rhi: Add missing \internal doc commandsTor Arne Vestbø2020-10-181-0/+3
| | | | | | | Change-Id: I09a69a04c6fcd406602e797cbeec59216fecd5d8 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 71ad83529e7d2c7828e027666f24470cf86db63e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix the initial cursor state for the VNC pluginMagnaboscoL2020-10-171-1/+4
| | | | | | | | | | Ensure that we show a cursor directly after a client connects. Fixes: QTBUG-85006 Change-Id: Icb604beb1b0ca2e7efa42ac01c2aac0a3e002865 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit f76530a6171ca417865863b66e3ea439c27d057e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* sqlite: Upgrade to 3.33.0Andy Shaw2020-10-173-9937/+10673
| | | | | | | | | [ChangeLog][QtSQL][sqlite] Upgraded to v3.33.0 Change-Id: I379d8c62b449d4c6b04e5154c8c1a86761e5466e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit a9982e64eb5108e5c4b51a4e5738c08eff6d07e7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix compilation with optimization with g++-10.2Andreas Buhr2020-10-161-0/+3
| | | | | | | | | | | | | | | When compiling in RelWithDebInfo configuration with g++-10.2, it complains: qtbase/src/gui/painting/qdatabuffer_p.h:71:36: error: argument 1 range [18446744065119617024, 18446744073709551612] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=] This patch disables this warning in this place. Change-Id: Id3154ce80a1921671031828aaa7144214adad5dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit df8489816b455f43c0fa31924306523fdf3e1898) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't divide by zero when calculating number of itemsVolker Hilsheimer2020-10-161-1/+1
| | | | | | | | | | | | | | | | Amends e74af68654c0eb127277c73e20bda409b83d157b. If the model has children, then row 0 should have a non-zero size, but it's not unthinkable that a delegate returns zero for size hint, so protect against that case. Task-number: QTBUG-87588 Change-Id: Ia396f532d42ce5fad8757d629816c3cdc31d84ed Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> (cherry picked from commit e2b3d42f946a7702a92412f8c603f13ad53a4566) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAbstractItemView: don't lose items if model only allows MoveActionVolker Hilsheimer2020-10-166-34/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a model only allows MoveAction, then calls in the view/widget subclasses' dropEvent implementation to set the event's drop action to CopyAction will fail. QAbstractItemView will then remove the item when QDrag::exec returns. Instead of abusing the event actions for this, store explicitly that the dropEvent implementation already moved the item. If the flag is set, don't remove the item. In QListView, which uses moveRow to move items in the dropEvent handler, handle the case that the model might not implement moveRows. In that case, or when dropping an item onto another item (to overwrite data), fall back to the default implementation of QAbstractItemView. Sadly, it is impossible to know whether a model doesn't implement moveRows, or whether the move failed for other reasons, so this requires a bit of extra special case handling. QListView in IconMode is particularly odd in that it moves the item in the view, but not in the model. This follows up on fd894fd68edf3d67975cda8eb9dda43646887b0d and fixes additional issues discovered during debugging. Extend the existing unit test; since drag'n'drop runs a modal, native event loop on most systems, it still only runs on the Xcb platform. Change-Id: I6c5377e2b097c8080001afe904d6d3e4aed33df4 Fixes: QTBUG-87057 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 0f1008a5936c903ca9448193df7df6117e2c617b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QESDP::take(): document that it doesn't derefGiuseppe D'Angelo2020-10-161-1/+4
| | | | | | | Change-Id: Iba6c1caf4a7681815559db7c06691d02108ae855 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit bc4bd3c1bcaa955d3fea86deef1d8098dfc682d8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QLocalSocket/Win: prevent writing to broken pipeAlex Trotsenko2020-10-152-0/+7
| | | | | | | | | | | | | When a peer closes the connection, the device remains opened for reading purposes. However, we should disable writing on disconnected socket. Otherwise, if the user issues a write() call, a new pipe writer object will be created and the write call occurs with invalid handle value. Change-Id: Id136798c7663df1fce7ed0aa4e3c6f5c65218a11 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> (cherry picked from commit 53b4556332e95820622742e9be16281a77f9d337) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Return false from canFetchMore for uninitialized QFileSystem modelsDoris Verria2020-10-151-0/+2
| | | | | | | Task-number: QTBUG-87273 Change-Id: I1787e3dd26ec10cf161d8fa4e329972b6dd4aa6c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 61dee37d667e083fd2979ecc166efbc1bfcaf0e7)
* Revert "Fix detach on bool check of QSharedDataPointer"Allan Sandfeld Jensen2020-10-151-1/+0
| | | | | | | | | | This reverts commit 20bcff105019ee5700575b77565bf3d90ea8b9bc. Reason for revert: Makes QSharedDataPointer comparisons ambiguous without overloading comparison operators Change-Id: I5ad36f39505490812675afc6a435f6c43b2c0d0d Fixes: QTBUG-87611 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add some missing QStringView overloads to QStringLars Knoll2020-10-152-0/+95
| | | | | | | | | | | | | | | | | | | These are added to aid writing portable code between Qt 5.15 and Qt 6. [ChangeLog][QtCore][QStringView] A couple of methods have been added to QStringView that make it easier to write code that is portable between Qt 5.15 and Qt 6. Those include QStringView::split(), QStringView::count(), number conversion methods (QStringView::toInt() and friends). A couple of overloads taking QStringView have been added to QRegularExpression (match() and globalMatch()) and QString (append(), prepend(), insert() and localeAwareCompare()). Fixes: QTBUG-86516 Change-Id: I98779217c7a4107fbe086f956d24b1ce059194d7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QStringView::count(...)Lars Knoll2020-10-153-0/+43
| | | | | | | | | | | Also this one as a porting aid towards Qt 6. The implementation is using QString to keep things simple. Task-number: QTBUG-86516 Change-Id: Ic033b8678c76a608af8acfc5fab547aeb159933e Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QStringView::split()Lars Knoll2020-10-155-0/+75
| | | | | | | | | | The implementation has to live in qstringlist.h and qregularexpression.h, as those classes are only forward declared in qstring.h. Task-number: QTBUG-86516 Change-Id: Ia9b3ff48999d1c2e7df905191ee192764b309d08 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix infinite loop triggered when displaying model with QTreeViewDoris Verria2020-10-141-1/+5
| | | | | | | | | | For some models like the QFileSystemModel canFetchMore() returns true even though fetchMore() doesn't return anything if setRootPath is false. To prevent an infinite loop, add a check to make sure the model's rowCount was updated during the loop. Fixes: QTBUG-87273 Change-Id: I16275fc2765fd77badc1c5d265e8ba5cd250163a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b84852670da604d32fe7cf222f0a82c28fd29c53) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use QScroller in the Dir View exampleShawn Rutledge2020-10-143-5/+15
| | | | | | | | | | | | We have never had enough examples that show how easy it is to install a QScroller. In this case, one line makes a QTreeView flickable. Task-number: QTBUG-86090 Change-Id: Idb8b4709617befb261f3b78d63ddbdaf5ad18d6b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit b0cd3bcec4317ed859ea13b3a2b33742c6ccecfe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tests: blacklist two tests on Ubuntu 20.04Liang Qi2020-10-142-0/+4
| | | | | | | | | | | | | tst_QApplication::sendEventsOnProcessEvents() and tst_QItemDelegate::editorKeyPress() There is some issue with the glib event dispatcher. Task-number: QTBUG-87137 Change-Id: I79a983192edef3c3560a4296cc9dea2dfc2ee1b0 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io> (cherry picked from commit 844318f54aa3f8509c16941727cdc755cbea7f05) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix detach on bool check of QSharedDataPointerAllan Sandfeld Jensen2020-10-141-0/+1
| | | | | | | | | | We have a conversion to T* which would be triggered for a non negated bool check. Change-Id: I543c66de6b4da64a3a63ee9a438fab6adcc58052 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 182760e84d19df726418cb79da37636cdb6ff49d) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Document QApplication::desktop as obsoleteVolker Hilsheimer2020-10-141-0/+2
| | | | | | | | | | | | | | | There is no function equivalent in Qt 5.15, but the entire QDesktopWidget class is already documented as obsolete, so this method should implicitly no longer be used in new code. Qt 6 lifts QScreen up to support the various QDesktopWidget use cases, and a follow up will remove this method from Qt 6.0, or at least mark it as deprecated API as well so that it generates warnings when used. Change-Id: I9b205e6d4a636c22a95728695088233c898cbfc4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 456ba431e649ac87f5043d18ca2efc35d3dba5e4) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fallback to using the family when doing an exact matchAndy Shaw2020-10-132-6/+38
| | | | | | | | | | | If the difference between the families sizes is just 1 where one of them is 0 in size then we can fallback to the family in that case. Fixes: QTBUG-87267 Change-Id: I62b25b06c88000b4d7defe91871c07873b1fc792 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit bdc9d272eebff66827b566b1b24b6697c797807a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Protect QImage work on shutdownAllan Sandfeld Jensen2020-10-124-6/+6
| | | | | | | | | | If the thread pool was not created, or already deleted, make sure the QImage routines can still run as they could before. Fixes: QTBUG-87320 Change-Id: I4105a68b6ae0637faf82cdda5f5ae44298759396 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 0aa8925f1acd47cadc71483cac97d202444d15db)