summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Generate more Windows/Linux-like Qt keyboard eventsJames McDonnell2018-05-042-198/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QKeyEvent::key values were significantly different on QNX and some QKeyEvent::text values were also different/missing. Also makes it possible to enter numbers via the numeric keypad. Change-Id: Ifcf6284b99a893a87974d37ec6d6976f88241e61 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Dan Cape <dcape@qnx.com>
| * | | Avoid to fail to close stream on exceptionAndré Klitzing2018-05-041-15/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move .close() to finally block. Found by spotbugs. Change-Id: I1d11f52c79e805082f05801e4ef0ec94c6dc4e6e Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | | Fix crash in qsslsocket_opensslMårten Nordheim2018-05-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using the wrong free function in a path which was hit in an edge case (PKCS#12 certificate without a private key attached). Change-Id: I5335b5dea7a926b242bed0fd9b989b681a5828d8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | QJsonDocument: Validate also zero-length objectsJüri Valdmann2018-05-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The added test case is the binary JSON equivalent of {"a":{"š":null}} with two modifications. First, the length of the string "š" has been corrupted to 0xFFFFFF00. Second and more import, the Base::size field of the inner object has been reset to 0. On its own the first modification would normally trigger a validation error. However, due to the second modification the Value::usedStorage for the inner object evaluates to 0, completely disabling all further validation of the object's contents. Attempting to convert this binary JSON into standard JSON will lead to the JSON writer trying to construct a QString of length 0xFFFFFF00. Fixed by validating also objects with usedStorage == 0. Task-number: QTBUG-61969 Change-Id: I5e59383674dec9be89361759572c0d91d4e16e01 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | QJsonDocument: Reject objects containing themselves in binary JSONJüri Valdmann2018-05-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The added test case is a binary JSON file describing an array which contains itself. This file passes validation even though attempting to convert it to plain JSON leads to an infinite loop. Fixed by rejecting it in validation. Task-number: QTBUG-61969 Change-Id: Ib4472e9777d09840c30c384b24294e4744b02045 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | Fix encoding of freetype/LICENSE.txt to utf-8Kai Koehne2018-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous encoding was ISO-8859-1. Change-Id: Id13bf1936120fb8b3630ba671ca92f285fa80dec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | QJsonDocument::fromRawData: Fix out-of-bounds accessJüri Valdmann2018-05-042-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method takes a pointer+size pair, but begins reading through the pointer without first checking the size parameter. Fixed by checking the size parameter. A new test case is added with an empty binary json file. Although the test does not fail under normal conditions, the problem can be detected using valgrind or AddressSanitizer. Task-number: QTBUG-61969 Change-Id: Ie91cc9a56dbc3c676472c614d4e633d7721b8481 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Fix the enabling of AES with ICC and MSVC on some low-end processorsThiago Macieira2018-05-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC and Clang assume that all Sandybridge (2nd generation) and newer Intel Core™ processors have AES, which I used as a source of information for this code. However, there are a few low-end parts that miss this feature, like Intel Core™ i3-2350M, i3-3130M, i3-4000M. [1] https://ark.intel.com/products/series/75025/4th-Generation-Intel-Core-i3-Processors Task-number: QTBUG-67705 Change-Id: If90a92b041d3442fa0a4fffd1525b9afbcb6e524 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QNX: Add screen-context-capabilities platform parameterJames McDonnell2018-05-041-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifies the flags value for the screen_context_create call allowing the Qt application to take on additional screen capabilities via the Qt screen context. Change-Id: Ic7aa478227e64afe2d1d7d04ec58c11ad68b9f22 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | | QNX: Move screen event retrieval to the GUI threadJames McDonnell2018-05-045-115/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of retrieving screen events itself, the screen event thread now turns screen event notification into a Qt signal. In response to the signal, the GUI thread processes screen events. Eliminates the need to coordinate access to a screen event queue. Also prepares the way for getting rid of the screen event thread. This could be done if the QNX event dispatcher were switched from poll to MsgReceive (dispatch). Change-Id: If5892466d04d67f00828fddaea38b20da5fb18a3 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | | Accessibility: Fix leaking cached interfacesFrederik Gladhorn2018-05-042-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the application closes, we should clear the cache to not run into memory sanitizers claiming that we leak. Change-Id: Ibf9fcda107be6b7f3ed414d7651080aa1f61a3a5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | | qpa: improve API to support DnDs from other processesGatis Paeglis2018-05-0412-58/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... instead of using a hack of directly accessing QGuiApplication members. The current QPA API was bad for two reasons: 1) It expects platform plugin authors to know about internals of Qt Gui, particularly that QGuiApplication uses QGuiApplication::{mouseButtons,keyboardModifiers} to construct QDragMoveEvent and QDropEvent events. Which results in the second reason why this is bad. 2) Platform plugins should not directly access member variables of QGuiApplication, just to make sure that QDragMoveEvent and QDropEvent events contain correct state. Platform plugins should instead use QWindowSystemInterface to communicate with Qt Gui (which is also the solution here). The solution is to extend QWindowSystemInterface::handle{Drag,Drop} to require mouse/keyboard state. We already do this for some of the other methods, so it is nothing extraordinary. This type of interface is also _required_ to support drag-n-drops from other processes. We can't use QGuiApplication::{mouseButtons,keyboardModifiers} when the drag originates from another process, instead we need to query mouse/keyboard state from the system. This patch fixes drag-n-drops from others processes on XCB platform plugin. Task-number: QTBUG-57168 Change-Id: I3f8b0d2f76e9a32ae157622fef801829d629921d Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Port placeholder rendering to palette placeholder color roleFilipe Azevedo2018-05-043-6/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I7671d4b55677866b61627cc55a3029a3848f455d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | Add a QPalette color role for placeholder textsFilipe Azevedo2018-05-042-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allow to customize easily placeholders in QLineEdit by example. Change-Id: I2bb379164376e1d88b42d6c86c2e5b8df99fbc56 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | QFileSystemModel: remove unused function naturalCompare()Christian Ehrlicher2018-05-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of the private function naturalCompare was removed with 197da3d220f but the declaration was forgotten. Change-Id: I14b44e3aeccac2c428e509f115ea93c4ba2a7c9b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | QContiguousCache: add assertion to avoid negative capacityChristian Ehrlicher2018-05-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ctor of QContiguousCache and setCapacity are accepting negative values for the capacity. While this should not be done it can happen by accident. Therefore add Q_ASSERT to ensure a positive value. Task-number: QTBUG-19700 Change-Id: I7458100c07c687cdeaebe86400343d79b5a6330a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | macOS: Fix stretch of condensed fonts with NoFontMergingEskil Abrahamsen Blomfeldt2018-05-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When showing a condensed font with AnyStretch, we should not apply any stretch to the font (and if a stretch is requested, we should calculate the actual stretch based on how much the font is already stretched or condensed). This usually works as expected, however, when using QFont::NoFontMerging as the style strategy, we would scale the glyph advances by the stretch of the font since the calculated stretch of the font engine would be overwritten by the actual stretch. In the case where we use font merging, this would be done for the multi engine, so we would not get the same issue, since the text engine gets the stretch from the actual font engine and this still has the original, calculated stretch set. Note on the test: We can't use testString() for this, since it contains a space, and the test font does not have a glyph for this, so we will end up merging a different font for the space, giving us a slightly different advance. [ChangeLog][QtGui][macOS] Fixed display of condensed fonts when NoFontMerging is in use. Task-number: QTBUG-63800 Change-Id: I5b05e0dbfc8ae4b5d10c621ecb0975f53fda9483 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | QShortcut: Try harder to find a widget for parentless menubarsGabriel de Dietrich2018-05-034-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QPlatformMenuBar::parentWindow(). Since we call handleReparent() every so often, it's reasonable to be able to get its value back. While this parent window won't give us much information from the point of view of the actual QWidget parent for the menubar, the main reason we will need this is to check for modality blockage. Indeed, QApplicationPrivate::tryModalHelper() only cares about the widget's window since modality blockage is decided at the window level. Change-Id: Ie79f483424b01e430bc9168ba82489e30d15aec6 Task-number: QTBUG-67938 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | eglfs/kms: Add drm atomic zpos property handlingLionel CHAZALLON2018-05-033-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to specify a ZPOS property for the eglfs plane ZPOS will allow to control the relative position between eglfs layer and the other layers. It is bound to using QT_QPA_EGLFS_KMS_ZPOS environment variable to determine its value. Change-Id: I51986ccb22a9dbaeef20165ac5feb7dbe8047373 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-05-0324-84/+160
|\ \ \ \ | | | | | | | | | | | | | | | refs/staging/dev
| * | | | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-0324-84/+160
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/elasticnodes/graphwidget.cpp examples/widgets/graphicsview/elasticnodes/node.cpp examples/widgets/graphicsview/elasticnodes/node.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_drawing.mm src/widgets/kernel/qmacgesturerecognizer_p.h Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
| | * | | macOS: ensure mouse events from the global monitor has the correct button setRichard Moe Gustavsen2018-05-032-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The global monitor will be used when popup windows are visible to catch all mouse events. But only certain kind of NSEvents has a buttonNumber set to something useful. So we need to check for this case before we create a QPA event. Task-number: QTBUG-60887 Change-Id: I5631c76ae82b8bfd232642036a08b5a8a29491c7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | | Configure window manager to support RCar D3Timo Aarnipuro2018-05-031-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize the device earlier and enable the screen as well. These changes are also compatible with the RCar H3. Change-Id: I4a83dedc0eed9df181c32e60ebf3666824d2a6c6 Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | | QProcess: set proper error state if we failed to create a pipeThiago Macieira2018-05-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the pipe creation fails, we need to properly close the pipes that were successfully created, emit the signal indicating failure and set the state back to NotRunning. The error string is reused from below, so there's no new translatable string. Task-number: QTBUG-67744 Change-Id: If90a92b041d3442fa0a4fffd1526207698f234a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * | | If the page size is not valid on the new printer, set a custom sizeAndy Shaw2018-05-023-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the page size was not valid on the new printer, it would end up having the wrong page size name on the new printer. What should happen in this case is that it should set the originally set page size as a custom page size on the printer instead. Task-number: QTBUG-62221 Change-Id: Iaca34ae262f5d0685ca60e4ca4b38229a2283289 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
| | * | | Feed external geometry changes to QtJames McDonnell2018-05-022-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that Qt responds correctly when window managers make geometry changes. Note: Older versions of screen, such as the screen from the QNX 6.6.0 4036 patch, don't produce SIZE/POSITION property events. Change-Id: I7e1e5982a2cbd3f57d468b43869af8558c6d50e7 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| | * | | Add screenContext native propertyJames McDonnell2018-05-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Retrieving it via some other screen object can be painful especially when there isn't a readily available screen object to use. Change-Id: If13e808435ea6f2909d5b4c3c5c736950e00aa5a Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| | * | | Flush the initial clear blit with SCREEN_WAIT_IDLEJames McDonnell2018-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without it, the clear runs asynchronously and screen may clear pixels _after_ Qt updates them. Change-Id: I0c0844676d8a4387439a2f818ee08942ccaf6b08 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| | * | | macOS: Don't trigger deferred needsDisplay when using timer-based requestUpdateTor Arne Vestbø2018-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've reverted to using the default timer-based request-update mechanism for now, so the code in [QNSView updateRegion:] needs to ensure it's only triggering a deferred needsDisplay if requestUpdate was done via the (now disabled) [QNSview requestUpdate], which uses setNeedsDisplay. Task-number: QTBUG-68048 Task-number: QTBUG-68047 Change-Id: I0421a32773908daa0f1be0075f4f2d25c90c8aea Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | qtestlib: restore qWaitForWindowActive() its original semanticsGatis Paeglis2018-05-021-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes a bad hack for Unity issue described in QTBUG-67757. The workaround from 243a0660e10d13b8bd6eb4f90e5695aefab4611f caused even more problems, see QTBUG-63542. Besides causing more problems, the usage of this hack was inconsistent. The goal was to get stable geometry before continuing further in the test function. The same logic should have been used in qWaitForWindowExposed(). It was never documented that only qWaitForWindowActive() has this tweak. Also this hack was needed only for Unity, instead being unconditionally executed for all platforms. Task-number: QTBUG-67757 Change-Id: I7b7fb4b09151c4ab4807282006d7f956b18f60ad Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| | * | | Fix for mouse with modifiers handlingKarim Pinter2018-05-027-37/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modifier keys are saved in qinputdevicemanager such way that both evdev and libinput can use it the same way, it is also handling the repeating modifier key events. Evdev support is important for VxWorks support because it is using it. Task-number: QTBUG-60694 Change-Id: I49038cb7fe2ad5134b3a37167c19953867ea31c3 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | | Docs: Mark vsp2SetLayerAlpha as preliminaryJohan Klokkhammer Helsing2018-05-021-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the missing documentation. Change-Id: I5bc7fb191a7c073ed0d9e17e682d8ac808c10e96 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * | | xcb: round down the scale factor for values < 0.8Mathieu Velten2018-05-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solves huge UI on some (most ?) HD 13 inches that have a calculated scale factor around 1.75. Task-number: QTBUG-53022 QTBUG-57211 Change-Id: I6cc22d3e47d38cb1d5a0daf5646a936256664e48 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * | | Fix crash in QMacPanGestureRecognizerJan Arve Saether2018-05-022-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason it crashed was this: 1. Button was pressed => _panTimer started with the graphics view as destination. 2. Button was released => the graphicsview is destroyed 3. 300 ms later: Qt tries to deliver TimerEvent from _panTimer to the graphics view. Unfortunately, the graphics view is deleted, but Qt doesn't know that... (*crash*) We therefore chose to start the timer with a destination we are controlling the lifetime of: the QMacPanGestureRecognizer. Inside the timerEvent of that we can check if the actual target is already destroyed. Task-number: QTBUG-60404 Change-Id: Iff8f5b7217de42c4c5cf551ca507f0cff1c99a78 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | | Use QDateTime::toString(Qt::ISODateWithMS) instead of reinventing itEdward Welbourne2018-05-031-27/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following up on a review comment on commit 0a5f71c6062d575602ff041fb1b88ec2d8ad92bc. Change-Id: I46924f5ad1b291039d22a3d6015d80306679ad26 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | | | cups: Show a dialog when asked for passwordAlbert Astals Cid2018-05-031-0/+72
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the default cups implementation is used, that is, asking for the password on the command line, which is probably not what our users expect. Change-Id: Ib563d542fee71c13ed23b1a99fbe06a7d4d4eadf Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | | qFatal: Prevent deadlocks on WindowsThiago Macieira2018-05-021-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We began using abort() on 25d6f312ac5b42a6bbca4d1c3c06742d97283e14 (5.8), which improved since we stopped using exit() with MSVC. However, abort() with MinGW and on debug-mode MSVC's CRT calls _exit(), which attempts to cleanly unload the DLLs, which in turn may run global destructors. [ChangeLog][QtCore][Important behavior changes] qFatal() no longer uses std::abort() on Windows, as there are circumstances where global destructors are still run after that call, leading to possible deadlocks. Task-number: QTBUG-34460 Change-Id: I2bec439d0e9841f58c7ffffd152200e45f1df982 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-05-0241-200/+260
|\ \ \ \ | | | | | | | | | | | | | | | refs/staging/dev
| * | | | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-0241-200/+260
| |\| | | | | | | | | | | | | | | | | | Change-Id: Ia082e20e2eb4b76afd4c1a1584ff4e5514655d7a
| | * | | Convert features.toolbar to QT_[REQUIRE_]CONFIGStephan Binner2018-05-0230-157/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move declaration of pick/perp helpers up the dependency chain Change-Id: I7084ed829a057a0c45d60445c416fb07f2cb5624 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * | | QItemSelectionModel: More fixes for is(Column/Row)SelectedDaniel Teske2018-04-301-27/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the code for isRowSelected and isColumnSelected with a much simpler algorithm for deciding if a row/column is selected. In a model with a cross-hatch of unselectable indexes, the return values of is(Column/Row)Selected would depend on the order in which the selections were done. Task-number: QTBUG-18001 Change-Id: I6aa4b1df7c07fae469a686041927fa8c42bc9b16 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | | QitemSelectionModel: Fix a bug in isColumnSelectedDaniel Teske2018-04-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the code for isColumnSelected and isRowSelected differed slightly, in how unselectable indexes would be treated. This made isColumnSelected return false for a column, which mixed unselectable indexes and selected indexes. Thus in some situations, the user could not deselect a column via a QTableView header. By copying the isRowSelected code to isColumnSelected, rows and columns behave identical. Task-number: QTBUG-18001 Change-Id: I6ca85ac64b31a481fafeaa3bec958b18283eed8d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | | Remove assert from QFormLayout::takeRow()Sergio Martins2018-04-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having rows without fields is a supported use case so it shouldn't assert. Code works quite well in release mode, but crashes in debug mode. Change-Id: I1c4f736318489bae09780fcdb56136181afcac17 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * | | Stop rejecting cookies which have a domain that matches a TLDMårten Nordheim2018-04-301-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... but only if the host it came from is an EXACT match. Also only apply the cookie if the url is an EXACT match. [ChangeLog][QtNetwork][QNetworkCookieJar] Cookies will no longer be rejected when the domain matches a TLD. However (to avoid problems with TLDs), such cookies are only accepted, or sent, when the host name matches exactly. Task-number: QTBUG-52040 Change-Id: Ic2ebd9211c48891beb669032591234b57713c31d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | | Fix handling of QDBusMessage in qdbuscpp2xml in bootstrapped modeVolker Krause2018-04-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In bootstrapped mode QDBusMessage isn't available, so looking up the type via QMetaType wont work. QDBusMetaTypeId has this special-cased, but that alone isn't enough for qdbuscpp2xml to produce the same result as in non- bootstrapped mode. The effect of this has also been described here before in detail: http://lists.qt-project.org/pipermail/development/2017-February/028756.html Change-Id: Id309a3a910f971c6150cdc6d06f2b48f1b95c787 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Specify that you need an instance of QNetworkAccessManager per threadJussi Witick2018-04-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The class is not thread safe, so one instance is not enough for whole application. Mention that QNetworkAccessManager instance can only be used from the thread it belongs to because it is a QObject. Change-Id: I56184e4f8fbd36aca3f6677310431eab88346e6e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | Fix for input method commit that ends with newlinePaul Olav Tvete2018-04-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the input method event contains a commit text that ends with a newline, text, the commit string is inserted first. This changes the current block. This change makes sure that we apply the formatting changes (including removing the old preedit text) to the old block in this specific case. Task-number: QTBUG-67836 Change-Id: Ia83963780fb14b3c571dbbe3eb81fbbe20fbf412 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * | | QMimeDatabase: check 128 bytes rather than 32, for text vs binaryDavid Faure2018-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per today's change in the MIME spec. https://bugs.freedesktop.org/show_bug.cgi?id=97372 Change-Id: Iba4fdd95c3ebec8a042404956db3466a46c97f1d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | QWidgetWindow: Immediately forward close events to QWindowUlf Hermann2018-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way the platform window is destroyed in a timely manner, preventing redundant close events from the window system. Task-number: QTBUG-43344 Change-Id: Ifdfca59ceacef54405f1c227c493dc514a1b27ea Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | | Remove hack that violates ODRThiago Macieira2018-04-261-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC with LTO sees through our hack: qprintdialog_unix.cpp:212:7: warning: type ‘struct QPrintDialogPrivate’ violates the C++ One Definition Rule [-Wodr] qabstractprintdialog.cpp:49:7: note: a different type is defined in another translation unit This hack was there so that the QPrintDialog functions in qabstractprintdialog.cpp could use the d pointer. So instead of hacking around the issue, just use the class that this file has access to: QAbstractPrintDialogPrivate. Change-Id: I3840d727dee443318644fffd1528e2e8b814e983 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>