summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* uic: Fix font family code generation for pythonv6.1.0Friedemann Kleint2021-05-033-2/+12
| | | | | | | | | | Amend the code introduced by d8602ce58b6ef268be84b9aa0166b0c3fa6a96e8 to generator correct code for Python. Pick-to: 6.1 dev Change-Id: I71fc9a1830d6bd591d32ce08002572c29f02a27f Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Skip tst_QUrl::testThreading() under QEMUv6.1.0-rc2Andrei Golubev2021-04-262-0/+5
| | | | | | | | | | | It usually fails the test with "corrupted size vs. prev_size" message coming from malloc() or some other memory allocation routine (which signals about memory corruption probably) Task-number: QTBUG-93176 Pick-to: 6.0 6.1 dev Change-Id: I5e34971267c52c63cda2489bef5b09bed739f532 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add more tests for QList/QString/QBAAndrei Golubev2021-04-263-27/+471
| | | | | | | | | | | | | | | The major part is stability tests for QList operations, Also added std::shared_ptr to the Custom type. shared_ptr accesses the memory which does not directly belong to QList, so using it inside a passed-to-qlist type is beneficial (e.g. ASan could catch extra issues) Basic prepend-aware cases added to QString/QBA tests Task-number: QTBUG-93019 Pick-to: dev 6.0 6.1 Change-Id: I50e742bdf10ea9de2de66539a7dbb9abc4352f82 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Change QList's insert() and emplace() to always invalidate [pos, end())Andrei Golubev2021-04-261-107/+114
| | | | | | | | | | | | | | | | Drop the "move left if pos <= size / 2" path in favor of reference stability of insert and emplace operations Leave the insert(0, ...) and emplace(0, ...) as special cases for prepend optimization as invalidating [begin, end()) practically means that we can reallocate behind the scenes Doing this also simplifies the code a bit Task-number: QTBUG-93019 Pick-to: dev 6.0 6.1 Change-Id: I7c248f96d687e94a6a38f81ade901619ff2b4733 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Do not shift the data pointer when removing all elements from QListAndrei Golubev2021-04-261-5/+7
| | | | | | | | | | Because leaving the pointer untouched is a much more expected behavior The tests for this (and not only) logic can be found in the following commit Pick-to: dev 6.0 6.1 Change-Id: Iec9eec9bbce04c9fd90cb6be9627c135cd989b7f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add tests for QtPrivate::q_relocate_overlap_nAndrei Golubev2021-04-261-0/+281
| | | | | | | | | | | | | | Test the relocation logic through the QADP::relocate() method which basically calls q_relocate_overlap_n inside and then ensures that the data pointers are in good state Running these locally in fact revealed a bug in the implementation, so these tests are definitely good to have Task-number: QTBUG-93019 Pick-to: dev 6.0 6.1 Change-Id: I353ed46a31c5c77cd0c5fcacd3dfce46e5cf3e67 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Resurrect data moves in QListAndrei Golubev2021-04-268-100/+366
| | | | | | | | | | | | | | | | | Use the data moves to readjust the free space in the QList, which ultimately fixes the out-of-memory issues caused by cases like: forever { list.prepend(list.back()); list.removeLast(); } Task-number: QTBUG-91801 Task-number: QTBUG-91360 Task-number: QTBUG-93019 Pick-to: dev 6.0 6.1 Change-Id: Iacff69cbf36b8b5b176bb2663df635ec972c875c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add q_points_into_range to container utilitiesAndrei Golubev2021-04-263-18/+19
| | | | | | | | | We already used it in QString and QBA. And implicitly in QADP (see parent commit). Might as well move to a common location and reuse Pick-to: dev 6.0 6.1 Change-Id: I694f0f1dbd109f17c134f64b3f3dc28d19556c88 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QJniObject templates implementationsAssam Boudjelthia2021-04-264-693/+722
| | | | | | | | | | | | | | Define the template calls in the header to allow for better type handling and checking with constexpr and avoid overuse of macros. Depending on the type provided in the QJniObject's call, the signatures and the correct JNI function variant is used. If a type is not supported a static_assert throws a compiler error. Change-Id: I8a4d3ce85e1ff76ef385633f2a68511fffd12e55 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit f4e23bf3deb69131f78eb78a1cb06da0fe72d9d4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Expose sub-arch test results as featuresAlexandru Croitor2021-04-233-44/+66
| | | | | | | | | | | Needed for QT_FEATURE_foo checks in repos other than qtbase when building SIMD specific files (e.g. qtimageformats). Task-number: QTBUG-85447 Task-number: QTBUG-93017 Change-Id: Ibd2200fe24cecbb0b2a092f645ca622baf738601 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 8f2795b17fde2a595fbb67f4531c3d49b8b3d2cd)
* 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>
* Fix DESTDIR handling on Windows for Qt modules != qtbaseJoerg Bornemann2021-04-191-2/+18
| | | | | | | | | | | | | | | | | | | | | | | On the CI system, we build qtbase with CMAKE_INSTALL_PREFIX set to a path without a drive letter to support DESTDIR when installing. Other Qt modules are built without CMAKE_INSTALL_PREFIX set. The Qt6BuildInternals package provides a default value. Since commit e6527e2f73663205a0f36feac5a7feda47fba152 this default prefix is calculated from the current installation location. This default prefix however has a drive letter, breaking DESTDIR support. Broken DESTDIR support in this case means for Android that file(INSTALL) can properly install but stripping will silently fail. We now compare the "real path" of the original prefix from qtbase and the calculated prefix. When they're equal, we use the original CMAKE_INSTALL_PREFIX. Pick-to: dev 6.1 Fixes: QTBUG-92890 Change-Id: I96fb0655e02c5c695722b7e01a32e209cbdea4cc Reviewed-by: Alexandru Croitor <alexandru.croitor@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-147-70/+83
| | | | | | | | | | | | 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-143-11/+11
| | | | | | | | | | 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-142-14/+45
| | | | | | | | | | | | | | | | | | | | | | | | | 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-144-2/+98
| | | | | | | | | | | | | | | | | | | | | | | 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>
* CMake: Fix duplicate symbol errors in Windows static super buildsAlexandru Croitor2021-04-131-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | qt_internal_add_executable has some special logic to link static plugins in order to avoid issues with link cycles on exported Qt module targets. This logic does not take into account if a plugin is a default plugin. On windows this caused duplicate symbol linking issues in static super builds, because both qwindows and qdirect2d define a subset of the same symbols. Make sure to only link to default static plugins. This will skip linking to qdirect2d because it's not a default qpa plugin and thus avoid linker issues. Amends 5807e1ae8168a5702ad0f6890d2b35223cfebdee Fixes: QTBUG-92451 Change-Id: I56df2ce0201625088417de53038642518c1d3bbd Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit ededf3914297aca62e1d257175305cab5dbf6da2)
* CMake: Fix auto-importing of plugins in static Qt qmake projectsAlexandru Croitor2021-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the plugin .pri files that CMake generated for qmake consumption contained an '-' to exclude the plugin from auto-importing only if the plugin type was generic or a platform plugin. Now that plugin projects that should be excluded have a proper DEFAULT_IF FALSE clause, we can simply query for the defaultness of the plugin to know whether to exclude it in the generated .pri file. This fixes an issue with Qt static builds and qtvirtualkeyboard. The vkb plugin was not excluded and thus any simple QtGui app linked to the vkb plugin in a static qmake project. This led to linker issues because the vkb plugin also depends on a vkb quick plugin which is not listed as a dependency. Augments 76230d98795a2e7a365328eb693ff57f6ddd7f1d Amends c975c35eaebcca3bd33931fecc3beb513e332292 Fixes: QTBUG-92529 Task-number: QTBUG-87861 Change-Id: I9671f6504374cf0799289bbe19110e01c129402e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit b6dd5d7c3b6735ef0f50c7eb068727496bff4abf) 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 binary compatibility files for Qt 6.0.0Milla Pohjanheimo2021-04-0811-0/+93524
| | | | | | | | | Binary compatibility files added. Change-Id: I89fe7daae970af697ec57a414e3c90b24d4f9a86 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 9224f8e99fd8be0aaf5971783af4e32e3795ca24) 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>
* Explicitly set output files for qtpreprocessNikolay Avtomonov2021-04-071-1/+7
| | | | | | | | | | | | | This fixes build error with XCode 10. XCode 10 build system (a.k.a "New Build System") requires all the files that are generated by scripts and used later on build to be explicitly defined as output files. Task-number: QTBUG-71035 Change-Id: Ibec39eee53b0cb3acecf592f1ca53c04b9975cad Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 3f0858ed10d249acb942597b4065080411281b87) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix condition that adds resources for each Android ABIAlexey Edelev2021-04-071-6/+4
| | | | | | | | | | | | | If we already have the list of Android ABI in BUILDS, it's not necessary to generate extra resource while Qt build. Amends: 58556afb6960b442f88649b550aaec8e1a04338b Fixes: QTBUG-88031 Change-Id: I344efe6c477461659a360281da59c4abeae18fc2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 72d1393c1d88a70c337e87c661bbeefe46346d23) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Only embed launch screen when building an appChristoph Keller2021-04-071-1/+1
| | | | | | | | | | | | Xcode's new build system checks duplicated entries when building. Qmake wants to embed the launch screen for all types of configurations (static libraries etc.) which makes Xcode bail out with "Multiple commands produce LaunchScreen.storyboard". Task-number: QTBUG-71035 Change-Id: I5c028e687f16e046b12156c1a8a89540deba4d3b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 9c24ad3b94cb8c67468e947f02dd1f9aaf246085) 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-072-3/+22
| | | | | | | | | | 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>
* Remove last trace of licheckKai Köhne2021-04-071-15/+0
| | | | | | | | | | | Since we don't feature it for CMake, there's little point in keeping it for qmake. Change-Id: I7f17d2536510c0b94dca9767036ceab7ec08e1d8 Reviewed-by: Tino Pyssysalo <tino.pyssysalo@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 337bd058b97d923ff539fa6ec87414761d0d67fc) 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-076-4/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Avoid using prohibited target property names with INTERFACE targetsCraig Scott2021-04-072-5/+5
| | | | | | | | | | | | | | | | | | | | | CMake 3.19 removed the restrictions on allowable names for properties on INTERFACE targets. With earlier CMake versions (back to CMake 3.11), names for custom properties must begin with either a lowercase letter or an underscore. In 5807e1ae81 (Add plugins to Qt tools and executables for static builds, 2021-03-19), the names QT_REPO_PLUGIN_CLASS_NAMES and QT_REPO_PLUGINS were used, but in some cases, the targets on which they were being set are INTERFACE targets. Replace these with names that are supported with CMake 3.11 or later. Amends 5807e1ae8168a5702ad0f6890d2b35223cfebdee Task-number: QTBUG-91915 Change-Id: Ife702a1fb339b190d46a8dafb380253219199ba6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 256dea0df74dc05ded438b33b6be8735048fd402) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* standarddialogs example: Fix font handlingFriedemann Kleint2021-04-071-1/+7
| | | | | | | | | | | The example crashed since it passed the font label text (which receives the font key) to the QFont constructor taking the family list. Use QFont::fromString() instead. Change-Id: I499fc9200b4d817b10c946a7b79ede4e7f7e69af Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit c10159a9a1254992867242897adb19ae1c3c3c35) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix various documentation issuesTopi Reinio2021-04-076-11/+25
| | | | | | | | | | | - 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)
* CMake: Build minimal subset of tests in desktop static buildsAlexandru Croitor2021-04-0712-33/+58
| | | | | | | | | | | | | | | | | | | | | | | | Add new configure option -make minimal-static-tests and CMake option QT_BUILD_MINIMAL_STATIC_TESTS. In conjunction with QT_BUILD_TESTS it will enable building a minimal subset of tests when targeting a static desktop Qt build. In qtbase the minimal subset includes all the auto tests of testlib, tools, corelib and cmake. In particular this will also do cmake build tests and qmake build tests (tst_qmake) Adjust CI instructions to enable building a minimal subset of static tests when a platform configuration is tagged with the MinimalStaticTests feature. Fix and skip a few tests that were failing. Task-number: QTBUG-87580 Task-number: QTBUG-91869 Change-Id: I1fc311b8d5e743ccf05047fb9a7fdb813a645206 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 0e6c4224f00999d4089d7c2ac462bb5a60a14adc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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>
* BLACKLIST tst_qfont for Red HatHeikki Halmet2021-04-061-0/+2
| | | | | | | | | Task-number: QTQAINFRA-4363 Task-number: QTBUG-84248 Change-Id: I791aba3bf2b26f9c90201b1dcd67c2a85d28f08b Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> (cherry picked from commit c87847db8781a6846069e0f7e55b8ccc64d9420d) 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>