summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Android] Fix select handles misplacement on QDialogv6.1.0-beta3Pekka Gehör2021-04-011-6/+19
| | | | | | | | | | Get select handles {Left, Right}Point from a mapToGlobal with a cursorRectangle of anchorRectangle of the selected word/text Change-Id: I3425104c90f0efe6a1e4337328cf06dc93685b6f Task-number: QTBUG-90799 Pick-to: 5.15 6.0 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Remove QEXPECT_FAIL for tests that pass now on AndroidVolker Hilsheimer2021-03-312-9/+0
| | | | | | | | | | | Fixes: QTBUG-69214 Fixes: QTBUG-69218 Fixes: QTBUG-69220 Change-Id: I8b780db8d9dad1a877bc16e802e6ae92de0c8f23 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 15b0809f069ef29320d13936a1aed7ed422a8b43) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QLocalSocket/Win: fix possible UB in _q_pipeClosed()Alex Trotsenko2021-03-311-5/+2
| | | | | | | | | | We must stop the pipe writer before closing the handle on which it operates. Change-Id: I4765dd8393167fe2453653aba76a097b8ace8e3d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> (cherry picked from commit 64f02ebf05d88eaa8399a5cff85db5a605ede62e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QLocalSocket: fix signal name in docsAlex Trotsenko2021-03-311-1/+1
| | | | | | | | | It should be disconnected() instead of disconnectedFromServer(). Change-Id: I2b816e9c92d675ea5a7a26b4752e831c30950ef2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> (cherry picked from commit 97877d79487befe050f96aa9ae3b52f20a351e97) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove QEXPECT_FAIL from passing testVolker Hilsheimer2021-03-311-1/+0
| | | | | | | | | | | | The test is blacklisted in dev and 6.1, let it fail properly. We can watch the history of the test and remove the blacklisting if/when it passes consistently on supported macOS versions. Task-number: QTBUG-20984 Change-Id: I3211ecf565995578c83a092c637890c0e8bfd766 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 83d4ca3f66aa269ff47ff77e718fcbea594f2179) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix DESTDIR support on Windows for versioned hard-linksJoerg Bornemann2021-03-311-4/+16
| | | | | | | | | | | On Windows, we need to strip drive letter and colon before prepending DESTDIR when creating our versioned hard links. This fixes CI submodule updates. Pick-to: dev Change-Id: I41bc5f27b714ef74d3fadc4a0fb16c3d8b20da1a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add "we mean it" warning to private headerVolker Hilsheimer2021-03-311-0/+11
| | | | | | | | | Fix warning from configure. Change-Id: I12def11a4effb7298ec0501cfac4ffd37b777ff6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 5c329f023a29f45a1e87c660554c49fee34dae4b) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Semi-handle non-current repo qt modules when creating pluginsAlexandru Croitor2021-03-311-12/+32
| | | | | | | | | | | | | | | | | | | | | | | In the recent refactoring of qt_internal_add_plugin, a new target existence check was added when associating a plugin with a qt module. That check didn't account for a qualified qt module target name. This failed configuration of qtsvg which checked for the existence of a namespace-less 'Gui' in a per-repo build. Make sure to prepend the Qt namespace to the qt module name and also handle aliased target names. As a drive-by, add a TODO item to figure out how to link executables to plugins who's plugin type belong to a different repo, but both the executable and plugin are built in the current repo. Amends aa4a1006cbccbc180c600f9b4dc9e882bb5ed5ca Fixes: QTBUG-92235 Pick-to: dev Change-Id: I1c0f83672ab00f4702be9bad9a66ccc35e82f5c8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move bin/qt-internal-configure-tests to libexecJoerg Bornemann2021-03-303-5/+5
| | | | | | | | | Task-number: QTBUG-88791 Change-Id: I78613128760b5820e6db17b0c09462e34f7c7bb2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 4ae9922166ba81c9efea5b2af29898eb20a1fd63) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve support for QT_ADDITIONAL_PACKAGES_PREFIX_PATHKai Köhne2021-03-303-4/+12
| | | | | | | | | | | | | | | | | | | | Allow to set QT_ADDITIONAL_PACKAGES_PREFIX_PATH as both an env variable and CMake cache variable. Also normalize path and list separators, so that they can be used similar to CMAKE_PREFIX_PATH. The environment variable is intended to be set by the conan virtualenv generator, so that e.g. find_package(Qt6 COMPONENTS NetworkAuth REQUIRED) also works if NetworkAuth is not installed into the Qt prefix. Fixes: QTBUG-91142 Change-Id: Ia9f9b9fa2b1b051d33073629139640d0f4c7a843 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io> (cherry picked from commit 5bbd700124d13a292ff8bae6045316112500e230) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SQLite: Update to 3.35.2Andy Shaw2021-03-303-4599/+7020
| | | | | | | | | [ChangeLog][QtSQL][SQLite] Updated SQLite to v3.35.2 Change-Id: I1e784627d7ed3a226acfbb28d8379d4c69f91a84 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 022fd8e79cfa25049f262bbd6aef4298f14b4d96) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmake: Improve error message when detecting macOS platform SDK upgradeTor Arne Vestbø2021-03-302-4/+11
| | | | | | | | Task-number: QTBUG-85546 Change-Id: I2bce9d22ad826fa73fa4dbfd03c9b1d404c57859 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit fca543bcdeb2cb5c6c478e96a7d75010f637d784) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix qmake user projects for QT_LIBINFIX builds on Windows/iOSJoerg Bornemann2021-03-301-1/+1
| | | | | | | | | | | | | QMake user projects could not be built on Windows or iOS if Qt was configured with QT_LIBINFIX set. The code that generates qt_lib_entrypoint_private.pri file did not take into account the lib infix. Fixes: QTBUG-91511 Change-Id: Ibc40548a269238320f8f89a710d10e7f639246cb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7b4507d0be28d1258d5569182a03e8ead8620f2d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix CMAKE_INSTALL_PREFIX when building against installer-provided QtJoerg Bornemann2021-03-301-1/+1
| | | | | | | | | | | | | | | | | When building a module against an installer-provided Qt, CMAKE_INSTALL_PREFIX would default to /home/qt/work/install, which is the install prefix of our packaging machines. Do not hard-code the install prefix in QtBuildInternalsExtra.cmake but use the one that is calculated from the location of QtBuildInternalsExtra.cmake. Fixes: QTBUG-90449 Fixes: QTBUG-91475 Change-Id: I39f214efb18796a89f00a171ef190c547bba5c0a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit e6527e2f73663205a0f36feac5a7feda47fba152) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* lance tool: fix build for Qt 6Eirik Aavitsland2021-03-303-8/+8
| | | | | | | Change-Id: I639ffa60609b1e6036252cccc146dd98fded0b3e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 14ccc11194caf0e965c3a61b4f6bec01d5f73eb8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows QPA: Fix accessibility focus event for table/tree/listAndre de la Rocha2021-03-301-0/+11
| | | | | | | | | | | | | The focused element within a table, tree or list was not being informed in the UI Automation focus change events, causing the focused element to be missed by screen readers. Fixes: QTBUG-91029 Change-Id: I738502e6871358508b4510763018837c304b618e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit f1eccab04e01b3acc1a4b4c6a5fe7b3af3e2dcba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Prospective fix for flaky test tst_QDoubleSpinBox::setReadOnly()Friedemann Kleint2021-03-301-34/+22
| | | | | | | | | | | | | | | | The test has been observed to fail with: FAIL! : tst_QDoubleSpinBox::setReadOnly() 'QTest::qWaitForWindowActive(&spin)' returned FALSE. () /Users/qt/work/qt/qtbase/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp(863) : failure location Remove the widget member and use a widget instantiated on the stack instead. Add a check for top level widget leaks in cleanup() and fix leaking task224497_fltMax() by instantiating the widget on the stack. Change-Id: Idbbb5d859c0df2d9b9f49fb9f69ef6bb7d1ee150 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 4b15a8ea8fe0d64b529b859a3dba0de68b92ce85) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* wayland: Remove bogus warning about ignoring WAYLAND_DISPLAYEskil Abrahamsen Blomfeldt2021-03-301-7/+18
| | | | | | | | | | | | | | | | | | | On Gnome, we will not default to Wayland at the moment, even if the desktop is run in Wayland mode. In this case, we warn users that they can still select Wayland manually using QT_QPA_PLATFORM. Problem was: We never checked if they had actually explicitly selected Wayland, so even in the cases where we would end up using that QPA plugin, people would still see the warning. This moves the check to the end of the platform selection algorithm, after we have collected all the information. Change-Id: I0d734bd0782c5e58d6dc63f69b7d531a479ad942 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 642ed84a2db1ced7373707230d18e9d677277fa2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix build of QTuioTouchPlugin with Makefile generator on macOSJoerg Bornemann2021-03-301-2/+8
| | | | | | | | | | | | | | | | | | For each plugin, we create a custom target with it's OUTPUT_NAME such that one simply can do 'ninja qtuiotouchplugin' to build it. QTuiTouchPlugin has qtuiotouchplugin as OUTPUT_NAME, which is problematic with Makefile generators on case-insensitive file systems. See CMake upstream issue #21915 for details. Work around this issue by not creating the custom target in this situation. Fixes: QTBUG-84342 Change-Id: Id9a6cf0a01c179d5c93da4146e393cf00153ac4f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 82d50925f1a7d4ff852e5302fd9e8a3ae18763d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Error out on attempt to configure framework build with lib infixJoerg Bornemann2021-03-301-2/+7
| | | | | | | | | | | | | | | Setting a lib infix is not supported with framework builds due to the nature framework of include resolution: includes like <QtCore/qstring.h> won't work if the framework is named QtCoreInfix. The combination framework build and lib infix was agreed on to be out of scope in the comments of QTBUG-35604. Change-Id: Ib7c6983f2f64ea1a7cfcd56657d31eeab3f55fe3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit e6cee41c53c4057002b70f26888b2dc40fa15047) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove the unnecessary template parameter from the class specializationSona Kurazyan2021-03-301-2/+2
| | | | | | | | | | | | | This seems to cause errors when compiling with gcc-11. Although this is most likely a compiler bug, specifiying the template parameter type in this case isn't necessary. Fixes: QTBUG-91909 Fixes: QTBUG-90568 Change-Id: Ib231257ccb2e16cc533f23ca5840d31e26a66d53 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 659f7a06e91c04b239e3f4c0bcfccbe3581af1c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* headersclean: Compile with -std=c++latest, -Zc:__cplusplus on MSVCKai Köhne2021-03-301-1/+1
| | | | | | | | | | | | c++latest does check that our headers also work with upcoming C++20 support in MSVC. It also implicitly sets -permissive-, which checks for stricter standards compliance. Task-number: QTBUG-91117 Change-Id: Iaf1547191969213d570a1b2f59888ad04a7977ab Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit b58ca067da7dad3e151231c58f60238ed01cb65b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove qualification for Julian calendarAlex Blasche2021-03-301-1/+1
| | | | | | | | | | The given qualification was wrong but also not needed in the first place, Fixes: QTBUG-92046 Change-Id: Id28347fee2ef11ffcb0df8320b1025568b59de9c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit edfab62cb02781b1c5a5e433f6f64af285dfa0f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix removing columns when QSortFilterProxyModel has not been sorted yetJoni Poikelin2021-03-302-1/+18
| | | | | | | | Fixes: QTBUG-91788 Change-Id: Iddcafd3171f0f3703b94893a32b4ccaaeea9e713 Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit e287582cba74ddcfc67f83647e72c0b23bd99c36) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Return the result we have already when getting an object with no nameAndy Shaw2021-03-301-1/+1
| | | | | | | | | | | This will ensure that something is set for the AutomationId based on the actual object and the parents that do have object names until it reaches one without an object name. Change-Id: I205485bc0ba772e321879e00e64ea8e1d8f1ba91 Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit 5577cbaac59e7fc198ea2c98c1e4268779fbf0b4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qguimetatype: Avoid deprecated methodsFabian Kosmale2021-03-301-14/+21
| | | | | | | | | | | | This makes the 5.15 and 6.x branches more comparable, as in 6.0 the preferred way is to use the non-static methods (which avoids an expensive lookup in 6.x). As a drive-by, Avoid memory leaks if the test fails. Change-Id: I95b133342a4ea19dd23c235a408f38089706412b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit a7f24218e3795aa54effc2665e0a505c02b10382) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Include minus sign in ImhFormattedNumbersOnly's available keysEdward Welbourne2021-03-301-3/+1
| | | | | | | | | | | | | | | UIKeyboardTypeDecimalPad only provides digits and decimal point, no minus sign, but ImhFormattedNumbersOnly is documented to provide a minus sign as well. UIKeyboardTypeNumbersAndPunctuation includes punctuation, which should cover signs as well as decimal separator, so use that - same as for ImhPreferNumbers. A little more permissive than we want here, but that's better than more restrictive ! Fixes: QTBUG-91455 Change-Id: I0418946014e0a66d503e61704154fd7798a0b785 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 17bf553b76ebd688e58e4de4271407e2058d89ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Support family names that end/start with spaceEskil Abrahamsen Blomfeldt2021-03-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | If the family name starts or ends with a space in the actual font data, then this would not be selectable by Qt. This is because we trim the family name before matching it against the contents of the database. Testing on Windows GDI, it actually does trim the spaces on the family names (matching a request for "Chibola" with a font called "Chibola " for instance), but since we read the font data ourselves, we are not doing this. To ensure we never have font names that cannot be matched in the database, we make sure we trim the family names before registering them. [ChangeLog][QtGui][Text] Fixed matching against fonts which has a family name that ends or starts with a space. Task-number: QTBUG-79140 Change-Id: I9cdb50b78a7da2d2697f992ce462033eb1d7ada7 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 7fd9ed32012bd9001e78ad692a4802e0e3366e44) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QIcon::setIsMask: delete extra judgmentYang Yuyin2021-03-301-2/+1
| | | | | | | | | | QIcon::detach can judgment if the d pointer is nullptr Change-Id: I90fd5f50ed2565a5654b978c4603635e62677953 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 2a9c93a3483e60257d2625b70b395cc20dcc88ce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qdtlscookie: use a proper 'enterLoopMSecs' instead of 'enterLoop'Timur Pocheptsov2021-03-301-1/+1
| | | | | | | | | | It's a bit weird to calculate timeout in milliseconds and then pass it as number of seconds ... Change-Id: I1127163ea06e49ac1b53eea6f60ee8590319bfa1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit b262007929e84089dcfecd45948a2005aca79fb1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove fixqt4headers.plJoerg Bornemann2021-03-301-179/+0
| | | | | | | | | | | | | This script was aiding users to port from Qt 4 to 5 and is considered to be of little value for Qt 6. Change-Id: I26fb97d32969463d94e38222e32f241f86ad9193 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit e01add5cdbd703f616bc8319e6008ce11558cced) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix double inclusion of QtAutoDetect.cmake in top-level buildJoerg Bornemann2021-03-301-1/+1
| | | | | | | | | | | The variable we need to check is called QT_SUPERBUILD, not QT_SUPER_BUILD. Change-Id: I8487f491a0a4cebdf08f579519e99e6afe3db8c2 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io> (cherry picked from commit 7b6c526ef1857101a0274ff8d945d4ce08c9bd61) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Variable is Assigned a never used value in qt_make_filter_list()Huang Jie2021-03-301-11/+4
| | | | | | | | | | Variable 'i' is assigned a value that is never used in qt_make_filter_list() Change-Id: Id845ecb5231b97a899443bdcb9f49cccb7f20bea Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 8a226cd76b96527970b1600f6975c13eccddf109) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Font style name 'Normal' and 'Regular' have the same meaningOliver Eftevaag2021-03-301-0/+8
| | | | | | | | | | | | | | | Some popular fonts on linux systems follow a naming convention, where font styles are named 'Regular', 'Italic', 'Bold' and 'Bold Italic'. Qt so far only accepts the words Italic and Oblique interchangably, but not with Regular and Normal. This change will make sure that Regular is interpreted the same as the Normal font style. Fixes: QTBUG-90396 Change-Id: Ibbaf086de742c91f4d380c937ca80e846aa32a2e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 426b363761dbb4c95d263df2e4acdfab071c8018) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix z-value of QGraphicsItems being ignored during drawQiang Li2021-03-301-1/+1
| | | | | | | | | | | | | | | | In QGraphicsScene's function draw, don't copy the children into a const copy (to prevent detaching in the loops), as they might get sorted. Instead, use a const reference. Amends e349f787d595aa343ca86af94159b6730d55b8d5, which introduced the bug by making a copy of the unsorted list. Fixes: QTBUG-81316 Change-Id: Iab9b87e75178a883806088a9db234c7a2aaa9301 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 269fdef53d98386b714bf6852a1f214e9159faa1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAbstractItemModelTester: fix false positive when model has zero columnsDavid Faure2021-03-302-1/+11
| | | | | | | | | | | Regression introduced by me in commit 72e0d699cec09458ca9325035d477d4899e8e47b Fixes: QTBUG-92220 Change-Id: Ic7dd4eda0a1993f9763933882baf928bfc83b08b Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit b4aac2af19690917553f93660e3ad760fc15d0b9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add nullptr checkOliver Eftevaag2021-03-301-1/+2
| | | | | | | | | Adding a nullptr check before dereferencing in case q is null. Change-Id: Ia440e2ed41cbaf06a5919930c2e1615bb3916ff3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 57f752b30a0f452e9cc079b5a4ede6134719a769) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Redundant condition: tornoffZou Ya2021-03-301-1/+1
| | | | | | | | | | | Redundant condition: tornoff. '!tornoff || (tornoff && scroll)' is equivalent to '!tornoff || scroll' Change-Id: I8339faa4d53360db280173ee489e48eba4883b70 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 712117f8b89cdb2578d6aaa424141da216799fe9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Redundant condition: widgetHuang Jie2021-03-301-1/+1
| | | | | | | | | | Redundant condition: widget. '!widget || (widget && widget->isEnabled())' is equivalent to '!widget || widget->isEnabled()' Change-Id: Ife915bd5ea66f8ccff48a1612f8c78c263075c89 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit d3ec08eea060a9451f06c394bb85a6357504c61e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* The condition 'if(oldChild)' is redundantZou Ya2021-03-301-4/+2
| | | | | | | | | | | Either the condition 'if(oldChild)' is redundant or there is possible null pointer dereference: oldChild. Change-Id: I28971cfa33294679ddd325158669b422b3a1c2eb Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit b487a7929d0f16c82a95e37d13de4651d92214cc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist test QMenu::QTBUG_89082_actionTipsHide() for WindowsFriedemann Kleint2021-03-301-0/+1
| | | | | | | | | | | | Apparently, ba139603925453bf79994eca48b566d8f15b2af0 is not sufficient. Amends 3f3d5e6716d9130776b3613ccbd5595de7d4af8d. Task-number: QTBUG-89082 Change-Id: I80a00abb330bebd3be8667762c279c2eef595c7f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit b62725608bbc1a8924209bd733aefe9f0465c3a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make getter const, add const overloadsVolker Hilsheimer2021-03-302-2/+17
| | | | | | | | | | | | | | | | The supportedApiVersions member is new in Qt 6.1, make it const. We can't change supportedLayers and supportedExtensions, but we can add const overloads that call the non-const version for now. This way, those APIs can also be called on const QVulkanInstance instances or references. Addresses header review comment. Change-Id: Ie99d74f62cad72990b42566e56234b9c686e86de Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 69dcdbc8daa2c40397dd021fc31c47ad528d9d83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use official names for Android versionsVolker Hilsheimer2021-03-302-8/+8
| | | | | | | | | | | | Google ditched the dessert names as of Android "Q". "Q" and "R" were development names, the released versions are called Android 10 and Android 11, respectively. Task-number: QTBUG-90211 Change-Id: I36225067cc802ebd3ebd1289d509759ae1b2d83d Reviewed-by: BogDan Vatra <bogdan@kdab.com> (cherry picked from commit 76b3d024e45cc044bde2b6fb4b24849cf96b0012) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_macgui::scrollBarPainting()Tor Arne Vestbø2021-03-301-0/+3
| | | | | | | | | | | It fails on 10.15 and 11, preventing those from being significant, and the test is already marked as expect-fail based on QTBUG-20984. Task-number: QTBUG-20984 Change-Id: I6911166a1c3e9173d6d36f2a3a68b37778fd3406 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit eab286b760bc33e2f90d1f9e94b34d89266d3d74) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QJniEnvironment exceptionCheckAndClear to checkAndClearExceptionsAssam Boudjelthia2021-03-306-55/+55
| | | | | | | | | | Address feedback from header view. Task-number: QTBUG-90211 Change-Id: Iad2b609598b16f66fd6ab09484fe6e6899981263 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b9f27335e7462a15ac642841bb6d86ebebb349f9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Brush up the imageviewer exampleFriedemann Kleint2021-03-302-4/+5
| | | | | | | | | | | | - Fix the save as file dialog being in "Open" mode by setting acceptMode - Fix clazy warnings about detaching QList by using constFirst() - Fix clazy warning about passing a context to slot connection Change-Id: I0c800e9829e118fcec477322aa2a13660e3b51d2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit fe1ef3ebcbfe017bdb01e16480a5c38cad6e39b9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFontDialog: Fix crash when passing QFont constructed from empty ↵Friedemann Kleint2021-03-301-1/+1
| | | | | | | | | | | | | | string/stringlist The standarddialogs example showed a crash when opening the font dialog due to the empty list. Amends d8602ce58b6ef268be84b9aa0166b0c3fa6a96e8. Change-Id: I93191485c72712d9b2d3ea0ae104f5edb9621f0c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit e49e5d87be4b30522a85037b5dd81be703882b67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace QTextDocumentResourceProvider with a std::functionVolker Hilsheimer2021-03-3012-221/+107
| | | | | | | | | | | | | | | | | | | | | | | 376e3bd8ecf40881685714f6f19e12d68e92127e added the new class for Qt 6.1, but during header review we concluded that using a class introduces complexity wrt instance ownership and API design that can be avoided by using a std::function instead. The functionality is tied to QTextDocument, so the type definition and the default provider API is added there. Since std::function is not trivially copyable, the atomicity of the previous implementation is not maintained, and concurrent modifications of and access to the global default provider from multiple threads is not allowed. The relevant use case can be supported by implementing a resource provider that is thread safe. Task-number: QTBUG-90211 Fixes: QTBUG-92208 Change-Id: I39215c5e51c7bd27f1dd29e1d9d908aecf754fb7 Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit ccf1a1a9536be7b904494f5b3243202d71a33b06) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS: Protect against a possible crash after the window is deletedAndy Shaw2021-03-302-1/+3
| | | | | | | | | | | | | | | | | | If we are in a case where the original window is deleted before a new one is shown then we need to make sure that we are not still expecting that the original one has the focus. So we protect against the crash by only outputting the address of the object that previously had focus. A follow-up patch will be done for inclusion from 6.2 that will fix the root cause of the pointer being invalid when the only window is deleted before a new one is shown. Fixes: QTBUG-92173 Change-Id: Ifdb3fd6b6cb8fb8e8b79d2c325a30c27b298d8a9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit b050d4867f68c3d35493221d65d343749504c988) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rename QUrlResourceProvider to QTextDocumentResourceProviderVolker Hilsheimer2021-03-2912-38/+52
| | | | | | | | | | | | | | | | | | While the class name is now a bit more than a mouthful, it's purpose is very narrowly tied to QTextDocument, so don't use a very generic name for it. That resources are provided based on a URL is to some degree an implementation detail, and URLs are resource locators so we don't need that in the class name. Address code review comment for 6.1. Add documentation and links to existing APIs with a similar purpose. Task-number: QTBUG-90211 Task-number: QTBUG-92208 Change-Id: I4f09057cc2f53a5595513c1c9422e6ccaad6ca13 Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit c8f6f8a2220ce8fd628c969f19dfae6f38d7311c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>