summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | Ensure QOpenGLWidget FBO is always initializedTor Arne Vestbø2018-11-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLWidget uses an FBO internally, that is glCleared whenever recreated. But for the clear to be visible across shared contexts we must also issue a glFlush. QOpenGLWidget defers this flush until the compositing step, in QOpenGLWidgetPrivate::beginCompose(), based on a flushPending variable. This variable is set either after invoking the user's paintGL() function, or when opening a QPainter on the QOpenGLWidget, via QOpenGLWidgetPaintDevice::ensureActiveTarget(). Unfortunately, if QOpenGLWidget::paintEvent() is overridden or intercepted (meaning we will not end up calling paintGL()), but the overridden paint event does not open a QPainter, we end up never setting flushPending to true, and end up composing an uninitialized FBO. This can lead to rendering issues, or even kernel panics with some unfortunate GL drivers. The fix is to ensure the glClear is always flushed before composing, by forcing a pending flush whenever the FBO is recreated. Fixes: QTBUG-70921 Change-Id: I72b596c09dcf54bd0f37668062daaad2d6f7f4bd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | | | macOS: Reset font glyph caches when application theme changesTor Arne Vestbø2018-12-092-1/+8
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our glyph caches on 10.14 are based on the application appearance, so when the application goes from dark to light or light to dark, we need to reset and re-populate the glyph-caches to account for the new appearance. Change-Id: If019d8cfa33ffb2b14747444b2ff74b288992f55 Fixes: QTBUG-71018 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | Do not use arc4random_buf() on GNU/kFreeBSDDmitry Shachnev2018-12-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not available in the GNU C Library. Change-Id: I36dc92fca283c126669885b75406c8e57f563ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Optimize further the loading of 8 Latin 1 charactersThiago Macieira2018-12-081-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is important when AVX is enabled, which makes the VMOVQ load and the VPMOVZXBW instruction be combined into a single VPMOVZXBW with direct memory access. This is guaranteed to only read 8 bytes, so it's safe even close to the end of a page. Clang and ICC do combine the instructions like we want and I have filed a request for GCC to do so too[1]. AVX was first introduced in 2011, so plenty of computers today would benefit from this. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87317 Change-Id: I8f261579aad648fdb4f0fffd1553e08e90df3171 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Allow overriding the maximum cached glyph size via the environmentTor Arne Vestbø2018-12-081-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Useful for testing. Change-Id: I8cfd4453018cba0301287ad6a1c15a88cdc33c1c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | | Revert "Ensure alignment of image-data"Allan Sandfeld Jensen2018-12-081-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ae8389e19c5804c867b2981311c623003a691474. The result of malloc should be aligned in any case, and this change conflicts with the use of realloc on the data elsewhere. Change-Id: I01773132b240614a2656dd3013490b0df9cd14a7 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QToolButton: Don't elide text if an icon is presentChristian Ehrlicher2018-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous fix which adds an automatic text elision when the QToolButton is not large enough brought up an inconsistency between QToolButton::sizeHint() and QCommonStyle::drawControl(). Fix it by syncing the magic numbers between QToolButton::sizeHint() and QCommonStyle::drawControl(). Fixes: QTBUG-72226 Change-Id: If4a76792cb97bcdb918e18c6b29cb637730acec0 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | | | Set QScroller's parent to its widget, for memory managementShawn Rutledge2018-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the widget to which the scroller was assigned is deleted, the QScroller ought to be deleted too, to avoid filtering events and then following a dangling pointer while trying to react. Fixes: QTBUG-71232 Change-Id: I62680df8d84fb630df1bd8c482df099989457542 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* | | | untangle the egl-x11 relationship in the build systemOswald Buddenhagen2018-12-073-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | egl-x11 is used in two places: - the eglfs-x11 plugin, which has a hard dependency on xcb-xlib - the xcb-egl plugin, which has a soft dependency on xcb-xlib that means that the egl-x11 configure test needs to be untangled from xcb, and that eglfs-x11 should be a separate feature with a proper dependency declaration. when the plugins that need egl-x11 are not built, it also makes no sense to build the respective integration in the egl_support module (even if it's possible to coax it into building), so adjust things accordingly. Change-Id: Ic729d0b7c893dd00844567329205c24ea2703033 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | | configure: atomize xcb-* tests properlyOswald Buddenhagen2018-12-072-28/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xcb is a dependency which should be detected upfront. same for xlib. this also removes calls to functions coming from the dependencies from the tests (both because these calls prove nothing, and because at some point we will stop linking transitive deps). Change-Id: Iac77305eab33ea8ff5c71302cef980eb908d8403 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | | configure: convert xlib to a proper library definitionOswald Buddenhagen2018-12-073-16/+18
| | | | | | | | | | | | | | | | | | | | Change-Id: I1623aee9e8632e4bfd466e09e275cc23f94c6dab Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | | wasm: fix freetype library sourceOswald Buddenhagen2018-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib99c4c178808c7325e55e85a1548542ae3c57524 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | | | configure: fix linking with statically linked freetypeTim Blechmann2018-12-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | freetype depends on zlib. using statically linked freetype as system library lacks the usage requirement to link with zlib. so we need to add this manually. Task-number: QTBUG-63115 Change-Id: Iaf0f3027bd9d1386fcc1ecfbfbe07ab09b2d0bb9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | | Merge "Merge remote-tracking branch 'origin/5.12.0' into 5.12" into ↵Liang Qi2018-12-072-1/+11
|\ \ \ \ | | | | | | | | | | | | | | | refs/staging/5.12
| * \ \ \ Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-052-1/+11
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I54b4c14bed5150d3034ac87907a09254fd78face
| | * | | | [Android] Fix the ability to override environment and argumentsv5.12.0BogDan Vatra2018-12-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mechanism should only be enabled only for debug deployments, but the check was removed by accident in ca139228abdd522a76b2750aed607440568eb7f3. Fixes: QTBUG-72230 Fixes: QTBUG-72132 Change-Id: I3378436e93314fdf254919aed066f1284a4581b3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * | | | Fix build errors in OpenSSL 1.1 backendTimur Pocheptsov2018-11-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSL_CTX_set_ciphers is new in 1.1.1. Task-number: QTBUG-71983 Change-Id: If0ae9f95dcc867c62ed0d3a6a60c22c7f5e1cc9f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 36f3eeaf3ec12126956d151a026379ab0385ab72) Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | | Windows QPA: Fix onPressedChanged only reported on touch upv5.12.0-rc1Andre de la Rocha2018-11-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This issue was caused by the workaround added to fix QTBUG-70887. Certain events like the initial touch down do not generate mouse messages after the pointer messages (but only touch messages) and should not be postponed by the pointer handler. Fixes: QTBUG-71775 Change-Id: I7b64ae4d422f6a4c1bb465ce5f8255e85640dab1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | | | | QScroller: Fix crash when multiple scrollers are registeredFriedemann Kleint2018-12-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure the scroller cannot be added multiple times to the list of active scrollers. Patch as contributed on bug report. Amends 8b8e53f7267911c4f406f5c6f54e4a60a0f32112. Change-Id: Ic4e7d3e981f36e330dfd28d468288c5ef4b74a4c Fixes: QTBUG-72244 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | | | QSettings: quick refactor for readabilityThiago Macieira2018-12-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Helps with debugging the code too, as you can follow what's on the file with the "ch" variable. Change-Id: Idd0c85a4e7b64f9c9c7dfffd156c5b7d76cf657b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | | | Fix QSettings parsing of spaces after comment linesThiago Macieira2018-12-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QSettings] Fixed QSettings parsing of blank spaces after comment lines in INI-style configuration files. Fixes: QTBUG-72007 Change-Id: Idd0c85a4e7b64f9c9c7dfffd156c5b219f3b5c0a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | | | | QTest: Make QCOMPARE of QCborError produce outputThiago Macieira2018-12-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was getting: Actual (reader.validate()) : <null> Expected (QCborError::NoError): NoError Change-Id: Ib47c56818178458a88b4fffd1554f1751f447086 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | | | Doc: update docs for the sleeping functions' accuracyThiago Macieira2018-12-071-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And take the opportunity to tell people not to sleep. It's always wrong. Fixes: QTBUG-71757 Change-Id: I36203b7dac414e3eb9effffd1566b956dd05f32a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | | Add a note about virtual_hookThiago Macieira2018-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1ff3b344ec5a4499bb25fffd156b2bf6a7d88625 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | | | Fix build using Windows SDK 10.0.17763Thiago Macieira2018-12-071-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c:\qt\qt5\qtbase\src\3rdparty\libjpeg\src\jmorecfg.h(242): error C2371: 'boolean': redefinition; different basic types c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\rpcndr.h(193): note: see declaration of 'boolean' Instead of trying to guess if a certain header has been #included and whether that header does typedef something to boolean, let's just use the preprocessor to hide, like some people do for X11/Xlib.h's Bool (see qmetatype.h where we refused). Change-Id: I05b8d7ba19004af99f3cfffd15693a87e175f05d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | | | | configure: remove xkbcommon_evdev transition hackGatis Paeglis2018-12-071-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was added in c3a963da1f9e7b1d37e63eedded61da4fbdaaf9a. wayland was updated in a8fed20181729cae70de43079c4a34ad1780cfd7. Change-Id: Ibf458815c3b61c5f936f147086db3d2b5782c175 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | | | | libinput: use QT_CONFIG(xkbcommon) macroGatis Paeglis2018-12-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch amends c3a963da1f9e7b1d37e63eedded61da4fbdaaf9a Change-Id: I9e66aac4f0f45714343c585c79f37bd76683e103 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | | | | Fix inability to edit lines in QGraphicsTextItem when pageSize is setVitaly Fanaskov2018-12-071-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous implementation relies on the fact that the only text document with height -1 can grow or shrink vertically, and, hence, a bounding rect should be updated under this circumstances. But method QTextDocument::setPageSize might set a height different from -1, and QGraphicsTextItem will be growing/shrinking vertically as well. So, we have to relax condition to cover all use cases. Bounding rect will be updated if new size is different from current size. This also doesn't affect performance. Fixes: QTBUG-55527 Change-Id: Id2c8e15d859aff9dde62c8ee14a6859c0c03f0d4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | | Revise filtering of Content-Length in HTTP cache controlEdward Welbourne2018-12-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We filter out Content-Length from the cache metadata due to IIS sending it bogusly on 304 responses; however, we were only doing this if the cached response had a Content-Length header, which doesn't happen when the original request was delivered chunked. Furthermore, the filtering wasn't limited to the case of 304 responses. So skip the "had it previously" requirement and only do this for 304s. Fixes: QTBUG-72035 Change-Id: Ie5d858e0f0205bf68f0a13a9c9d4a6e844cb3568 Reviewed-by: Joni Poikelin <joni.poikelin@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | | | Windows QPA: Fix QDockWindow Drag & DropAndre de la Rocha2018-12-071-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pointer messages should not be handled when we are inside a move/resize modal loop. DefWindowProc() should handle this case instead. Fixes: QTBUG-72078 Change-Id: I5ad7283bcf0cfe0ff7d21cf5640270c361b8ad8d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | | | Preallocate buffer for QLineEdit when used for password inputIvan Čukić2018-12-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the user is entering the password, the string variable that stores the value might have to reallocate its content from time to time (when the string needs to grow beyond its current capacity). When the reallocation happens, the old buffer is freed, but its data is not zeroed-out. This means that a QLineEdit that serves as a password input field might leak chunks of the password during its lifetime, and the leaks will persist after its destruction. Since the QLineEdit can not control the behavior of the QString it uses to store the entered value, the only thing it can do is try to make the reallocations rare. This patch reserves the space for 30 characters for the string which stores the QLineEdit value when said QLineEdit is used for password input. This is enough to make sure no reallocation happens in majority of cases as barely anyone uses passwords longer than 30 characters. [ChangeLog][QtWidgets][QWidgetLineControl/security] Preallocate a buffer for the string that contains the entered value when the QLineEdit serves as a password input field to minimize reallocations. Change-Id: I3e695db93e34c93335c3bf9dbcbac832fc18b62d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | | | ANGLE: Set ANGLE_COMMIT_HASH and ANGLE_COMMIT_DATEOliver Wolff2018-12-071-2/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-72371 Change-Id: Ia03447b77d4f88eefc760e9bee14dbf3dd79d5a5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | | macOS: Account for LC_BUILD_VERSION when checking SDK version and deployment ↵Tor Arne Vestbø2018-12-031-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | target The more modern LC_BUILD_VERSION load command was introduced in the 10.13 SDK to unify the various versions of the LC_*_VERSION_MIN command. When building with a deployment target of 10.14, the linker will use this load command instead. Change-Id: Ic3571fdbfdf4dfb9346128c6f6e75d1e06f86cd2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | | configure: actually resolve libraries into full filepathsOswald Buddenhagen2018-12-033-36/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this considerably speeds up failures, as no doomed build is attempted, and produces more reliable results, as no second lookup (which would be subject to environment changes) is done any more during the build. in principle, this also opens up possibilities like selecting specific variants of dependencies, automatically extracting rpaths, etc. qt_helper_lib.prf also needs to create fully resolved library names now. Change-Id: I65f13564b635433030e40fa017427bbc72d1c130 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | | | ico image handler: check for out of range image sizeEirik Aavitsland2018-12-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the decoder fail early to avoid spending time and memory on attempting to decode a corrupt image file. Change-Id: I598db817c387867a449040f5be5427c8b8746483 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | Set correct vertical position for text following a very large imageLars Knoll2018-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the document is paged and contains an image spanning more than one page, correctly set the y position for everything following that image. Change-Id: I1c584c7a907c1728c2965f1dc3fdc56069ab3172 Fixes: QTBUG-59886 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | | | Erase password data on QLineEdit destructionIvan Čukić2018-12-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The contents of a deleted QString can still remain in memory and can be accessible by tools that read the raw process memory. This means that a QLineEdit that serves as a password input field can leak the password after it is destroyed. With this patch, the contents of the m_text string member variable will be zeroed-out before the m_text is destructed. This is done only in the cases when the QLineEdit serves as a password field. [ChangeLog][QtWidgets][QWidgetLineControl/security] Zero-out the string that contains a password entered into the QLineEdit Change-Id: I8f88f952244bf8a0399c14acf0869439ca0a60ca Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | | | QNetworkConfiguration: add missing timeout unit to setConnectTimeout docSamuel Gaist2018-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3738e989a41607244b55245222ec3c83dda68198 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | | | Read font selection flags and use them when querying for metricsMårten Nordheim2018-11-302-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain fonts with multiple styles have the same family name. When loading these as application fonts we were not specific enough when querying for the text metrics. This meant that e.g. the bold version in a font family would get the metrics of the regular one. Fixes: QTBUG-67273 Change-Id: Ic988d62cddde0a1f77ddcaf2891cadc21c9b31e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | | | Fix alignment of temporary QRgba64 buffers on win32Allan Sandfeld Jensen2018-11-301-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The alignment of long long on 32-bit windows is only 32-bits, but we should be safe to assume it is aligned at 64-bit. Since QRgba64 is a public type, we can't fix the alignment there without breaking ABI, so instead fix it where temporary buffers are allocated. At the same time be consistent about using QRgba64 so we can switch to it enforcing alignment in Qt6. Change-Id: Ie15c305bc867c62a13df8eb2b1678e92174e1f97 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | OpenSSL context (1.1) - make the if-fery/switch less uglyTimur Pocheptsov2018-11-301-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | no need in duplicating DTLS-specific cases. Change-Id: I475c6fb53daa44d60a5054bf3acc8474355b2186 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | | CoreText: Define font smoothing gamma along with rest of relevant codeTor Arne Vestbø2018-11-303-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I57909603732de6c1a91c744a358968941e64acdf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | Android: Don't use blocking queued when suspending the applicationAndy Shaw2018-11-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the application gets suspended when a blocking queued connection is made then it will cause the application to hang when being resumed. Therefore a check is needed to still post the event to the other thread but in a non blocking manner so that it does not cause a hang on return. Fixes: QTBUG-72101 Change-Id: I6d53c97ed6d9d500559da2a9fd195226d1fc9905 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | | | xcb: remove old work-around for building with util-wmGatis Paeglis2018-11-302-61/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commits that added this code: 7ce8491280990350162933a0716d1b014f65aeb6 and f005dee1b3692a09e47782dcff9b5b07aa659b51 I guess this was a work-around, before we started bundling XCB libs a year later in 21bd66e1ea06e466754ab06ee2c5f8b737bb4bd7 0.3.8 was released in 2011-04-26 and we are bundling 0.3.9, so it is safe to remove the include work-around as well. Change-Id: I5794f40d86e10ebdad984aa4b61311979aaadcf3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | | xcb: fix issue with dialogs hidden by other windowsGatis Paeglis2018-11-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a regression from Qt4, due to not setting the window group leader in WM_HINTS property. Qt4 did set this property. It was not obvious that something was missing because of the similarly named WM_CLIENT_LEADER property, which we do set. Testing revealed that setting WM_CLIENT_LEADER is sufficient on some DEs, e.g. KDE, Unity, but did not have the desired effect on e.g Gnome and XFCE. EWMH/ICCCM specs are known to be ambiguous, WM_CLIENT_LEADER is only mentioned in the section on the session management, so it is not surprising that there is this inconsistency between various WMs. This patch merely restores a lost WM hint. This solves the reported issues on major desktops. If we support calling show() on a dialog before its parent has been shown is still an open question, which should be handled in QTBUG-72040. Task-number: QTBUG-56829 Fixes: QTBUG-46626 Fixes: QTBUG-70756 Task-number: QTBUG-72040 Change-Id: Id2c575850e5f4f5af3e57963c577d33572e30b6e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | | CoreText: Base glyph fill color logic on font smoothing algorithmTor Arne Vestbø2018-11-301-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I22be1efb1f91048745008ea1b49186b39367d122 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | CoreText: Respect QFont::NoSubpixelAntialias when deciding glyph formatTor Arne Vestbø2018-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I846758bce2fd7536f9941b11f23fc0e5d5bc6f1b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | | Fusion style - avoid a warningTimur Pocheptsov2018-11-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... printed by QPainter when it gets a pixmap with one or both of dimensions equal to 0 (and a nullptr as a paintEngine). Task-number: QTBUG-71806 Change-Id: I978f56c843daab307042e34390fc33f338ce8cf5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | | CoreText: Remove handling of QFontEngineMulti's highByteTor Arne Vestbø2018-11-303-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a leftover from when the Cocoa plugin used QFontEngineMulti exclusively. Nowadays QFontEngineMulti will strip out the highByte before calling into the real engine. Left an assert just in case.. Change-Id: I6cb26d20a908d7c3aaf096297fca160805fdb85b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | | macOS: make QScreen::grabWindow() fast againMorten Johan Sørvig2018-11-301-45/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 17b73b0d2b8 regressed performance by grabbing the entire screen and then copying the grab region. Move back to grabbing a minimal rectangle instead. Also handle multi-screen grabs at different device pixel ratios. Multi-screen grabbing is handled by grabbing each screen individually, and then stitching together the result. The returned pixmap is created using the highest DPR available, upscaling lower resolution parts as needed. Change-Id: I9d45c5f7ec7b342360b745f49ef2939dc588f40b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>