summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix QAbstractItemModelTester false positiveLuca Beldi2021-04-191-2/+2
| | | | | | | | | | | When rows are removed from a model with no columns, the test should not report a problem if indexes are invalid Fixes: QTBUG-92886 Change-Id: I7a042dfdb2575f87208a00cbed13db3869807f84 Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit fed2c0d23614df1b96dcc8746223501b07597a52) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Unicode: fix the extended grapheme cluster algorithmGiuseppe D'Angelo2021-04-193-6292/+6462
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UAX #29 in Unicode 11 changed the EGC algorithm to its current form. Although Qt has upgraded the Unicode tables all the way up to Unicode 13, the algorithm has never been adapted; in other words, it has been working by chance for years. Luckily, MOST of the cases were dealt with correctly, but emoji handling actually manages to break it. This commit: * Adds parsing of emoji-data.txt into the unicode table generator. That is necessary to extract the Extended_Pictographic property, which is used by the EGC algorithm. * Regenerates the tables. * Removes some obsoleted grapheme cluster break properties, and adds the ones added in the meanwhile. * Rewrites the EGC algorithm according to Unicode 13. This is done by simplifying a lot the lookup table. Some rules (GB11, GB12, GB13) can't be done by the table alone so some hand-rolled code is necessary in that case. * Thanks to these fixes, the complete upstream GraphemeBreakTest now passes. Remove the "edited" version that ignored some rows (because they were failing). Change-Id: Iaa07cb2e6d0ab9deac28397f46d9af189d2edf8b Fixes: QTBUG-92822 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> (cherry picked from commit a794c5e287381bd056008b20ae55f9b1e0acf138) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Unicodetools: compileGiuseppe D'Angelo2021-04-191-0/+2
| | | | | | | | | | | | | Add an #include for a header that was only accidentally included transitively. Task-number: QTBUG-92822 Change-Id: Ie29bb0e065f2db712e9cf9539b15124ff0ced349 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit fd0c3170c890707c5cea63b11895084d149d991c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Re-layout QProgressDialog when setting the cancel buttonQiang Li2021-04-191-0/+2
| | | | | | | | | | | | | | | Setting a cancel button on QProgressDialog more than once caused the layout to be invalid. The layout was only applied when the dialog resizes or the style changes, but not when a new cancel button is set. The solution is to update the layout() before showing the dialog when adopting new child widgets. Fixes: QTBUG-19983 Change-Id: Id8fb1ac56e94a9bd97d4559a2e8d4835856fd7d0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 777053cfff40570282e861527e0e52e22a359629) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS: Protect against a possible crash after the window is deletedAndy Shaw2021-04-192-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>
* QODBC: Preserve the whole value when using HighPrecisionAndy Shaw2021-04-191-1/+2
| | | | | | | | | | | | | Some ODBC drivers do not properly handle SQL_NO_DATA and therefore decimal values returned with HighPrecision are cut off because the decimal point is not taken into account. Fixes: QTBUG-73286 Change-Id: I905c947b4d0266a3245d5735300300ca00f77480 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit c2657f9762e01abd65ac991ba31e3ca085d9540c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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. 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> (cherry picked from commit aeeaab1a5ac0b4d91c9f9b542035b8970e4c61dd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMultiHash: Fix docFabian Kosmale2021-04-161-3/+2
| | | | | | | | | In Qt 6, QMultiHash does not iherit QHash Change-Id: Iaad8768d681a9aad2bb1f80fd87904f0dd9683d4 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit e27390f8e1fb961e783ce1004b3a8caf5eeaeca6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNetworkDiskCache: Drop the file mmap-ingMårten Nordheim2021-04-161-12/+1
| | | | | | | | | | | | | | | Presumably the code at some point would do a QByteArray::fromRawData-style thing. But now it doesn't do that so the current code was a bit strange. It would map the content of the file to memory only to then copy the content into a QByteArray. Then it reparents the file to the QBuffer, keeping it alive even if its not needed. Fixes: QTBUG-92838 Change-Id: I88f8cd1b64e0fd13d08b5cc4df44661e216da340 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit c254d73be63033497838807119cb9cb47ca6c1fa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't parse XML symbols longer than 4096 charactersAllan Sandfeld Jensen2021-04-161-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>
* Doc: Fix various documentation issuesTopi Reinio2021-04-165-8/+22
| | | | | | | | | | | | | - Document QIODeviceBase - Document QPointerEvent::points - Fix linking issues Task-number: QTBUG-90662 Task-number: QTBUG-92273 Change-Id: Ib123d5708953b22e01f95c82626b39a49fff95b2 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> (cherry picked from commit 00e10f62b55626097e94a2d70a9214c0062fbcd5) Reviewed-by: Topi Reiniö <topi.reinio@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. Fixes: QTBUG-91957 Fixes: QTBUG-92485 Change-Id: I238cbbe1eebddff1ce56da38127899cdbd21db0e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 004189b2d8e751021f26d9eb28948f753ea8208c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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. Change-Id: I9e9f7861257ad5bce46a0cf113d1a9d7824911e6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f4d791b330d02777fcaf02938732892eb3167e9b) 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>
* Add missing compile definitions to the resource object libraryAlexey Edelev2021-04-141-0/+3
| | | | | | | | | | | The resource object library must be compiled with the definitions specified in Qt::Core. Missing the required definitions causes linker problems when QT_NAMESPACE is defined. Change-Id: If0ca20604e251822279e0d4906c47b94d3b4ceb4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 9466b3629a391ae93c4f06d3627e3dc9e10bba9f) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Correct item indent in checkable menus in stylesheet styleEirik Aavitsland2021-04-141-2/+2
| | | | | | | | | | | Not only the checkable items need to be indented, but all items in the same menu, so that they line up. Fixes: QTBUG-90242 Change-Id: I559005f753b5cd19eaeeeb6658178d62de93b4ef Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 96e9c8cc8aae718942f79ac98e775f06501b0e25) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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 Change-Id: I998f99ddacec32640834d59a907d569fdda458f0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 94e03e506a0e953f72c21c4ca827174a3d1f0d73) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix build without features.menuTasuku Suzuki2021-04-131-7/+7
| | | | | | | Change-Id: If7947839b8da5abc8ee84aace60cc7de7a053e04 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit d84bf703b505db470e5c7916e3cd630c3e456cef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't disable menu items that belong to the active modal windowVolker Hilsheimer2021-04-123-5/+18
| | | | | | | | | | | | | | | | | | | A popup/context menu created via QQuickPlatformMenu doesn't belong to any menubar, so by disabling items in a menu that doesn't belong to the currently active menubar (5b9f6862b1), we disabled all menu items in a QQuickPlatformMenu when a modal window was active. For such unrooted menus, use the QCocoaMenuObject data structure to record which window it is shown for, and only disable items if that window is not also the current modal window. Amends 5b9f6862b1aa474a392203c69f6db678d633cecf. Fixes: QTBUG-92040 Change-Id: I56b6d579e5e94689b43ca84d4637e35dc2cbeb4c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 2bdaf28034541cd57b0aa7c067fda8cfbffa0e94) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAbstractItemModelTester: fix false positive when model has zero columnsDavid Faure2021-04-121-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>
* QtFuture::connect: disconnect signals firstMårten Nordheim2021-04-121-7/+7
| | | | | | | | | | | During reportFinished we may call a continuation which might end up triggering one of the signals. Change-Id: I19546fcca12be71cd536e4287eb5eddd9d236830 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit bb85831e4de5e2c4951a0c40003ccf36f57cbd93) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QtConcurrentIterateKernel: fix warningMårten Nordheim2021-04-121-1/+1
| | | | | | | | | | src\concurrent\qtconcurrentiteratekernel.cpp(134): warning C5055: operator '*': deprecated between enumerations and floating-point types Change-Id: I934e767e77e9393e1da3adc390dc8e252e7f5b6a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> (cherry picked from commit b86176abf6a66b20cebbcb53958229590b4c2253) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Restore support for reading /etc/timezone for system zone nameEdward Welbourne2021-04-121-7/+15
| | | | | | | | | | | | This restores one of the two mechanisms removed in commit b0383cbd388336f698ceeac11a4f50cdff931dd9, transformed to fit in with the new cached system-zone determination. Fixes: QTBUG-87326 Change-Id: Ic270acb0d958e17dbc74a0ff93a5a1843c939678 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 824d963700a91294ba4a543ebb486aedbd650284) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix read-only pseudo-state in QPlainTextEdit stylesheetEirik Aavitsland2021-04-091-1/+7
| | | | | | | | | | | Was implemented for the other text edit widgets, but not for QPlainTextEdit. Fixes: QTBUG-92490 Change-Id: Idd2a1b5c743fc030d3f2d4dd24e98f806b58f4d9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f3a042c5ab998c0d283017f3569bb72c392580b7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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>
* Fix removing columns when QSortFilterProxyModel has not been sorted yetJoni Poikelin2021-04-081-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>
* Fix incorrectly-drawn menu indicator for QPushButton on macOSDoris Verria2021-04-081-1/+2
| | | | | | | | | | | | | | Because the QPushButton's bevel rect is smaller than its actual widget's rect, custom styled menu indicators are drawn outside the bevel frame on macOS. Fix this by drawing the menu indicator inside the bevel's rect instead of the widget's rect. Fixes: QTBUG-90250 Change-Id: Ie63d68d8f564a4a640bdb8e7564f028784faab97 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 0eb0fc87014b8de06473055bd2298b2423d480f6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QTextHtmlParserNode: Limit colspan to avoid segfaultRobert Löhning2021-04-071-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>
* 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>
* Fix label margins for pulldowns with custom styled menu indicator on macOSDoris Verria2021-04-071-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>
* QTypeInfo: Handle T::value_type being equal to TFabian Kosmale2021-04-051-4/+13
| | | | | | | | | | | | | | | | | | Fix operator checks for containers whose value_type equals themselves. It does not make sense to recurse on value_type in that case. Thanks to std::disjunction having short-circuiting semantics, we can avoid that issue by checking first whether T is T::value_type. As a drive-by, check for value_type typedef before checking for begin/end in is_container. This works around an issue in gcc <= 8.1, which fails to correctly SFINAE the case where begin and end are private methods. Fixes: QTBUG-89456 Change-Id: I27305a7cfe050f13a279c07f00bc229c01daa25b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit ce83e56cfeb2806181ec1daade9690f4c90b901c) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>
* QLocalSocket/Win: fix possible UB in _q_pipeClosed()Alex Trotsenko2021-04-011-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-04-011-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>
* QPainterPath: fix handling of fill rulesGiuseppe D'Angelo2021-03-262-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | fillRule() contained a major blunder: instead of checking if the d-pointer was allocated, and return a default value if it wasn't, it checked whether the path contained any points. This means that QPainterPath p; p.setFillRule(x); Q_ASSERT(p.fillRule() == x); was failing. As a drive-by to test this change, fix another mistake in clear(): clear is documented to clear the elements in a path, but instead it also changed the fill rule. This commit partially reverses 697910e5fbd382e78bc1bcbac3f5824aded059b4. Change-Id: Ieb8145694b672439c3380d9ccb87d1206a2dd115 Done-with: Milian Wolff Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 0b4ccbf81ee2009051169f2f0918442b56512b20) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix no mapping for SysReq keyAndrey Butirsky2021-03-251-0/+1
| | | | | | | | | | | | | | | | | | XKB_KEY_Sys_Req keysym is currently unmapped to any Qt::Key. Implication of this it is uncapable to participate in any keyboard shortcuts. This patch adds the missing mapping. Detected by testXkb KWin unit test Fixes: QTBUG-92087 Change-Id: I2440c218e265c5636fc1d2703f14d8bfe033967e Reviewed-by: Andrey Butirsky <butirsky@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> (cherry picked from commit 40193c2b6919875a714e84f5029ba2bcc1f9e258) 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-251-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>
* QEventDispatcher(Win): Always honor interrupted status to avoid racesMårten Nordheim2021-03-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | There may be a race where e.g. thread 'B' is woken up by a queued invoke. At the same time thread 'A' asks 'B' to quit, which will set various atomics (some important ones are 'interrupt' in the dispatcher and 'exit' in the event loop), but it does _not_ try to send another wake since there is already an unhandled wake triggered by 'B' itself. Sadly 'B' reads the 'exit' atomic before 'A' updates it. Then, slightly before, 'B' sets 'interrupt' back to 0, 'A' write 1 to it, meaning 'A's interrupt is ignored. Then, since there is no interrupt, 'B' goes back to waiting for events, leaving the thread alive and running instead of quitting. Maybe this has unforeseen consequences (one consequence is that it will return and re-enter the event dispatcher once more, possible unnecessarily) Fixes: QTBUG-91539 Change-Id: Ie6f861f42ffddf4817d5c8af2d764abe9d9103c2 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit f274f91cebb0a4fd2ebe37bb3a605c47d6acd404) 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-241-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>
* Fix alpha handling of QImage::setPixelv6.0.3Allan Sandfeld Jensen2021-03-232-7/+26
| | | | | | | | | | It was treated differently depending on format, made it consistently behave the same for all formats (following the behavior of the primary formats). Change-Id: Ie24e19957d076fdf3ebd333074e26ede187489eb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit c32cd44d34910cfd42e32537578e4a573138a282)
* Fix invalid pointer return with QGridLayout::itemAt(-1)Zhang Yu2021-03-221-3/+3
| | | | | | | | | | | QGridLayout::takeAt() and QLayoutItem *itemAt() only check the upper bound. If the index < 0, these function will return invalid pointer. Fixes: QTBUG-91261 Change-Id: Idfb9fb6228b9707f817353b04974da16205a835c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit c47bb4478a4c3a29c0505d7d89755f40601b326f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Don't draw scrollbar handle when there is no rangeAndy Shaw2021-03-201-1/+1
| | | | | | | | | | If the minimum and maximum is set to be the same then we should not draw the handle. An empty groove should be shown instead. Change-Id: Ie79f55cd761f9a8f614967c40c23a7f59e700a0f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit aac33296e618e617ab9e05b3c71682a13f2d5dfc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SQLite: Update to 3.35.2Andy Shaw2021-03-203-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>
* CMake: Get rid of the Core_versiontagging object libraryAlexandru Croitor2021-03-201-17/+4
| | | | | | | | | | | | | | | | | | We don't currently handle object libraries when creating prl files for static Qt builds, so it's best to compile files as part of the main Core target. Use source file COMPILE_OPTIONS to add the -fno-lto flag to the global/qversiontagging.cpp source file. Amends 2d4a40f93fd3f0fd31110ef7d19a12fc56c00967 Change-Id: Iac1d37ecb4caa7c9889d44b3a103a9bdafec49f3 Reviewed-by: Christophe Giboudeaux <christophe@krop.fr> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit d68486547aaf05994f39786f8527bcb454c6db3f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Consistently check for nullptr in QGraphicsTextItem::inputMethodQueryVolker Hilsheimer2021-03-191-8/+10
| | | | | | | | | | | | | If dd->control is nullptr, then it's nullptr all the way, so don't dereference it in the calls to dd->controlOffset. Fixes static analyzer warning 9c33d9bc9b8cf438dccb63aa52afcbe0. Change-Id: I7a61b6438422373678d4fcb66255b750c550724d Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 7edf0fbb9e8cca2e2f2695a1b5dc7a0a143bc211) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid int overflow in QImage rotate90/180/270Eirik Aavitsland2021-03-191-21/+21
| | | | | | | | Fixes: QTBUG-91223 Change-Id: Ice53c80d695a5ffdf9162df84e7c9b1e43106bae Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 8daa94431341afece6beb052e6224d215f8507b7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update bundled libjpeg-turbo to version 2.0.6Eirik Aavitsland2021-03-1926-150/+235
| | | | | | | | | [ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.0.6 Change-Id: I3e308d241853edf3c1d616955cda203220a258d8 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit ede0082f861146d441df641d93f815dbe63a9076) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAsn1Element: Avoid overflow in QAsn1Element::toIntegerRobert Löhning2021-03-181-2/+3
| | | | | | | | | | Fixes oss-fuzz issue 29534. Change-Id: I51d0b8238c73e5860c40d3b74577ddb8926647a3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 11a3eab1e168256778c45090b56e998e50c08c55) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>