summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QUtf8StringView: ensure binary compatibility throughout 6.xv6.1.0-rc1Thiago Macieira2021-04-203-32/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can't depend on whether the user compiles with -std=c++17 or -std=c++20. So select what we can depend on and make that permanent. Prior to this change: $ cat /tmp/test.cpp #include <QtCore/QUtf8StringView> void f(QUtf8StringView) {} $ qcd include $ g++ -S -o - -I. /tmp/test.cpp | grep globl | c++filt .globl f(QBasicUtf8StringView<false>) $ g++ -fPIC -std=c++20 -S -o - -I. /tmp/test.cpp | grep globl | c++filt .globl f(QBasicUtf8StringView<true>) After this change, they're both "false". QUtf8StringView should have been a concrete class that derived from QBsicUtf8StringView<whichever> and inherited all its constructors. We'd cause ODR violations in C++20, but nothing worse than what we usually do for BC reasons. That solution is too late for Qt 6.x. Let's revisit in 7.0. Pick-to: 6.1 dev Change-Id: I6bcbe88c072a438b8b4efffd166e77199ecb39e3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QString: add missing char8_t* constructor / fromUtf8 overloadsGiuseppe D'Angelo2021-04-192-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we support: QString s = QString::fromUtf(u8"foo", 3); But we don't support QString s = QString::fromUtf8(u8"foo"); QString s(u8"foo"); There's no reason not to have these two functions. Guess what, we've actually got code _in Qt_ that tries to build a QString out of a char8_t; that code stops compiling under C++20 (which is supported, but not CI-tested at the moment, it seems). Re-add the missing constructor and fromUtf8 overloads. [ChangeLog][QtCore][QString] Added a constructor and a fromUtf8() overload taking a `const char8_t *` argument. Task-number: QTQAINFRA-4117 Task-number: QTQAINFRA-4242 Change-Id: I1f0ae658b3490b9e092941cabcc7fb8fc4c51aa3 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit b322bfcc14845a4b6a6eef85ef359b1e4591a5ca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add documentation links for some JNI entitiesAssam Boudjelthia2021-04-183-4/+16
| | | | | | | | | | | Add doc page link for: * AttachCurrentThread call. * Interface Function Table which describes JNIEnv. Change-Id: I12b41429c40838e5133e58132930aede287e2e71 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit d72067c93833e9787a45aeddee800faab0d2d40a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't parse XML symbols longer than 4096 charactersAllan Sandfeld Jensen2021-04-181-0/+5
| | | | | | | | | | It is slow and will use too much memory. Fixes: QTBUG-91889 Change-Id: I45c5e6038357c87bbb85b1ace17ef39a2a814ea0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 38e111158a38507c63fd70f9ee18b9116b537976) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace conversion operator by operator* in QJniEnvironmentAssam Boudjelthia2021-04-146-67/+77
| | | | | | | | | | | | Since conversion operators do implicit conversion that might bring some potential issues while using the API, let's stick to having an operator* instead. Change-Id: Ie7ad5537958944b8d1c11d69fbd30284b4b0344d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 13592385723a9b81b3715b5344bdd04e6a393a12) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNetworkCookie: Rename sameSite to sameSitePolicyMårten Nordheim2021-04-142-8/+8
| | | | | | | | | | As suggested in the API review. Amends 37bd7b5733c7f1a4eb6ac5458fdc46f94a91194a Change-Id: Ic3e8567f349568dc3b4dbf79be27c304b39480cf Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit a7dac8e35be35462973f2f3f653e5d1986005cb2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make POSIX transition rule parser more robustEdward Welbourne2021-04-141-14/+29
| | | | | | | | | | | | | | | | | | | | | | | | | The POSIX rule parser used by QTzTimeZonePrivate recklessly assumed that, if splitting the rule on a dot produced more than one part, it necessarily produced at least three. That's true for well-formed POSIX rules, but we should catch the case of malformed rules. Likewise, when calculating the dates of transitions, splitting the date rule on dots might produce too few fragments; and the fragments might not parse as valid numbers, or might be out of range for their respective fields in a date. Check all these cases, too. Added a test that crashed previously. Changed QTimeZone::offsetFromUtc() so that its "return zero on invalid" applies also to the case where the backend returns invalid, in support of this. Fixes: QTBUG-92808 Change-Id: Ica383a7a987465483341bdef8dcfd42edb6b43d6 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Robert Löhning <robert.loehning@qt.io> (cherry picked from commit 964f91fd25a59654905c5a68d3cbccedab9ebb5a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNetworkInformation: delete the instance as a post-routineMårten Nordheim2021-04-141-2/+24
| | | | | | | | | | | | | | | | | | | | | | | On Windows, on exit, the backend will deref (and then implicitly start deletion of) a COM object. This object tries to communicate with an object in another thread, though it seems this other thread quits before the main thread in _most_ cases. To get around this we move the deletion to earlier in the program. While this is only reported as a Windows issue it makes for more consistent behavior if all platforms behave the same. Document and test that recreation of QNI works as expected after the destruction (and recreation) of QCoreApplication. Amends: 0875626e22ad4e709ddf505e701a8d699559f5b4 Fixes: QTBUG-92568 Change-Id: Iffc07f38673019aa059efd4d64d2ad706a03f6fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit e875c071ec32ab9aa460c982f25f6c6191e41326) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add QNX qpa to buildsMarianne Yrjänä2021-04-144-4/+189
| | | | | | | | | Task-number: QTBUG-91234 Change-Id: I978aff101ce29d2df74ced801911426ccd56e997 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> (cherry picked from commit 9c6721c106cfb593841e99b9670a3ba936254206) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNetworkInformation: make supports(...) not virtualMårten Nordheim2021-04-131-1/+1
| | | | | | | | Change-Id: Ib8d27410e6baa495a7351a57c8c1c1b30a64eb26 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 5a60657363a860520215e4740c80b03ecf1f7e78) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNetworkInformation: Remove the default argumentMårten Nordheim2021-04-132-30/+23
| | | | | | | | | | And the code for loading whatever backend is sorted first. Though, looking at the code it would've never returned 'true' anyway. Change-Id: I7bc2c740e8cb5343e5843cb1d65715d236b92a25 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b67fe6dc7d27f857a4581e583fe25187c673bcaa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNetworkInformation: Private the destructorMårten Nordheim2021-04-132-3/+9
| | | | | | | | | It wasn't meant to be public. Change-Id: Ifa7fff48f82b96bdfa277677d3988dc8881b8c2a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b1fe3e3d80cb23dee4de683e03711d1ac0614de2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Adapt to Harfbuzz 2.8.0 updateEskil Abrahamsen Blomfeldt2021-04-131-4/+11
| | | | | | | | | | | | | | | | The Unicode 13 language tags are available since Harfbuzz 2.6.7. For compilation with earlier versions, also update the hardcoded tags to match the ones in Harfbuzz (and in iso-15924): https://unicode.org/iso15924/iso15924-codes.html Task-number: QTBUG-90217 Pick-to: 6.1 dev Change-Id: I4e2cfdf61a5c4189b8aac51644c9d80c816aeebc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Call statx() with AT_NO_AUTOMOUNTAlexander Volkov2021-04-081-1/+1
| | | | | | | | | | Otherwise it can be very slow in some cases (e.g. 0.5 sec). Besides, AT_NO_AUTOMOUNT is used by {l,f}stat() internally. Change-Id: Iae9c8b46dcdc96d21ac6b114a51c382b4949d3dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9667ac1c2d3b3d48cbd154bece36ec1d41d93a59) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't judge other people's writing systemsVolker Hilsheimer2021-04-081-10/+8
| | | | | | | Change-Id: Ifb8265bad4c8c96c6b20f957c376cec47e28f666 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 2c2b34997468a028de9e9c2de54b21c7e0757fbb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add legacy external storage access flagFabio Falsini2021-04-081-1/+1
| | | | | | | | | | | | | | | | Since latest version of Qt need Android target sdk 29 the qt direct storage access doesn't work because a new scoped storage access way has been introduced. This flag allow to have current storage access way to work again (but is limited to target sdk 29 only) Fixes: QTBUG-92239 Change-Id: If0d0af7c171de4b3e8bb8dd9a88fd61b65d1c839 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit ea4868c49de48eb5fbd129e8cb9df0676754ebf5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QTextHtmlParserNode: Limit colspan to avoid segfaultRobert Löhning2021-04-081-1/+1
| | | | | | | | | | | | | | This fixes oss-fuzz issue 29758. [ChangeLog][QtGui][Text] QTextDocument::setHtml: column spans are limited to 20480, an arbitrarily high but reasonable value. Fixes: QTBUG-92463 Change-Id: Ib759e3e3ac0b0d0d483f8e8ce11002e079db3ace Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 7473317b52dbc15878d81291faa33f21c20d6ec6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid attempting to parse insanely long texts as zone namesEdward Welbourne2021-04-071-0/+18
| | | | | | | | | | | | | | | There are limits on zone name length and the trial-and-error approach we're more or less forced to take to parsing gets horribly expensive if applied to every prefix of a very long string. So apply a loosened version of the zone-name validity rule that limits the length of the fragments between slashes and limit the number of such fragments. Fixes: QTBUG-92275 Change-Id: I83052b1b6888728c81135db22a9c6298ae439375 Reviewed-by: Robert Löhning <robert.loehning@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 0c9fc20e7ff7b4ff0f15e0b2c071ea834625dce9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix get out of bounds index in QSortFilterProxyModel::filterAcceptsRowChunLin Wang2021-04-071-3/+5
| | | | | | | | | | Before calling the index function, we need to check the validity of the parameters. Fixes: QTBUG-91878 Change-Id: I9ec7265fff3f81b8a288c4ba8fae606a2ec808a6 Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit b8802071ed00689373da5817fc4824a30b5fcf86) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* indicator-application hack: fallback to dbus service checkIlya Fedin2021-04-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | There is a hack to work with Canonical's indicator-application tray applet. Since it implements the SNI spec partially and doesn't work with IconPixmap, the icon is broken without the hack. Unfortunately, this tray implementation is still in active use by Ubuntu; it's shipped and enabled by default on at least: * Xubuntu * Ubuntu MATE * Ubuntu Budgie (and maybe even others) Unfortunately, the check doesn't work in confined environments providing broken tray icons for snapped & flatpak'ed apps. Fortunately, snap allows checking all registered services on the host. It also fixes the check on flatpak if permissions to talk with these names are given. Change-Id: Iee5d0bb610c3ff397babee89ef1ee788ac19f477 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 0baa26638d7d14b6609dab191c4ea0cc1d3ff50a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* androiddeployqt: Fix the fallback location of rccJoerg Bornemann2021-04-071-1/+11
| | | | | | | | | | | Now, that rcc lives in libexec, we need to assume the location of rcc to be "bin" on Windows and "libexec" elsewhere. Fixes: QTBUG-92245 Change-Id: Idb81a5d02bae9ca3254e7590140a128500572b07 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 20db8dbeeb808edce683e34de10498ee2cdda0fc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix return type of QMetaType::sizeOf in documentationVolker Hilsheimer2021-04-071-1/+1
| | | | | | | Change-Id: I6f5a866fa83f0e2720d62c5170c9283997b31a7f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 1e8b085f8c8bce5d69852df4c4b72d30fcffe793) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Choose better defaults for qt_add_plugin STATIC/SHAREDAlexandru Croitor2021-04-072-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a recent behavior change where the public CMake API qt_add_plugin API took into account the value of BUILD_SHARED_LIBS to decide whether the plugin should be a static or shared library. Instead, use the following new behavior - If no explicit option STATIC / SHARED option is passed, default to whatever flavor Qt was built as. Aka if Qt was configured with -shared, qt_add_plugin defaults to creating shared plugins. If it's a -static Qt, create static plugins. - If an explicit STATIC / SHARED option is set, override the default computed value with the given value. As a result BUILD_SHARED_LIBS does not affect Qt plugins anymore. This is more in line with Qt expectations. Add SHARED as a new valid option to pass to qt_add_plugin (it wasn't before). Add tests to check for the above behavior. Amends aa4a1006cbccbc180c600f9b4dc9e882bb5ed5ca Fixes: QTBUG-92361 Task-number: QTBUG-88763 Change-Id: Iae806024ddd5cf10cfe58ddbcebd2818084b0bd7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit d0c2425d791edd75e35cce65ddbcfaab9a7f16ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Explicitly set enums' type to avoid undefined behaviorRobert Löhning2021-04-071-2/+2
| | | | | | | | | | Fixes oss-fuzz issue 31022. Fixes: QTBUG-92159 Change-Id: I8f0dfbe0e198f9ac43754758d18db1f0842d6eae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d15bfba176f7e6c616f299e82adfde148b3f26d2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix various documentation issuesTopi Reinio2021-04-075-8/+22
| | | | | | | | | | | - Document QIODeviceBase - Document QPointerEvent::points - Fix linking issues Task-number: QTBUG-90662 Change-Id: Ib123d5708953b22e01f95c82626b39a49fff95b2 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> (cherry picked from commit 00e10f62b55626097e94a2d70a9214c0062fbcd5)
* Update to Harfbuzz 2.8.0Eskil Abrahamsen Blomfeldt2021-04-06245-15037/+23386
| | | | | | | | | | | | | This updates Harfbuzz to the latest version and also adds an import script to help with this work in the future. Task-number: QTBUG-90217 Change-Id: I23eae7b7bbbd5001df9873e4784a0c4213de5508 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 70af64433f491ee28e8b4ff19ebf413d45960155) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix label margins for pulldowns with custom styled menu indicator on macOSDoris Verria2021-04-061-0/+7
| | | | | | | | | | | | | Don't apply the QMacStyle's pulldownButton titlemargins to the QPushButton's contents rect if the button has a custom styled menu indicator. This causes the button's text/icon to be misaligned. Fixes: QTBUG-86134 Change-Id: I6ef95d51071c1d79f1cc07425a46958f50091b7e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 37f9f2e7afb2539ead355f1115e10835c2df9f92) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document change to QAbstractItemView::viewOptions in porting guideVolker Hilsheimer2021-04-041-0/+8
| | | | | | | | | | | | We couldn't deprecate and add the replacement in 5.15, so list it explicitly here. Amends c501e09efacb8a60deb41f85f3402f6f4c041d95. Change-Id: I174a7b6214cd8b9579b029ebf57e4d5b2e28e574 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit a395372ccf7b6ce5575aeec627b403c4f9af9647) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* [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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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-301-1/+4
| | | | | | | | 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>
* 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>
* 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-301-1/+1
| | | | | | | | | | | 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>