summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into ↵v5.15.8-lts-lgplTarja Sundqvist2022-11-11180-5841/+6934
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I569a2246c9e8d70430e8c5405b9f3df2218078ee
| * Fix default QT_ARCHS for non-universal buildsTor Arne Vestbø2021-12-211-1/+1
| | | | | | | | | | | | | | | | | | Amends e01f4642746cb5eb53ae4ce53e0c8e71ad654ff2. Change-Id: Ie53969389b0874e5b33b655ece7b3b4d4a3dd825 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 81e9432ffffc7c889455c84870e028a8c20c58d1) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Add the missing -mfpu=neon CXX flagAlexey Edelev2021-12-211-0/+1
| | | | | | | | | | | | | | Pick-to: 5.15 Fixes: QTBUG-99338 Change-Id: I02b5761d75e52980a05d56ac78bebfb403b101e6 Reviewed-by: Marianne Yrjänä <marianne.yrjana@qt.io>
| * QVarLengthArray: assert that the range passed to erase() is validMarc Mutz2021-12-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already checked that the two iterators, indvidually, are valid, but we didn't check that the range formed by them is valid, namely that the end iterator is reachable from the start iterator. Add an assert, because if the range isn't valid, we run into UB in the std::move() algorithm two lines later. Qt 5.15 uses std::copy() here, which has the same precondition, so the assertion would make sense there, too. Change-Id: I90b7e846455ff86383a8971bea908036684961d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit c38639089f0e17a3da40dca03fecac88f5d89ba9) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Fix missing characters or assert with certain font sizesEskil Abrahamsen Blomfeldt2021-12-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The alphaMapBoundingBox() only exists to prefetch the size of rendered alpha maps, to reserve space in the glyph cache. Since 104e6d0f5427f5ebaab106b1651eb76c4c56df98 we have not used the QPainterPath fallback code path when actually rendering the glyphs, but that patch neglected to update the code that retrieved the bounding box. This could in some cases cause a mismatch, and if the alpha map we ended up with in the end was larger than the reserved space, this could trigger an assert or an empty spot in the cache. [ChangeLog][Text][Freetype] Fixed an issue where characters would in some rare cases be missing from text, depending on font metrics, font size and system scale factor. Fixes: QTBUG-86633 Change-Id: Ic8ade168115e4f51bac71539325936bbae993120 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit bda75c81f5648a4f1f2d15b4efaf38a03d5f0d64) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * QVarLengthArray: fix UB (precondition violation) in range-erase()Marc Mutz2021-12-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the range-erase() function is called with an empty, valid range, it passed equal iterators to both the first and the last arguments of std::move(f, l, d) (the algorithm, not the cast). This is UB, since it violates the algorithm's precondition that d ∉ [f,l). For non-empty ranges, f > d, thus d < f, hence d ∉ [f,l), so everything is ok _there_. Fix the empty range case by returning early. Reviewers may question the precondition, expecting that std::move(f, l, f) just be a no-op, but the algorithm, as specified, performs self-move-assignments in that case, which need not be supported. In fact, the Hinnant criterion, itself only applicable if one calls for self-swap-safety, asks for self-move-assignment-safety only for objects in the moved-from state. QVarLengthArray, itself, meets only the Hinnant criterion; self-move-assignment of non-empty QVLAs invokes UB. So, the UB here is real. Qt 5.15 uses std::copy() here, which has the same precondition as std::move(), and the same fix applies there, too. [ChangeLog][QtCore][QVarLengthArray] Fixed a bug where range-erase() could invoke undefined behavior when called with an empty range. Change-Id: I656aa09d025168d6d9ef088ad4c6954d216f0d54 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 0800947d7d2127eacaabf66ee1702d4980897041) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * tst_containerapisymmetry: test ranged ctors with pure input_iterator typesMarc Mutz2021-12-101-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | Fails in Qt 6, succeeds in Qt 5.15, therefore needed to add the version check. Task-number: QTBUG-99036 Change-Id: I9da1b2511d844b5fdcb63fdc58c8bc34d0f65736 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 2e07d045ff617173dbbb1382b67f7afe30564699) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * qmake/Xcode: Mark "Qt Preprocess" build phase as always out of dateJoerg Bornemann2021-12-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This build phase executes the qt_preprocess.mak makefile from Xcode and should be triggered whenever any input of any rule in this makefile is out of date. It was not triggered when a file that's referenced in a .qrc file was changed. The Xcode project lacks those files as rule input, but the makefile itself has its inputs correctly set up, and can be triggered always. Fixes: QTBUG-94995 Change-Id: Ida1349039bd6f23a300a610ecbde96f7cd35edb6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 64cac8b7bebbb9a1a95ba99722ae3245ff3252bd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QVarLengthArray: fix size update on failed append()Marc Mutz2021-12-092-6/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the in-place constructor throws, the old code had already updated the container's size(). Fix by delaying the update to after the in-place construction. [ChangeLog][QtCore][QVarLengthArray] Fixed a bug whereby a failed append() would leave the container with an inconsistent size(). Change-Id: Ief1e668d945149bd8ba96c8af1398baaa7876880 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit d4a88e4ea4dd0d24c9c43553dd4c48a79635803c) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Fix typo in QAbstractItemModelTesterAndreas Buhr2021-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | When recursively checking children in QAbstractItemModelTester, the currentDepth of recursion was incorrectly increased. This patch fixes it. Change-Id: Ia79508f358e2fcb6b90780a79baec053522e871c Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit 1f2f61d80860f55638cfd194bbed5d679a588b1f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Windows QPA: Fix cursors getting out of sync after restoring override ↵Friedemann Kleint2021-12-095-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | cursors on native windows Introduce a flag to QWindowsWindow which forces the cursor to be applied after restoring override cursors. Fixes: QTBUG-98856 Change-Id: Id62cdc2dd01f45324503a542446b1c11a1fe6f44 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Keith Kyzivat <keith.kyzivat@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit 9ad00e4b3f4d71f31ba041af623741522a221ffc)
| * evdevkeyboard: Try opening as read-write firstLaszlo Agocs2021-12-082-1/+6
| | | | | | | | | | | | | | | | | | | | switchLed writes to the device, and so O_RDONLY cannot be correct. Change-Id: If79814804bcd3c6fb01617be9f1a73e54b9563bd Fixes: QTBUG-80653 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 9c05fdac81d5fe0d3007ba55cfddf4eb99183153) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QVarLengthArray: add some basic checks for default-ctorMarc Mutz2021-12-081-0/+21
| | | | | | | | | | | | | | | | | | | | | | There seems to have been no-one that checked a simple empty()/isEmpty()... Change-Id: I7fa567f556532dfa21db759719f1303a768a9732 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit cb00db5a7e644d381ec58f7b715e0312c57f282a) Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * QTableWidget doc: remove wrong comment for itemExpanded()Christian Ehrlicher2021-12-081-3/+0
| | | | | | | | | | | | | | | | | | | | Since Qt5.1 (80fa4b6c8ef) expandAll() emits expanded() but within this change, the comment in itemExpanded() was forgotten. Change-Id: Ic487e5f8999d6af27a4747b861464058faf03889 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 64449abe17e34e02dcaa9791203e3a5065c9d1a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Test for nullptr before dereferencing the screenVolker Hilsheimer2021-12-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Touch event processing might still be ongoing even after the screen has been disconnected. If that screen was also the primary screen, we would dereference nullptr. Check for nullptr to avoid potential crashes during shutdown. Fixes: QTBUG-95192 Change-Id: I49ccd30c4126fe12cf5bb675e532e6e59b40b9c1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 30b0b72453239666952ab516c618c19f0ca0aca6) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Blacklist tst_QTimer::zeroTimer on Ubuntu 20.04Andreas Buhr2021-12-081-0/+3
| | | | | | | | | | | | | | Task-number: QTBUG-84291 Change-Id: I0e448eaf82ca443685333aecbe7680a94f44f7bd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io>
| * Use Yu Gothic UI as the main fallback font for JapaneseEskil Abrahamsen Blomfeldt2021-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using MS Gothic UI as the fallback on Japanese locale has been outdated for many years. The default font on Japanese is Yu Gothic UI, and this caused mismatches between Japanese text when using the fallback and when just relying on the default. [ChangeLog][Text] Made the primary fallback font on Japanese locale "Yu Gothic UI" (the default system font). Task-number: QTBUG-96689 Change-Id: I9cf34410619ff4a2ceb9b03d523018c5061c3634 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 416fbfa5a017406535a62a503411039d7a17c844)
| * qxkbcommon: UCS-4-encode surrogate characters in QKeyEvent::key()Liang Qi2021-12-071-1/+5
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-72776 Done-with: Liang Qi <liang.qi@qt.io> Change-Id: I9d1f4e34527079c3bc460016fe9b953636b4d6cb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 9ef69efb3bde086b593787efdda5ebd8f3544768)
| * Replace CopyrightFile entry in libjpeg qt_attribution.jsonKai Köhne2021-12-072-13/+12
| | | | | | | | | | | | | | | | | | | | CopyrightFile is only supported by qtattributionsscanner since version Qt 6. This amends commit 804288cab3 Change-Id: I57fa7f9cfb32ed98a26306bf88f7d02ef46224cf Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> (cherry picked from commit 8c47a86eecd286dbe66ca55ed4deaaf0f901d13b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix qtdeclarative baseline test failure for text tablesVolker Hilsheimer2021-12-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amend 97cfd4940157817dd761fd02f2e6da4afc5b4a30, which resulted in incorrectly laid out tables in Text elements. Reported by the baseline test for the scenegraph. Not reproducible using a QtWidget text widget, so no unit-test added here. Task-number: QTBUG-86671 Task-number: QTBUG-97463 Change-Id: I607b1fea3fb5923f81f05a3646bafebec3dcf3b5 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 220510a885747bb084e23dc51ea31e35e4fd115e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Close leak of QOCIDateTime objectEdward Welbourne2021-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Noticed while reviewing usage of this type. The code has a whole TempStorage class to take care of keeping allocated memory live until we're done with it, explicitly including date-time objects as a special case, but neglected to use it in one place. Change-Id: Ic94c56d67dda6dc3ee36a025a2e0149f6b2a1837 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 24e437041487a198057c02a1dd60c78d024af11f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * androiddeployqt: Fix signing of paths with spacesKai Köhne2021-12-061-21/+24
| | | | | | | | | | | | | | | | | | | | | | Only use shellQuote() if the path is actually passed to a native API. For QFile API, use the unquoted path. Fixes: QTBUG-97649 Change-Id: I9d8131819010bbd2faa8a81eef367245d90a767f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 6598a26a138aaab13e28905a28e7ce21011d30b5) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * OpenSSL: handle renegotiate errors by comparing certsMårten Nordheim2021-12-042-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | If the certificate didn't change then our trust in it didn't either. Sadly, cannot have an autotest because we don't have any way to facilitate a renegotiation at the moment and with TLS 1.3 not having them at all it's unlikely we ever will. Task-number: QTBUG-92231 Change-Id: Ibaa9b2f627daca05021c574e69526710aacdadae Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit a6744bc9f9d0a1bcdaa6769ddb39a18dfad5f5c3) Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Update latest qt license agreementJani Heikkinen2021-12-031-852/+836
| | | | | | | | | | | | Change-Id: Idc5346bbdd05646ad8eee754d1d708bc59d704fc Reviewed-by: Tino Pyssysalo <tino.pyssysalo@qt.io> Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
| * QFontDatabase: unify relevant documentation piecesAndrei Golubev2021-12-031-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | addApplicationFont and addApplicationFontFromData basically do the same thing (with one reading the data from a file and another reading it directly from QByteArray) The documentation is not quite identical, so fix that by using \include magic of qdoc As a drive-by, remove outdated \note within addApplicationFont() description Fixes: QTBUG-98752 Change-Id: I29738e7411d241c26a4b2e1dd91d0af867fcc111 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 08b0a63a0ffd5e3b4aeb0a789663d5200fd217bb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Don't let text table cells shrink below their minimum widthVolker Hilsheimer2021-12-032-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We calculate the minimum width, but then use it only to make sure that the maximum width is at least as large as it. Without setting the layout struct's minimumWidth as well, table cells can be smaller. Add a test case. Fixes: QTBUG-86671 Fixes: QTBUG-97463 Change-Id: Idf4ad015938abb8d3e599e9a58e002f29c0067be Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 97cfd4940157817dd761fd02f2e6da4afc5b4a30) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * wasm: Fix assert/crash when tooltip window is closed and mouse movedLorn Potter2021-12-031-3/+4
| | | | | | | | | | | | | | | | Fixes: QTBUG-92521 Change-Id: I627fdcf3064321a3c1cb1140473038571ec78b9e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 9a31dada02929e54423dc839245e8fcfb52db235)
| * Remove XCB_EVENT_MASK_RESIZE_REDIRECT for Qt:WindowTransparentForInputInho Lee2021-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In xcb plugin, XCB_EVENT_MASK_RESIZE_REDIRECT is set but it is not necessary. Mouse events are disabled by setTransparentForMouseEvents and there is no reason to have this event mask. Fixes: QTBUG-86372 Change-Id: I2124b0684a0847d6705344bb5850bac178a292b6 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit ac2f4bd9db63cc4a37953b00830ee6214752ea8f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Freetype: adjust underlinePosition to match our expectationsMårten Nordheim2021-12-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We expect underlinePosition() to be the topleft corner of where we start drawing the underline but freetype reports the _center_ of the underline: "underline_position: [...]. It is the center of the underlining stem." - https://freetype.org/freetype2/docs/reference/ft2-base_interface.html Fixes: QTBUG-62602 Change-Id: I96808816f50f3f37b18f579adf285502c88e6ea5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 0062f5a2089f9654c8880087ac6fb0b46a90bef2) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * QSortFilterProxyModel: create mappings on demand againDavid Faure2021-12-023-10/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling create_mapping in setSourceModel as introduced by 8455bfee76ed3f1bd3bba8bd3688a7afa94ae0bb can lead to an early call to filterAcceptsRow, and some existing applications may crash. It is also an incomplete solution since it was only done for the toplevel index but not for child indexes. Instead, go back to creating mappings on demand. This means coming up with a different fix for QTBUG-87781 (dataChanged not emitted for indexes that haven't been mapped yet, i.e. not queried or shown anywhere). When this happens, we can't know if the index was previously filtered out or not (for lack of a dataAboutToBeChanged signal...). Creating the mapping with the new data only gives us the new state of affairs, there's no reference state to compare to. Therefore, when the mapping is missing (during dataChanged handling), create it, but skip all the logic about row insertion/removal, just forward the dataChanged signal if the row isn't filtered out. Creating the mapping might require creating first mappings for parents, recursively, which wasn't done anywhere in QSFPM yet, hence the new create_mapping_recursive() method. In addition to all this, the handling of removed items was incorrect, remove_source_items did nothing if the parent was gone, and then source_items_removed was trying to adjust indexes in an incorrect list. If the parent is gone, clear the proxy_to_source list, so there's nothing to adjust afterwards. This bug actually doesn't happen anymore in this version of the patch, but the change still seems right and might prevent repeating a long debugging session in the future. Thanks to ChunLin Wang for the unittest in this commit. Done-with: ChunLin Wang Change-Id: Id543d0cc98f1a03b5852bda01d2f49b980e06be7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 4ec5622e62e6fd521e1193f1d6084901f09e7e9e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * SignalTransition: guard against deleted objectFabian Kosmale2021-12-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the object has been deleted, we can not retrieve the sender and signalIndex anymore. In that case, the only thing we can do is to print a warning. This is impossible to trigger during normal usage from C++, however it can happen in QML, where we do not disconnect handlers soon enough. This issue only exists in Qt 5, as in Qt 6 c249edb83fa67b3e5f711b28923397e66876182d in qtdeclarative and a few other changes take care of it. A testcase for this issue will be added to qtdeclarative. Fixes: QTBUG-65926 Change-Id: I694a77672c311039c4fe238d9e24c91a427e85e3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Don't shrink a column when it spans multiple columnsVolker Hilsheimer2021-12-022-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a cell spans multiple columns, then the merged cells' starting column's maximum width should never become smaller than what was calculated from previous rows. Otherwise, we'd distribute the space of the column that has a span across all merged columns, resulting in unnecessary line breaks esp if WrapAnywhere is enabled. Add a test case. Fixes: QTBUG-91691 Fixes: QTBUG-95240 Change-Id: Ic27dbdb128071e50fba049de85c9f23ba2f059b3 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 9538c7ca73e75ab8219e43b36b49200f27164dbb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * tst_QSslSocket: QSKIP the test that is known to fail with SecureTransportTimur Pocheptsov2021-12-011-0/+3
| | | | | | | | | | | | | | | | SecureTransport does not like our server's cert using MD5 and thus fails verification unconditionally. Change-Id: I2f3fe3a1c3d5dc2c07339b684cc6ac6c1167b474 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * Openssl backend: reinsert a missing C in qCDebugMårten Nordheim2021-12-011-1/+1
| | | | | | | | | | | | Change-Id: I2b13d2f88517abea7e015bfba4fe71dcbada86c0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit c8913829001e683a7a14bb342faad4dfd67e4c4b)
| * QStringView: fix split(QRegularExpression) returning invalid dataMarc Mutz2021-12-012-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that QStringView::split(QRE) is implemented as convert(QString::fromRawData(view.data(), view.size()).splitRef(~~~args~~~)); while the implementation caused a hidden detach by calling QString::utf16(), which detaches fromRawData() to ensure the terminating NUL. Fix by using (const) data() instead, and casting. [ChangeLog][QtCore][QRegularExpression] Fixed a bug where invalid references could be returned for QString::fromRawData() subjects. Fixes: QTBUG-98653 Change-Id: I0dceaf7d5fe6e5d64e7c9be81e26f0e51869f9da Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * Check that QStringView::split() w/rvalue QRegularExpression returns valid dataMarc Mutz2021-12-011-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | This test currently passes in Qt 6, but fails in Qt 5.15, thus the QT_VERSION check. Task-number: QTBUG-98653 Change-Id: I3c7b9bc7ef74f605ff63768b38c473296274d0de Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 8568a6386c1691e296e288021d7fd6316695cfbb) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Teach QOpenGLTextureBlitter about GL_TEXTURE_RECTANGLE texturesTor Arne Vestbø2021-12-011-16/+112
| | | | | | | | | | | | | | Similar to change in 6.3, but without any public API added. Change-Id: Ie577bda046f60ce23dfb8cdd6164bb3de4b54358 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Doc build: fix conflicting response file with mocSamuli Piippo2021-12-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Doc build is using the same variable to define the reponse file as moc build, which can lead to case where moc is using the qdoc's response file instead of its own. Moc needs more include paths than qdoc, this can then lead to weird compilation issues as moc doesn't warn about missing includes. Task-number: QTBUG-98569 Change-Id: Id35da18f664e2032bae96d11b00dbfe55ce37f66 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit ca9d72f4652e21ecaf6e50be2e7b851c4ec69486) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QTextDocument: fix an off-by-one in the changed signal for listsEirik Aavitsland2021-11-292-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When blocks are added or removed in block groups, i.e. items added or removed from text lists, the whole group is marked as changed, but the calculation of the before/after group length would be one off. That was reflected in the contentsChange signal. Add unit test. Since the whole group changes when list items are added, text is removed and the change-begin is not where the cursor was when the change was made. Fixes: QTBUG-82455 Change-Id: I99ee2cfef4944fcac8aca492741fd0f3b0de4920 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 8fbedf2196a292fe2affcf83ddc846b9c852772a)
| * Fix warnings due to enums in QSizePolicyFan RuiJie2021-11-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc 11 generates warnings as "bitwise operation between different enumeration types 'QSizePolicy::Policy' and 'QSizePolicy::PolicyFlag' is deprecated" in C++20. Fixes: QTBUG-93810 Change-Id: If8a796b33a772cc1a561eb0b6bc4def8f9f54bc0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit ab1904363a87656b4ddec77ee9978082a25dadcd) Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QVarLengthArray: fix insert() type/alias mismatch between decl and implMarc Mutz2021-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The declaration of insert(it, n, t) used qsizetype for n, while the definition used size_type. That works by chance, because the size_type typedef comes only after the insert(it, n, t) declaration. It was detected when size_type became a typedef in a base class of QVarLengthArray in my local branch. Just use the same type name in the implementation as in the declaration. In 5.15, the same issue exists (with s/qsizetype/int/). Change-Id: I64235eeaeaed3d43f4c070ca536474fae94c1b5d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit fd1a42490dc14e5cf4fbbd2682722305ce7a27ed) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Android: Set sem_wait m_terminateSemaphore behind an atomic flagRami Potinkara2021-11-271-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | Prevents QML app using QtActivity never calling AndroidJniMain::startQt..'s to jam as ANR Task-number: QTBUG-97115 Change-Id: Ibfe8579dbb701068f4896b6d826ff487094bdf56 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 1a87f069161c23e8febf5173b5f533d84d0eb4a8) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * QGraphicsItem: Update input context after InputMethod eventJarkko Koivikko2021-11-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Without updating the input context, the input method goes out of sync with the text control. Fix by updating the input context after InputMethod event. Fixes: QTBUG-98544 Change-Id: Idfb99bb0f886249cdab923b8dbed96277800c064 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 625cfb6b400a88b26b7295f21699c9db28b71483) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QSharedPointer: fix counter-productive QT_PREPEND_NAMESPACE use in qHash() implMarc Mutz2021-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qHash(QSharedPointer) implementation is already in QT_NAMESPACE, if any, so explicitly qualifying the call adds no functions to the overload set, but actually removes functions that would be found by ADL (which is only enabled for unqualified calls). Fix by using an unqualified call. [ChangeLog][QtCore][QSharedPointer] The qHash(QSharedPointer<X>) overload can now use qHash(X*) overloads found (only) through ADL (was: ADL was disabled due to qualified lookup of qHash(X*)). Change-Id: Ic6cc47103142d48b6cdefa2cd6552a65cf1cb222 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 23f980799d03f1522b6c7f87c2018566bcb6c996) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * tst_qhashfunctions: check qHashRange{,Commutative}() find hidden friend qHash()Marc Mutz2021-11-261-9/+27
| | | | | | | | | | | | | | | | | | | | ... extending the existing check for ADL-found qHash() implementations. Change-Id: Iac6ed2721db9e95ee921bd1d5170fa8c8d43475d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 6f6aa316f1145b3e49abe4d2810d83220c66298a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * xcb: stablilize xkb state when keymap updatedLiang Qi2021-11-263-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QXcbKeyboard only deals with core_device_id. With the reporter's test case: using xdotool to send a string, the deviceID is not changed, then we assume xkb_state_new() is more stable(or correct) than xkb_x11_state_new_from_device() in this case. See also https://www.x.org/releases/current/doc/man/man3/xcb_xkb_new_keyboard_notify_event_t.3.xhtml . Fixes: QTBUG-95933 Change-Id: Ic595e1f1424fbc6814871a85ac159907f1aeb12a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Zhang Hao <zhanghao@uniontech.com> Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 27c25fc909c19ddc4750f36d26b7c500db9eb0ab) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Stabilize tst_QAccessibilityMacVolker Hilsheimer2021-11-261-12/+9
| | | | | | | | | | | | | | | | | | | | | | Introduce a TRY_EXPECT macro that uses qWaitFor, and use it whenever EXPECT was used after a call to processEvents. Fixes: QTBUG-94036 Change-Id: Ia935444d529c2798637bf9b4a56e47a8dc9d75d2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 24022bc76080f1881755df839b41a1003a1ed125) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Handle macOS 11 issues in softHyphens testAllan Sandfeld Jensen2021-11-263-19/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | Calculate the effective width of the hyphen better, and compare with ceiled sizes. Test fails on WinRT so blacklisted there. Fixes: QTBUG-90698 Change-Id: I7ed2eb44c54240ecb2f8a38e5acf1f32608b2bfb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 0ffdbb21261eee3a9ec1cd541478ee883a12065c) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * QVERIFY_EXCEPTION_THROWN: re-throw unknown exceptionsMarc Mutz2021-11-263-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Swallowing unknown exceptions is dangerous business, as the exception might be a pthread cancellation token, the swallowing of which would terminate the program. Instead of returning from the catch-all-clause, therefore, re-throw the unknown exception. Fix tst_verifyexceptionthrown failure cases that use non-std::exception-derived true negative exceptions to not let the exception escape from the test function. As a drive-by, pretty up the macro's docs. [ChangeLog][QtTest][QVERIFY_EXCEPTION_THROWN] Now re-throws unknown exceptions (= not derived from std::exception) (was: swallowed them and returned from the test function), in order to play nice with pthread cancellation. Change-Id: Ic036d4a9ed4b7683fa67e27af8bcbae0eefdd0da Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit f4e89d58dade4113362b0341035ed742eeca6314) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QAuthenticator: Filter out algorithms we don't supportMårten Nordheim2021-11-252-1/+52
| | | | | | | | | | | | | | | | | | | | | | Which is anything other than MD5 Fixes: QTBUG-98280 Change-Id: Ifbf143f233ee5602fed1594e3316e6b2adec1461 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit a92619d950fdbf803cdc8c8ca8e75c1c82abb23f)