summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.4' into ↵Tarja Sundqvist2022-04-0799-5043/+7898
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I3d223d54a832c8365fec4b399550da79f4c1abbb
| * 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>
| * Make POSIX transition rule parser more robustEdward Welbourne2021-04-161-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: Edward Welbourne <edward.welbourne@qt.io>
| * Doc: Improve deprecation messages for functions using QString::SplitBehaviorKai Köhne2021-04-132-8/+21
| | | | | | | | | | | | | | | | | | | | | | Directly link to the recommended replacement. Inspired by forum.qt.io discussion: https://forum.qt.io/topic/125277/multiple-warning-messages-when-using-split-in-qt-5-15-2 Change-Id: Id880e892b90b6e37bc4f7888968a490b634785ce Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * 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>
| * Doc: Fix return type of QCursor::shape()Sze Howe Koh2021-04-121-2/+1
| | | | | | | | | | | | | | | | | | | | QCursor::shape() returned an int in Qt 3 but returned Qt::CursorShape since Qt 4. Change-Id: I6da9da9bed35c09943a074e7e3a618bce7797ceb Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 30ac9d5db4ff40b8a09c376c27acde770dc61e02)
| * QPainterPath: fix handling of fill rulesGiuseppe D'Angelo2021-04-122-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>
| * QAbstractItemModelTester: fix false positive when model has zero columnsDavid Faure2021-04-111-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>
| * Fix removing columns when QSortFilterProxyModel has not been sorted yetJoni Poikelin2021-04-111-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>
| * Windows QPA: Fix accessibility focus event for table/tree/listAndre de la Rocha2021-04-101-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>
| * Fix invalid pointer return with QGridLayout::itemAt(-1)Zhang Yu2021-04-101-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>
| * Assert that pointer is not nullptr before dereferencingVolker Hilsheimer2021-04-091-0/+1
| | | | | | | | | | | | | | | | Fix static analyzer warning 0dc0b2a764417025a335a3a60b814335. Change-Id: I9891194b74dda51032c887b9351fe7314174fcd6 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 95a31d0738dfcda6c2bd618ee8b754b40ad38122)
| * QLocalSocket/Win: fix possible UB in _q_pipeClosed()Alex Trotsenko2021-04-091-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>
| * iOS: Disable three-finger-tap editing interaction menu when there's no focus ↵Tor Arne Vestbø2021-04-091-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | object A typical Qt application, such as a QML application, is a single full screen QUIView, containing all of the granular controls of the UI. The view accepts first responder status, so that we can pass on text input to a possible text field inside the UI. That however triggers iOS to bring up the editing interaction menu whenever the user taps with three fingers, as iOS can't know that only parts of our view is suitable for interaction. To mitigate that we override the editingInteractionConfiguration getter of the view, as documented, and dynamically report the correct enablement based on whether we have an active focus object that accepts input. This works because iOS queries the getter from the three finger tap gesture recognizer, before showing the menu. Change-Id: I0874340c42e437e1d7251896993f2eafe122f09e Fixes: QTBUG-89735 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit f0f00dbd119e0169bc81aa761e4d548e4ecf2214) 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>
| * QTextHtmlParserNode: Limit colspan to avoid segfaultRobert Löhning2021-04-091-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>
| * Don't judge other people's writing systemsVolker Hilsheimer2021-04-091-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>
| * macOS: Don't draw scrollbar handle when there is no rangeAndy Shaw2021-04-091-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>
| * QSystemSemaphorePrivate: Fix a call to tr() to translate()Tuomas Vaarala2021-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | Calling QCoreApplication::tr() without #if QT_CONFIG(translation) can cause the build to fail if configured without translation. Changing the call to QCoreApplication::translate() fixes that. Change-Id: I48f0e1be14fc81360b8268620afc2f6c8f255819 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 1051e23ce91a980c5e961b4dcb6d61997bc08050)
| * 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>
| * Avoid int overflow in QImage rotate90/180/270Eirik Aavitsland2021-04-081-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>
| * Avoid undefined color values in corrupt xpm imageEirik Aavitsland2021-04-081-1/+1
| | | | | | | | | | | | | | | | | | Issue reported by Codechecker. Change-Id: I1a5aa2203fb31e0ce3b630a11e450925aee81fb0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f651e6a26cb59f7b7c7671cded8a10b9f98f5c71) 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-04-081-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>
| * 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>
| * FileChooser portal: send window id in hexJan Grulich2021-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | We send window id in decimal, however, it is expected to be send in hex. This causes a mismatch and makes portal dialog to show in background. Change-Id: Ibd77199bbb4a2ad4782a0457ddc5506c6b5608fe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit acaabc9108dfe75530960cf8e3ec4f3602cd82e0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * fix windows build when both whatsthis and tooltip are disabledNick Shaforostov2021-04-071-1/+5
| | | | | | | | | | | | | | | | | | | | msvc produces warning there and it is treated as error Change-Id: Ic386df615df591fa1563b147342d670bbec771d2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 0ad434c2e9c81ae319840b1bc563c9f04efac524) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix incorrectly-drawn menu indicator for QPushButton on macOSDoris Verria2021-04-061-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>
| * 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>
| * Font style name 'Normal' and 'Regular' have the same meaningOliver Eftevaag2021-04-061-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>
| * QString: improve lastIndexOf(QRegularExpression) docsGiuseppe D'Angelo2021-04-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Due to how regex matching works, lastIndexOf has to be implemented by matching from the string's beginning until the from position is reached. This might not be obvious for users, so document that. Task-number: QTBUG-89050 Change-Id: I4b69ea753e7d417d980031926f1e01d77e58720d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 6f2dc8d7f27419d13bfbb2af272af99c03c66562) Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * eglfs: Newer Nvidia libdrm provide device instead driver module namePasi Petäjäjärvi2021-04-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | In newer Nvidia proprietary libdrm binaries display device name is actual device and not driver module name. Check which provided device name has been returned with EGL_DRM_DEVICE_FILE_EXT to choose correct function to open device. Fixes: QTBUG-91184 Change-Id: I95f907dfa30057da0dca4ff32e0605c6bb10e0a5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit d8347bd9fe6914cd8c9da4bbfebfa9fb230ef114) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Android: KEYCODE_MEDIA_PLAY_PAUSE translated rightPiotr Mikolajczyk2021-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | KEYCODE_MEDIA_PLAY_PAUSE was incorrectly translated to Qt.Key_MediaPlay. This patch changes it to Qt.Key_MediaTogglePlayPause. Fixes: QTBUG-66448 Change-Id: Icd2747857bc479228bfdffcd8ab8fdef7b79e918 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 096b4590d5aefc16b9c68611fdc1463b4c173f80) Reviewed-by: Piotr Mikolajczyk <piotr.mikolajczyk@qt.io>
| * iOS: Protect against a possible crash after the window is deletedAndy Shaw2021-03-302-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we are in a case where the original window is deleted before a new one is shown then we need to make sure that we are not still expecting that the original one has the focus. So we protect against the crash by only outputting the address of the object that previously had focus. A follow-up patch will be done for inclusion from 6.2 that will fix the root cause of the pointer being invalid when the only window is deleted before a new one is shown. Fixes: QTBUG-92173 Change-Id: Ifdb3fd6b6cb8fb8e8b79d2c325a30c27b298d8a9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit b050d4867f68c3d35493221d65d343749504c988) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Consistently check for nullptr in QGraphicsTextItem::inputMethodQueryVolker Hilsheimer2021-03-251-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>
| * Remove qualification for Julian calendarAlex Blasche2021-03-251-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 alpha handling of QImage::setPixelAllan Sandfeld Jensen2021-03-242-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)
| * Restore support for reading /etc/timezone for system zone nameEdward Welbourne2021-03-231-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 handling of virtual/native pixels in QAndroidPlatformWindowAndreas Buhr2021-03-232-22/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | f92e1953699b2529cc6ea2fd399fe4f2b887e83c made sure a new QAndroidPlatformWindow always has a geometry. However, it did not take into account HiDPI handling. This patch fixes it and introduces proper HiDPI handling. Fixes: QTBUG-91161 Change-Id: Iddf31b7abfd0a1bada3b051ed4de3bf6c2897d8e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit dec429e0778493bc4e85d6b18202804d0bbbe5f1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Disable Harfbuzz/CoreText hotfix on older macOS/iOS versionsEskil Abrahamsen Blomfeldt2021-03-222-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the new default font on macOS 11 and iOS 14 does not have the AAT tables we usually check for, we added a check for TRAK as well, otherwise we would end up applying the wrong kerning rules to the font in these newer versions of the operating systems. However, this introduced a regression on older versions when letter spacing was set. This basically just disables the ligature features when shaping, so the reason is not fully understood, but the assumption is that it exposes a bug in the CoreText shaper backend in Harfbuzz which was previously hidden. The pragmatic fix for this is a second hotfix which disables the previous one on older OS versions, since: A. The original bug does not occur on older versions. B. Newer versions of Harfbuzz (and therefore Qt) does not exhibit the problem since this code path is no longer used. To do this we also need to rename the hb-coretext.cc file to .mm to enable using the Objective-C APIs. This is all pretty ugly, but it is not upstreamed anywhere and has limited lifespan. [ChangeLog][macOS/iOS] Fixed a regression when combining letter spacing with the default font on macOS 10.15 and lower or iOS 13 or lower. Fixes: QTBUG-91764 Change-Id: I50c8ad08d51899635418aeaa38230bbeab5c5ef7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * 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>
| * QAsn1Element: Avoid overflow in QAsn1Element::toIntegerRobert Löhning2021-03-191-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>
| * Remove the unnecessary template parameter from the class specializationSona Kurazyan2021-03-171-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>
| * Include minus sign in ImhFormattedNumbersOnly's available keysEdward Welbourne2021-03-161-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>
| * MODULE_INCLUDEPATH is supposed to be one pathAllan Sandfeld Jensen2021-03-152-3/+3
| | | | | | | | | | | | | | Avoid the moving of jconfig.h, and messing up MODULE_INCLUDEPATH Change-Id: Ib66e8a47cff80f252a7bfb3363b73f63bdbaab8a Reviewed-by: Michal Klocek <michal.klocek@qt.io>
| * QEventDispatcher(Win): Always honor interrupted status to avoid racesMårten Nordheim2021-03-121-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 CI Bot <qt_ci_bot@qt-project.org>
| * Android: Place cursor correctly on screen when editingPiotr Mikolajczyk2021-03-127-15/+96
| | | | | | | | | | | | | | | | | | | | | | | | When editing text the cursor is not placed correctly. So this has been achieved by tricking Android into thinking that the input area is only the line where the cursor is, so it is forced to keep it on screen. Fixes: QTBUG-91073 Change-Id: Icc2e8315deb76ca1a84819d3fdceaa7b027b1174 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit 5c6b10c3cee5737dbc041d0463220898c8120807)
| * Revert "QPushButton: fix support of style sheet rule for text alignment"Volker Hilsheimer2021-03-121-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6269438af95bbd988ead08829fa3bc9dc25891e8, and adds a test. This change introduced QTBUG-91735, without fixing QTBUG-86857 correctly. The code already interprets the textAlignment values from the rule, also if no icon is set. Adding the same, or some default textAlignment to the text flags if there is no icon doesn't work. Fixes: QTBUG-91735 Task-number: QTBUG-86857 Change-Id: Iee07e63a40e72909275f32e1caa28b33a595f879 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 674747bac1c8b57d4940de2ee68b6b562dfcad61) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QStylesheetStyle: fix push button label alignmentChristian Ehrlicher2021-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | Due to a copy'n'paste error in 01ec11507d7ef3de09bad9d1ef8e6d4a3d6c4428 the valign was not properly determined for text-align bottom. Fixes: QTBUG-89366 Change-Id: I081e1b24bba0edd9dd3754599a111c1658b18746 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 41e665a452166259b5cad64994de3298751eb7f3)
| * Support family names that end/start with spaceEskil Abrahamsen Blomfeldt2021-03-111-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>
| * wasm: fix opengl context stencil and depth buffer handlingLorn Potter2021-03-101-14/+2
| | | | | | | | | | | | Fixes: QTBUG-72231 Change-Id: I1040c009a3fc8b0025fc9878c8766cd3a9ec9e89 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>