summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in the documentationAleix Pol2018-09-252-2/+2
| | | | | | | Returnes -> returns Change-Id: I52372488a16d7c13e85fca0e11eaab738db9355d Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* More fixups for GL_CONTEXT_LOSTAllan Sandfeld Jensen2018-09-253-3/+30
| | | | | | | | | | Fixes the rest of the places we use the pattern of emptying the OpenGL error stack to be able to handle GL_CONTEXT_LOST, and adds a note about it in the documentation. Change-Id: I7eb97dbca45f39295b832d44937023b538b19947 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Android: add support for custom buttons in native MessageDialog helperShawn Rutledge2018-09-252-3/+56
| | | | | | | | | New API in QMessageDialogOptions and implementation on Android. Task-number: QTBUG-35545 Change-Id: I59567251199f220862d01ba76979266379eecd86 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QImageWriter: Fix default compressionratioEirik Aavitsland2018-09-251-1/+1
| | | | | | | | | | | | Before asking a image format handler to save an image, QImageWriter sets the value of all supported options. For options like quality and gamma, the default value is an illegal value (-1 and 0.0 resp.), effectively telling the handler that the application has not requested any particular value. But in the case of compressionratio, the default was 0, a legal value. Fix by changing it to -1. Change-Id: Iad6d4c2dbe269b25863e7d4967aa9ed2a7d1247f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QPainter cosmetic stroker: Fix painting error for FlatCap linesEirik Aavitsland2018-09-251-1/+2
| | | | | | | | | | | | | | | | | Initialize the lastDir properly, to avoid the stroking algorithm doing direction-change handling for a single line. That could cause a cap to be painted for a single FlatCap line. Also fixes a bug in tst_qpainter, revealed by the above fix. The result drawPolyline was erroneously compared to the result of drawing the lines individually, for a case where the former correctly paints the pixel of the join point in the corner, while the latter by coincidence used to paint the same pixel as a cap because of the bug above. Task-number: QTBUG-70101 Change-Id: Ie20eda33214cfe9e7627f17ef4c7a5b3835c9c24 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-141-0/+2
|\ | | | | | | Change-Id: Ic4c1a8041dcfd143861c39e0014fbdaaa3fb25c6
| * bmp image handler: check for out of range image sizeEirik Aavitsland2018-09-111-0/+2
| | | | | | | | | | | | | | | | Make the decoder fail early to avoid spending time and memory on attempting to decode a corrupt image file. Change-Id: I874e04f3b43122d73f8e58c7a5bcc4a741b68264 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix spelling mistake in qimage.hTor Arne Vestbø2018-09-131-1/+1
| | | | | | | | | | | | Change-Id: I2138318894587cc0b5f03af14a57b2a39509f0da Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Texture file support: add mipmap reading to ktx handlerv5.12.0-alpha1Eirik Aavitsland2018-09-121-10/+20
| | | | | | | | | | Change-Id: Ic2c10b3e64d63d2272a8a3922d2b3f99dfd45bdb Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | QVulkanWindow: Fix some load/store ops in the default renderpassLaszlo Agocs2018-09-121-2/+2
| | | | | | | | | | | | | | | | Stencil is - very likely - cleared just like depth. Also, switch to STORE_OP_STORE for the multisample buffer, for correctness. Change-Id: I31b56658286205af8551018115ca2abbe541be67 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | QVulkanWindow: Fix bogus stage masks in readbackLaszlo Agocs2018-09-121-1/+1
| | | | | | | | | | Change-Id: I08882a02204c95272b100647923c9903f825912c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Fix device local alloc in hellovulkantextureLaszlo Agocs2018-09-121-0/+5
| | | | | | | | | | | | | | | | | | | | Running with QT_VK_FORCE_STAGE_TEX does not work at all with recent NVIDIA drivers due to QVulkanWindow's and the example's naive way of picking the memory index. Enhance this and add a warning note to the QVulkanWindow docs as well. Change-Id: I7f200e11d982b56e3da3b71ee3915bd7bfca5cc1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Add optimized fetch ARGB32 routines for NEONAllan Sandfeld Jensen2018-09-122-0/+20
| | | | | | | | | | | | | | | | After convert and fetch were split, only convert was still NEON vectorized, while fetch is the more commonly used version. Change-Id: Iea2af7ccee6589b3d6e9908afeaae2d1ad2753be Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Doc: Fix typo and add precision to method descriptionPaul Wicking2018-09-121-2/+3
| | | | | | | | | | | | | | | | | | As transform() returns worldTransform(), point out that it is an alias in its description. Fixes: QTBUG-18117 Change-Id: I0eb1f78c6955b499906024105f9969cdccf13303 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-102-0/+6
|\| | | | | | | | | | | | | Conflicts: mkspecs/common/macx.conf Change-Id: I8576493b417912fa5e5501bc2c1b935d186ac209
| * Merge remote-tracking branch 'origin/5.11.2' into 5.11Qt Forward Merge Bot2018-09-092-0/+6
| |\ | | | | | | | | | Change-Id: I2fa26fa061cbf5d2bded203a299a19b7d1c31d0a
| | * Merge 5.11 into 5.11.2Frederik Gladhorn2018-08-271-2/+2
| | |\ | | | | | | | | | | | | Change-Id: I672bc167de3801c944315d92120c5e03da69e9c7
| | * | Fix crash when combining QOpenGLWidget, QStaticText and Qt QuickEskil Abrahamsen Blomfeldt2018-08-242-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under certain circumstances, if you had a widget with a QOpenGLPaintEngine, and drew QStaticText into this, and then later had Qt Quick access the same cache and try to resize it, we would get a crash because the resize function would have a pointer to the paint engine and try to access its shader manager (which would now be null, since this is outside the begin()/end() phase of the paint engine. The solution is to reset the paint engine pointer to null on the cache once it has been populated and it is no longer needed. [ChangeLog][QtGui][Text] Fixed a possible crash when combining QStaticText, QOpenGLWidget and Qt Quick in the same application. Task-number: QTBUG-70096 Change-Id: I7383ad7456d1a72499cfcd2da09a5a808d4b3eff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Update QOpenGLContext::currentContext after QPlatformOpenGLContext::makeCurrentTor Arne Vestbø2018-09-091-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of doing it up front and then restoring the current context if the makeCurrent call failed. By delaying the update, QPlatformOpenGLContext::makeCurrent has the option to check which context was current before the call. Change-Id: I458f5c00d7c820acbe2f8552b0513fce99b9b683 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | | Graph loader can load prototypes stored in the graphJuan Jose Casafranca2018-09-083-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib0bbfe5b0257bf355e83cc5287fa52b1e0cc3ed6 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | | Make QOpenGLContext::makeCurrent use early exit for all its flowTor Arne Vestbø2018-09-081-44/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The case of the platform context failing makeCurrent is the exception. Change-Id: I606e6fb379f84e886bff9e27355dda9b31ff9ebe Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-073-19/+58
|\| | | | | | | | | | | | | | | Change-Id: I66c7f18a2abd13601da0947919436f7da3549ae9
| * | | Revise an incorrect QVulkanWindow doc noteLaszlo Agocs2018-09-061-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying the transformation in question has no effect on the winding order. Rewrite that section. While all the examples are correct, clarify the rules for the geometry they use since the winding order varies. Fix up the triangle example code to use front=CCW for clarity (even though it does not matter much since culling is off there). Change-Id: Icb968c76cc9fa918a5608d3c66b4fccd5668175e Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * | | Avoid conversion over RGBA64 for RGB32 LCD text blendingAllan Sandfeld Jensen2018-08-301-9/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Short-cuts the case where there is no gamma correction to avoid a conversion over RGBA64 and back. Change-Id: I100697a9f7a4b94283557b2c0eaa45e0eff81785 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | Doc: Check before including the \snippet from a .pro fileVenugopal Shivashankar2018-08-301-1/+4
| | |/ | |/| | | | | | | | | | | | | Change-Id: Icc7552b46a2657c81958e40f33596ddeee045172 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Fix QSIM::itemData returning role 255Luca Beldi2018-09-061-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix, QStandardItemModel::itemData returns a map containing role 255 which is used internally to store the flags. This role is an undocumented implementation detail so it should not be returned to the user. [ChangeLog][QtGui][QStandardItemModel] itemData does not return role 255 Change-Id: Ibead3cba84cfe92b3c664bc8ce87508cbcbdc9bd Reviewed-by: David Faure <david.faure@kdab.com>
* | | Fix reading 16bpc grayscale PNGsAllan Sandfeld Jensen2018-09-031-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | They were incorrectly attempted to be read as Indexed8, instead use the RGBA64 formats to read them with full accuracy. Task-number: QTBUG-45858 Change-Id: I14fc3cb0d59fa2fc0e68fd870f3b32352c34161f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Make flatpak portal support to be used also by Snap applicationsJan Grulich2018-09-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Snap now uses xdg-desktop-portal for portal support. Add check for apps running in Snap and make them use portals by default. We also should be using different name for the platform theme used by sandboxed apps. Change-Id: Ibaa35b7549b3d94775d7edb937f729a300d071b6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Windows QPA: Stop synthesizing mouse events from tablet/touchAndre de la Rocha2018-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These fake mouse events should be synthesized by QtGui, not the QPA plugin, when the tablet/touch events are not handled by the application and the Qt::AA_SynthesizeMouseForUnhandledTouchEvents or Qt::AA_SynthesizeMouseForUnhandledTabletEvents flags are set. Task-number: QTBUG-47007 Task-number: QTBUG-60437 Change-Id: I4d6d5e6667d245c45a4eb4f3a94db05cf9772f52 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | WebAssembly for QtBaseMorten Johan Sørvig2018-08-305-5/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the squashed diff from wip/webassembly to dev. Done-with: Peng Wu <peng.wu@intopalo.com> Done-with: Sami Enne <sami.enne@intopalo.com> Done-with: Morten Johan Sørvig <morten.sorvig@qt.io> Started-by: Andrew Knight <andrew.knight@intopalo.com> Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Silence warning in gcc 4.9 for AndroidEskil Abrahamsen Blomfeldt2018-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When building with warnings are errors for Android with gcc 4.9, it wrongfully fails on use of uninitialized variable. Change-Id: I39c5e8413c30567fba60cbba6a8b26d537c5836e Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | Fix out of buffer access in qt_qimageScaleRgba64_up_xyAllan Sandfeld Jensen2018-08-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Avoid reading a pixel outside the image even if we multiply the result by 0. This mirrors a similar old fix in the the 32bit scaling path. Change-Id: I7860bc808dc46dbc94918672e99c81b56d4a1d27 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-08-241-1/+1
|\| | | | | | | | | | | Change-Id: I5f1567c792992fc00f0256f39b76cfbe017e6a3a
| * | Doc: fix typo in QNativeGestureEvent docsMitch Curtis2018-08-231-1/+1
| | | | | | | | | | | | | | | Change-Id: I83ac3463752488d7dbb758ea767ba186ddd3fa2a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Handle uploading of faked sub-imagesAllan Sandfeld Jensen2018-08-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One trick that is possible to do with QImage is to make it be sub image of its imagedata by manipulating the data start and bytes-per-line, we can not upload that directly and need to detect the case and create a clean copy to upload. Task-number: QTBUG-70105 Change-Id: I7ce184a0892fb4071b6dcc1a1fd3881a4e0703cd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | clangcl: Fix QtGui link error (missing fetchPixelsBPP24_ssse3)Friedemann Kleint2018-08-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do not try using SSSE3 if the compiler do not support it. (see 648ee7aa020d04b160ec56187f49f761ffab93cc). Task-number: QTBUG-50804 Change-Id: I489b0bbacfde0c647c9d5b71ca3de992d7dc8878 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | configure: add sources matching names from vcpkgMårten Nordheim2018-08-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible to use vcpkg using the -I and -L arguments, but some of their libraries have different names than what we look for during configure, so add in those variations. Change-Id: Iee37197228cc0f15442ecd7ec4fc761f4d526e1d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Fix big-endian build of qopengltextureuploaderAllan Sandfeld Jensen2018-08-221-1/+4
| | | | | | | | | | | | | | | | | | | | | Badly placed endif and lacking a break statement. Change-Id: Id6a3fb13b40e8ae8029e74f7668bafb6e0b9dd06 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into ↵Liang Qi2018-08-222-10/+21
|\ \ \ | | | | | | | | | | | | refs/staging/5.12
| * | | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-08-222-10/+21
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qtextengine.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h Change-Id: Ib9f968edbb0f3387c89bc25e914321d0738bfadc
| | * | Fix spacing in << operator for QEventMitch Curtis2018-08-211-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns QNativeGestureEvent(ZoomNativeGesturelocalPos=686.855,312.836, value=0.0259857) into QNativeGestureEvent(ZoomNativeGesture, localPos=686.855,312.836, value=0.0259857) Change-Id: Id30860a3c7a1b6da583369126a31934ddb32d4b9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Don't reset the bidi level on spacesLars Knoll2018-08-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression introduced with the update to the bidi algorithm. Task-number: QTBUG-69633 Change-Id: I7eac45ed3ffb41f89ea3f793eedcfb6fcdace871 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Only show the bidi cursor mark if we actually have bidirectional textLars Knoll2018-08-171-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't show the mark simply because we have unicode code points larger than 0x590. Task-number: QTBUG-69665 Change-Id: I9af97383f3bcd52277a5288e7ad06ec240c7e51c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Smooth image scaling for 64bit imagesAllan Sandfeld Jensen2018-08-225-68/+302
|/ / | | | | | | | | | | | | | | Adds support for smooth scaling 64bit images. Task-number: QTBUG-45858 Change-Id: If46030fb8e7d684159f852a3b8266a74e5e6700c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Fix big-endian buildAllan Sandfeld Jensen2018-08-211-0/+13
| | | | | | | | | | | | | | | | | | Declare rbSwap<QImage::Format_RGBA8888>, so we don't end up in a fallback definition not used by little-endian. Task-number: QTBUG-69951 Change-Id: I8512bba76da7d59a27593d37c70283d881c3e8fc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Windows QPA: Add option to detect AltGr key pressesFriedemann Kleint2018-08-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | According to MSDN, AltGr key presses are sent as a sequence of SYS left Ctrl + right Alt. Add an option to detect AltGr as modifier key. Task-number: QTBUG-69317 Change-Id: I30ce169d2e6dbbae194ff714abfbc732b53652ce Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge dev into 5.12Oswald Buddenhagen2018-08-2123-103/+194
|\ \ | | | | | | | | | Change-Id: I63f632b595f66d2fc93e9aa713500e3799e3df2a
| * | Implement exact match expression builder for QRegularExpressionSamuel Gaist2018-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegularExpression doesn't offer a direct equivalent of QRegExp's exact match. There are several places in the Qt sources that use this feature. This patch implements a small helper function that builds the expression as recommended in the documentation and updates the related code. [ChangeLog][Core][Tools] QRegularExpression now provides anchoredPattern() which is a helper function to build regular expressions used for exact matching. Change-Id: Idbbf142c4c5cb9b62abf8229f4ce85fd4409e5d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Improve Q_ASSERT readabilityJesus Fernandez2018-08-171-1/+7
| | | | | | | | | | | | | | | | | | | | | Change-Id: I231ecafe1eb48d74f787083e86a85536a90ed69b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | macOS: Teach QWheelEvent to handle a new ScrollMomentum phaseTor Arne Vestbø2018-08-172-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We detect if there's an upcoming momentum phase using the same trick used by e.g. Mozilla in their event handling: https://tinyurl.com/yd8lcs4l, and as recommended by an Apple engineer: https://tinyurl.com/y8yytlgv The event is not guaranteed to be in the queue, but in practice it seems to be. If this assumption fails we can add a wait timeout to the event search instead of using [NSDate distantPast] as a timeout (which only looks at queued events). When the momentum phase is detected, QWheelEvent::phase will have the new ScrollMomentum value, and the phase transitions will be ScrollBegin -> ScrollUpdate -> ScrollMomentum -> ScrollEnd. We no longer send ScrollEnd to signify that the user's fingers have been lifted off the trackpad; rather, the first event with ScrollMomentum phase means that the fingers have been lifted and macOS is now sending simulated-momentum events. This means ScrollEnd is a reliable indicator that the entire scroll gesture (both the user interaction and the momentum) has ended. If the ScrollMomentum phase is skipped, it means the user's fingers came to rest before being lifted, so there is no momentum. In that case the transitions will be ScrollBegin -> ScrollUpdate -> ScrollEnd. Task-number: QTBUG-63026 Task-number: QTBUG-65160 Change-Id: I80191a472f6fa892387004c199166a6350124274 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>