summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix handling of surrogates in QBidiAlgorithmEdward Welbourne2021-04-161-2/+2
| | | | | | | | | | | | Prior code was naively assuming the character after a high surrogate would necessarily be a low surrogate, which is buggy. Fixes oss-fuzz issue 29718. Pick-to: 6.0 6.1 5.15 Change-Id: I10f023c4b5024a0d76fea0a3672001063591ec6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Robert Löhning <robert.loehning@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Switch metatypes generation on by default for Qt modulesUlf Hermann2021-04-161-0/+1
| | | | | | | | | | We need the metatypes for anything directly or indirectly exposed to QML. Switching this on has no runtime overhead. For interface libraries we cannot generate any metatypes, though. Change-Id: I7b7f85bb4e16c28d00383c5c88b0f1c172c8d193 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Merge integration refs/builds/qtci/dev/1618561273Qt CI Bot2021-04-162-10/+19
|\
| * Catch invalid offset returns from QTimeZone backendsEdward Welbourne2021-04-162-10/+19
| | | | | | | | | | | | | | | | | | | | If the backends run into an error in computing the offset, they return INT_MIN; but they are valled via the front-end, which returns zero when the zone is invalid. So treat INT_MIN returns from the backend the same as the case of being invalid. Change-Id: Ic3c4dfe964dbfba4030c770213eca8a63e84736d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Don't parse XML symbols longer than 4096 charactersAllan Sandfeld Jensen2021-04-161-0/+5
| | | | | | | | | | | | | | | | | | It is slow and will use too much memory. Pick-to: 6.1 6.1.0 6.0 5.15 Fixes: QTBUG-91889 Change-Id: I45c5e6038357c87bbb85b1ace17ef39a2a814ea0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QTest: add helper methods to test bindable propertiesIvan Solovev2021-04-162-0/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds helper methods to test bindable properties in the QTest lib. These methods can be useful in many Qt modules, so we decided to have them in qtbase. For now they are in the private header, because we are not sure that they can be useful for the end users. Task-number: QTBUG-89874 Change-Id: I6738728df1bcd895758008ef2ade0d3693802c3e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | Merge integration refs/builds/qtci/dev/1618515869Qt CI Bot2021-04-168-32/+56
|\ \ | |/ |/|
| * QWindowsPipe{Reader|Writer}: restructure signalsAlex Trotsenko2021-04-158-32/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For QProcess, there is no point in suppressing recursive QWPR::readyRead() emission, as the former manages this logic itself. On top of that, the non-recursive nature of QWPR::readyRead() indirectly disallowed reading from the channels inside QProcess::waitForReadyRead(), if that is called from a slot connected to QProcess::readyRead(). QWPW had two signals, one allowing recursion and one not. This commit allows recursion of QWPR::readyRead() and QWPW::bytesWritten(), and moves recursion suppression to the higher- level classes. This makes the code more uniform and efficient, at the cost of a few duplicated lines. Change-Id: Ib20017fff4d92403d0bf2335f1622de4aa1ddcef Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* | Make QLocale documentation more honestEdward Welbourne2021-04-153-87/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Documented the fall-back process by which QLocale selects an actual locale based on what it is asked for. The prior documentation was wrong. In the process, removed some out-of-date claims about QString's toInt() and toDouble() caring about the default locale; and caught a few more cases (in \internal docs) of country -> territory. Fixes: QTBUG-90962 Change-Id: I5e7cfa66443c9335a71fb2048c3f2ebf7af64573 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make script and territory optional in QLocale constructorsEdward Welbourne2021-04-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously the (language, territory) constructor had optional territory; however, the (language, script, territory) one required all three. Making the latter's script and territory optional, while requiring the former to pass territory, makes it possible to construct with (language), with (language, territory), with (language, script) or with (language, script, territory), without (overt) use of AnyScrit or AnyTerritory. Change-Id: Iaf6e46c473042d886eee7068515f9e41a704c2e7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add the "Territory" enumerated type for QLocaleJiDe Zhang2021-04-1523-289/+449
|/ | | | | | | | | | | | | | | | | | | The use of "Country" is misleading as some entries in the enumeration are not countries (eg, HongKong), for all that most are. The Unicode Consortium's Common Locale Data Repository (CLDR, from which QLocale's data is taken) calls these territories, so introduce territory-based names and prepare to deprecate the country-based ones in due course. [ChangeLog][QtCore][QLocale] QLocale now has Territory as an alias for its Country enumeration, and associated territory-based names to match its country-named methods, to better match the usage in relevant standards. The country-based names shall in due course be deprecated in favor of the territory-based names. Fixes: QTBUG-91686 Change-Id: Ia1ae1ad7323867016186fb775c9600cd5113aa42 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge integration refs/builds/qtci/dev/1618460978Qt CI Bot2021-04-151-3/+3
|\
| * Fix build without features.texteditTasuku Suzuki2021-04-151-3/+3
| | | | | | | | | | Change-Id: I3702137451bd5022c454645b1198d63843778214 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge integration refs/builds/qtci/dev/1618451439Qt CI Bot2021-04-155-2/+16
|\ \
| * | Add new enum value VisualTabCharacter into QCharZhang Hao2021-04-155-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this enumeration value, users can get the width of the current font TAB character more conveniently In addition, added some documentation about where users may use this enumeration. Fixes: QTBUG-92205 Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Change-Id: I9794b7553e9299e351f9182de02866d07a1393fc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge integration refs/builds/qtci/dev/1618447824Qt CI Bot2021-04-151-4/+1
|\ \ \ | |_|/ |/| |
| * | Fix build without features.threadTasuku Suzuki2021-04-151-4/+1
| |/ | | | | | | | | Change-Id: I233808be77dbf1930ebf65b6f23298414eab1da7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* / Q{*String,ByteArray}View::length(): use qsizetype, not intGiuseppe D'Angelo2021-04-159-59/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like these ones have been forgotten in the Qt 5 -> 6 upgrade to qsizetype. Change them to return qsizetype as well, and fix the docs. Being entirely inline, non-exported classes, we should be able to get away with it without affecting binary compatibility. Moreover, there's no reason for keeping them deprecated. Requires some minor adjustments, just like the ones done for size()'s changes. [ChangeLog][QtCore][QStringView] The length() function now returns `qsizetype`, not `int`, for consistency with the other string and container classes in Qt. Following this change, it has been un-deprecated. [ChangeLog][QtCore][QAnyStringView] The length() function now returns `qsizetype`, not `int`, for consistency with the other string and container classes in Qt. Following this change, it has been un-deprecated. [ChangeLog][QtCore][QUtf8StringView] The length() function now returns `qsizetype`, not `int`, for consistency with the other string and container classes in Qt. Following this change, it has been un-deprecated. [ChangeLog][QtCore][QByteArrayView] The length() function now returns `qsizetype`, not `int`, for consistency with the other string and container classes in Qt. Following this change, it has been un-deprecated. Fixes: QTBUG-92496 Change-Id: Ie0f4939d1083884e95d4725f891b6c6764532cb8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge integration refs/builds/qtci/dev/1618405176Qt CI Bot2021-04-147-68/+78
|\
| * 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. Pick-to: 6.1 6.1.0 Change-Id: Ie7ad5537958944b8d1c11d69fbd30284b4b0344d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Fix partial pixel coverage calculationAllan Sandfeld Jensen2021-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | We want right - left, but the numbers we have are (1 - left) and right, so we need right - (1 - left) = right + left - 1. Pick-to: 6.1 6.0 Fixes: QTBUG-91957 Fixes: QTBUG-92485 Change-Id: I238cbbe1eebddff1ce56da38127899cdbd21db0e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge integration refs/builds/qtci/dev/1618401544Qt CI Bot2021-04-143-17/+43
|\ \
| * | Avoid processing-intensive painting of high number of tiny dashesEirik Aavitsland2021-04-141-9/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When stroking a dashed path, an unnecessary amount of processing would be spent if there is a huge number of dashes visible, e.g. because of scaling. Since the dashes are too small to be indivdually visible anyway, just replace with a semi-transparent solid line for such cases. Pick-to: 6.1 6.0 5.15 Change-Id: I9e9f7861257ad5bce46a0cf113d1a9d7824911e6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | QNetworkCookie: Rename sameSite to sameSitePolicyMårten Nordheim2021-04-142-8/+8
| |/ | | | | | | | | | | | | | | | | As suggested in the API review. Amends 37bd7b5733c7f1a4eb6ac5458fdc46f94a91194a Pick-to: 6.1 6.1.0 Change-Id: Ic3e8567f349568dc3b4dbf79be27c304b39480cf Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge integration refs/builds/qtci/dev/1618397939Qt CI Bot2021-04-141-14/+29
|\ \
| * | 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 Pick-to: 6.1 6.1.0 6.0 5.15 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>
* | Merge integration refs/builds/qtci/dev/1618392398Qt CI Bot2021-04-141-2/+24
|\ \ | |/ |/|
| * 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 Pick-to: 6.1 6.1.0 Change-Id: Iffc07f38673019aa059efd4d64d2ad706a03f6fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge integration refs/builds/qtci/dev/1618388786Qt CI Bot2021-04-141-10/+8
|\ \
| * | QNetworkInformation(Win): cleanup dtorMårten Nordheim2021-04-141-10/+8
| |/ | | | | | | | | | | | | | | | | I don't like how it looks, so make stop() work even if it's not monitoring so that the dtor can call it unconditionally, and without needing a CoUninitialize call of its own. Change-Id: I06832d7e1d34317ff49ea2c425c79588719d7cd0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | QBindable: Mark non-modifying methods as constFabian Kosmale2021-04-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | A few methods in QBindable which do not modify anything were not marked as const so far. This adds the missing const, and a test to verify that they work. As all methods are fully inline, this does not cause any binary compatibility issues. Fixes: QTBUG-89508 Change-Id: If06d33bc405232887b8c371c268840ba34dbadf6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix build without features.systemsemaphoreTasuku Suzuki2021-04-141-1/+1
|/ | | | | Change-Id: I73059f48d37253b5f962f96f693f26c7d55a31e1 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Merge integration refs/builds/qtci/dev/1618376490Qt CI Bot2021-04-141-4/+4
|\
| * Fix build without features.imTasuku Suzuki2021-04-141-4/+4
| | | | | | | | | | | | | | invalid conversion from ‘int’ to ‘Qt::InputMethodHint’ [-fpermissive] Change-Id: Icc67470ff6ef788b4f1b2eae46c6372b7f40c0d2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Cleanup leftover QWSTasuku Suzuki2021-04-147-25/+3
|/ | | | | | | QWS is replaced with QPA in Qt5 Change-Id: Iccec38e55ae23a27ebecd8010e1df7bba8aa5a33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Only scroll QMenu when there is a valid active actionZhang Hao2021-04-141-1/+1
| | | | | | | | | | | | | | When changing the active action via QMenu::setActiveAction the menu will scroll to the active action, but we were scrolling the menu also when the active action was null, resulting in the menu scrolling back to the top. We fix this by guarding the call to scrollMenu. Fixes: QTBUG-92096 Pick-to: 5.15 6.0 6.1 Change-Id: I998f99ddacec32640834d59a907d569fdda458f0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Document how bindable properties can be used in a multithreaded contextAndreas Buhr2021-04-131-0/+6
| | | | | | | | | | | | Add documentation which specifies that bindable properties cannot be used in a multithreaded context. Actually, they can be read when the owning thread is suspended completely, but this should only be used by Qt internally. Task-number: QTBUG-90511 Change-Id: I87effac3aea35205f05151cba3c95816da9a5c9d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Merge integration refs/builds/qtci/dev/1618334477Qt CI Bot2021-04-131-3/+11
|\
| * Fix build without features.highdpiTasuku Suzuki2021-04-141-3/+11
| | | | | | | | | | | | | | Add four template functions missing in stub. Change-Id: I7ca126f866a76efc26167340ff2e35a60775078b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge integration refs/builds/qtci/dev/1618328561Qt CI Bot2021-04-131-35/+27
|\ \ | |/ |/|
| * Light cleanup in QSemaphore Futex implementationAllan Sandfeld Jensen2021-04-131-35/+27
| | | | | | | | | | | | | | | | Gets rid of a goto, fixes overflow detection with wakeAll set, and fixes 64-bit futex mode with futexHasWaiterCount = false. Change-Id: I8bb98118013fc1dc2a8a405845bec0cb3350494f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge integration refs/builds/qtci/dev/1618321030Qt CI Bot2021-04-135-11/+196
|\ \
| * | Add QNX qpa to buildsMarianne Yrjänä2021-04-134-4/+189
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-91234 Pick-to: 6.1 6.1.0 Change-Id: I978aff101ce29d2df74ced801911426ccd56e997 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
| * | Fix build without features.menuTasuku Suzuki2021-04-131-7/+7
| |/ | | | | | | | | | | Change-Id: If7947839b8da5abc8ee84aace60cc7de7a053e04 Pick-to: 6.0 6.1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge integration refs/builds/qtci/dev/1618317407Qt CI Bot2021-04-132-28/+13
|\ \ | |/ |/|
| * QAbstractAnimation: initialize the private members while declaring themSona Kurazyan2021-04-132-28/+13
| | | | | | | | | | | | | | Change-Id: I5de0510d06b7d8e10c3cb0d4f23fb7991b8d6c51 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge integration refs/builds/qtci/dev/1618310175Qt CI Bot2021-04-131-4/+11
|\ \ | |/ |/|
| * 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 Change-Id: I4e2cfdf61a5c4189b8aac51644c9d80c816aeebc Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 910ac477f013f2af690b66f1ac41d65ab7527843) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Merge integration refs/builds/qtci/dev/1618306545Qt CI Bot2021-04-138-28/+31
|\ \ | |/ |/|
| * Silence qdoc warningsVolker Hilsheimer2021-04-132-0/+3
| | | | | | | | | | | | | | | | | | These are internal APIs, so silence qdoc which seems to get confused by the missing CALLBACK annotation in the implementation. Change-Id: Iddd9f87257843cc3d43597fe7e6c103aa5e1a646 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>