summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-08-161-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/plugins/platforms/xcb/qxcbbackingstore.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I4af138ffb2f5306373244523768209e8873b2798
| * Fix potential crash when showing line/paragraph separatorsEskil Abrahamsen Blomfeldt2018-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When showing line and paragraph separators at an offset from the start of the string, the end of string pointer would be incorrectly set, and we would read past the end of the string. If any part of this memory happened to match the line or paragraph separator, then we would overwrite it and have a crash. I couldn't find any reliable way to test this, since the crash depends on the contents of the memory after the string allocated by the algorithm. But with an overflow of 100 000 characters, I found that it crashed every time I ran the test. [ChangeLog][QtGui][Text] Fixed potential crash when using QTextOption::ShowLineAndParagraphSeparators. Task-number: QTBUG-69661 Change-Id: I17d1996b883560bacdc7ce114c8aeb2b0108faea Reviewed-by: JiDe Zhang <zccrs@live.com> Reviewed-by: Michal Lazo <xlazom00@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Fix documentation issue for QOpenGLContext::makeCurrentTor Arne Vestbø2018-08-151-1/+1
| | | | | | | | | | | | | | Change-Id: Id0118e44e1ed44fecdd803dbc57ca0588a1afec0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Improve QWheelEvent debug outputTor Arne Vestbø2018-08-151-1/+6
| | | | | | | | | | | | | | | | | | | | | | We now include the phase, which is helpful, and we distinguish between modern wheel events with a pixel and/or angle delta, and compatibility events sent from QWindowSystemInterface::handleWheelEvent with the old Qt 4 single value delta and orientation. Change-Id: I2efe9fe7a55c43240ec94bfa70cafaac6d52603c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Add direct conversions between RGB30<->RGBA8888Allan Sandfeld Jensen2018-08-151-30/+62
| | | | | | | | | | | | | | | | | | Expands the existing conversions for ARGB32<->RGB30 to also handle RGBA8888 to avoid any performance regression of the 16bpc conversion path. Change-Id: I34e519a04276b0e7ff00c6125ba06c889045d2ac Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Fix delta in QWheelEvent passed to QQuickItemFrederik Gladhorn2018-08-141-4/+6
| | | | | | | | | | | | | | | | | | | | | | While the property is deprecated, we should still set it, even in the legacy free constructor. The window system never sends x and y changes at the same time, so either coordinate will be null, therefor add them. This should restore the old behavior. Task-number: QTBUG-69089 Change-Id: Ie329cb4196f53c70b25934cbbac5e2e48c65d2b3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | qdoc: Fix several minor errors to reduce qdoc warningsMartin Smith2018-08-141-17/+24
| | | | | | | | | | | | | | | | | | | | This update corrects several minor documentation errors that cause qdoc warnings. These include incorrect or missing \fn commands, incorrect uses of \e and \a commands together, incorrect spellings, etc. Change-Id: Ib26edef541fa3440025490bcf79cc101623e7f7b Reviewed-by: Martin Smith <martin.smith@qt.io>
* | macOS: Handle missing key in QKeySequencePrivate::decodeString()Erik Verbruggen2018-08-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS we pull out all the modifiers up front, which in the case of incomplete key sequences such as "Meta+Shift+" will result in an empty string as a result. The cross-platform code does not handle that case, so we need to exit early. This fixes an assert in tst_QKeySequence::parseString(). An assert has been added to QKeySequencePrivate::decodeString() to make the assumption about the 'accel' argument explicit. Change-Id: I135e62f9051a8b899202e5fb224b5d3c77bf2062 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Implement support for 16bpc image formatsAllan Sandfeld Jensen2018-08-1113-454/+1769
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for 16bit per color image formats in QImage. This makes it possible to read and write 16bpc PNGs, and take full advantage of the 16bpc paint engine. [ChangeLog][QtGui][QImage] QImage now supports 64bit image formats with 16 bits per color channel, compatible with 16bpc PNG or RGBA16 OpenGL formats. Task-number: QTBUG-45858 Change-Id: Icd28bd5868a6efcf65cb5bd56031d42941e04099 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-084-21/+29
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoascreen.mm Change-Id: Iac965aea4867059dbf7bc401b71e8e8b5b259afb
| * Add QPlatformScreen::windows() helper to return all windows on screenTor Arne Vestbø2018-08-062-9/+17
| | | | | | | | | | Change-Id: Ib55b37b64ed0890ca777dfea8c4d702e267c34bf Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * Use consistent naming of QPA screen change callbacks in QGuiApplicationTor Arne Vestbø2018-08-062-12/+12
| | | | | | | | | | | | Change-Id: I76be8a993e5d71e472faf9a5770b4c1128e8a4c6 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-08-077-7/+194
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-077-7/+194
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| | * Doc: Fix wrong link in QFont documentationPaul Wicking2018-08-031-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-62072 Change-Id: I587534fc5723b3d198fe2065fbcf1bee4871a768 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Fix conversion from transparent indexed8 to RGB32Allan Sandfeld Jensen2018-08-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | A typo meant the color-table was not fixed. For safety fallback colors are also made opaque. Change-Id: I3e609882177604910c4343c86f00221a89af9078 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Optimize blits of any compatible formatsAllan Sandfeld Jensen2018-08-032-2/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fast image blending is only used for SourceOver composition, but several of our embedded backends make heavy use of Source composition which doesn't have a short-cut. This patch adds a blitting short cut that works in those cases. Task-number: QTBUG-69724 Change-Id: Icc61a67cc27bc83863153d69cae60dd986d26f69 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Add missing optimization for loading RGB32 to RGBA64 using NEONAllan Sandfeld Jensen2018-08-031-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rest of the RGB64 routines were optimized, but the loading of RGB32 was not as it was originally not used much, but with ARGB32 using the RGB64 backend, it is essential for decent performance. Task-number: QTBUG-69724 Change-Id: I1c02411ed29d3d993427afde44dfa83689d117e0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Fix crash in qppmhandler for certain malformed image filesEirik Aavitsland2018-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ppm format specifies that the maximum color value field must be less than 65536. The handler did not enforce this, leading to potentional overflow when the value was used in 16 bits context. Task-number: QTBUG-69449 Change-Id: Iea7a7e0f8953ec1ea8571e215687d12a9d77e11c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * HiDPI: Fix calculating window mask from pixmap on drag and dropBłażej Szczygieł2018-08-021-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use platform window directly for setting a mask to prevent bitmap scaling if pixmap and window DPR are the same. Amends: 42f788ffe26d67864d569c3a3044619d49fc693a Task-number: QTBUG-61948 Change-Id: I5eec85c01f20bdefff7343e83ff10cbcb2c79508 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Add logging for QPlatformBackingStore::composeAndFlushTor Arne Vestbø2018-08-072-2/+9
|/ / | | | | | | | | Change-Id: I96778296480d2aaad5e01ed15353106bc90d4d2b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Fix potential out of bounds read in qpkmhandlerEirik Aavitsland2018-08-061-1/+1
| | | | | | | | | | | | | | Off-by-one bug in the validity test of the texture type field. Change-Id: I46ded85a0ad93166aa886e71f0c391f27e79f64f Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | Be more explicit about the effects of swapBuffers() on the current contextTor Arne Vestbø2018-08-061-1/+2
| | | | | | | | | | Change-Id: I7ab9e4e7323d49cf19774bfd0c51f8516ecb842d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | QTextureFileData: Fix build with -no-openglJüri Valdmann2018-08-061-0/+1
| | | | | | | | | | | | | | Need to include <QSize> for operator<<(QDebug, const QSize &). Change-Id: I4857e9b43918243af66cc09ff352619595c081c9 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | Remove member function from CentralFileHeaderThiago Macieira2018-08-031-12/+11
| | | | | | | | | | | | | | | | | | I could have placed the class in an unnamed namespace. That would mark the member function as a local symbol too. But I preferred to move outside so I could make it static. Change-Id: Ie01831ddac5446fdbdeefffd154688c0883ed653 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Make local symbols of some leaked namesThiago Macieira2018-08-032-1/+3
| | | | | | | | | | | | | | | | | | Unnamed namespaces and static are great tools. Use them. Change-Id: Ie01831ddac5446fdbdeefffd15468b3acb3ced79 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Don't ignore alpha values in grabFramebuffer methodsAllan Sandfeld Jensen2018-08-031-2/+4
| | | | | | | | | | | | | | | | | | Returns an ARGB32_Premultiplied image when the framebuffer is grabbed on a transparent QOpenGLWidget or QOpenGLWindow. Task-number: QTBUG-55245 Change-Id: I4b7778ecc38275be1ed9fb748c77c7e1f6b65a00 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Handle screen changes for non-top-level windowsTor Arne Vestbø2018-08-033-6/+6
| | | | | | | | | | | | | | | | | | The platform may emit screen changes for child windows before top-level windows, so we need to update the top level screen as soon as possible. Change-Id: I090c620725c9c3171f5b038708d78ddfeec8512d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge "Merge branch '5.11' into dev" into refs/staging/devEdward Welbourne2018-07-318-10/+16
|\ \
| * | Merge branch '5.11' into devEdward Welbourne2018-07-318-10/+16
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| | * Doc: Remove typo and add line breaks after \internalPaul Wicking2018-07-262-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | In an unrelated change, it seems \internal \obsolete can cause unexpected behavior when generating the documentation. Adding this line break should fix that. Change-Id: I95eceb109faaf89be8f258fba8c31008fdc4ca57 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| | * Replace 0 with nullptrAlbert Astals Cid2018-07-195-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | So if people are using the -Wzero-as-null-pointer-constant don't get a warning when using these private QPA includes Change-Id: I6deb089b17a844680db24998d60c94de7a1227b1 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| | * Fix incorrect warning message in QOpenGLBufferTakumi ASAKI2018-07-171-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I932aa10814049e78da35ea12b7552bf676545c89 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Add debug logging operator for QPlatformSurfaceTor Arne Vestbø2018-07-313-0/+37
| | | | | | | | | | | | | | | Change-Id: I2adecf87fa058bf973f4e4eed0a4c002f8359728 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | testlib: Fix qtguiglobal.h include in qtestsupport_gui.hTor Arne Vestbø2018-07-311-1/+1
| | | | | | | | | | | | | | | Change-Id: I7aeb881821bdf501efb9616250911d7b3cc58300 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QTextDocumentFragment: Use logical cursor movement instead of visualSafa AlFulaij2018-07-311-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Using QTextCursor::Left and QTextCursor::Right moves the cursor visually to right or left, which does not work with Right to left text, where moving left means advancing to the next character, and vice versa. By using QTextCursor::PreviousCharacter and QTextCursor::NextCharacter we leave it up to the engine for deciding where to move depending on the context. Task-number: QTBUG-50619 Change-Id: Ibf0a886f3ff6bf9ca2c953aeff8c235612bbc01d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Fix tiling of NPOT textures on GL/ESAllan Sandfeld Jensen2018-07-273-25/+20
| | | | | | | | | | | | | | | | | | | | The emulation was not working since the vertices are clamped before getting to the fragment shader. So instead just resize the brush if not supported. Change-Id: I856e47890cd3021874b77d869a6ff7162cadde10 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Fixup GL_RGB10 FBO on OpenGL/ES3Allan Sandfeld Jensen2018-07-271-5/+10
| | | | | | | | | | | | | | | | Turns out on OpenGL ES, only the GL_RGB10_A2 form is allowed as a render buffer storage format. Change-Id: I42915b61835167ae457aae91da7e75065dd3eb21 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Move texture uploading out of QOpenGLTextureCacheAllan Sandfeld Jensen2018-07-278-211/+432
| | | | | | | | | | | | | | | | | | | | | | This way the logic can be reused elsewhere. At the same time a standard OpenGL ES/3 way of handling BGRA is added, so we don't depend on extensions, and handling of NPOT and max size which QSGTexture will need. Change-Id: I475bc7127f44be3964fdb482c9e86a20db1fbca5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Remove dead codeJesus Fernandez2018-07-271-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The ascending variable was a leftover from an old implementation. Now it's not needed anymore. It's safe to remove it, and the condition can be removed as well. Amends commit 699e8fe3a6724dd8288dd6a55b25e070eb198c9d Coverity-Id: 11004 Change-Id: I003b7016e9bd3bd523fb70ed4de84211ec840a78 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* | Add API for reading and decoding graphical texture filesEirik Aavitsland2018-07-2410-2/+1137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a framework for reading and decoding stored graphical texture file formats. Includes decoders for the PKM and KTX formats. This is basically the same texture file reading that was added to qtdeclarative for 5.11, but has been refactored to be independent of the scenegraph and opengl. Task-number: QTBUG-67026 Change-Id: I87d8117550d8a2112f4f58c03e9ac6b3249cbc5a Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Give the QGradient presets ObjectMode coordinate mode by defaultEirik Aavitsland2018-07-241-2/+2
| | | | | | | | | | | | | | | | ObjectBoundingMode has inconsistent behavior and is deprecated in favor of ObjectMode. Change-Id: I748f6283f3db5869bb9a67c08bf5f16abc6f95b0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Remove transitioning include from qdnd_p.hJoerg Bornemann2018-07-231-4/+0
| | | | | | | | | | | | | | | | | | Now all files that use QInternalMimeData include qinternalmimedata_p.h, and we can remove the transitioning include from qdnd_p.h Change-Id: I6c86cb6a5bd73076e5dd3bafc01861b75ab83845 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-172-2/+2
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbintegration.cpp Conflicts git missed: src/plugins/platforms/qnx/qqnxglcontext.cpp Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
| * Fix: png handler returning Mono QImage with color table < 2 itemsEirik Aavitsland2018-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | A bit depth 1 png image may contain a single color table item. The png handler would in such cases reduce the size of the QImage color table to 1, which could easily lead to crashes later on. Task-number: QTBUG-69256 Change-Id: I01d78977c121bacc44b823231d8f32ca63d8a98c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix the copyright year of the qgrayraster.c dependencyNicolas Ettlin2018-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | The copyright year of the qgrayraster.c dependency was incorrectly set to “2006-2015”, instead of 2000-2016 (as stated in the file’s header comments). This commit solves this issue. Task-number: QTBUG-69261 Change-Id: I307b6eabdd133fe4f8371b963577b59af8620838 Reviewed-by: hjk <hjk@qt.io>
* | configure: group tests' includes properlyOswald Buddenhagen2018-07-161-19/+36
| | | | | | | | | | | | | | | | | | this puts the actually relevant includes into the correct field, which potentially allows early header resolution, and is generally just cleaner. Change-Id: I9db870442d22a329441eafe53098d18cdc91ce16 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | testlib: Move qtestsystem helpers to their respective modulesTor Arne Vestbø2018-07-163-3/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | Having the helpers in each respective module lets us implement the helpers using private APIs without forcing the test to add private dependencies. It also makes it easier to test Qt using a third party testing framework (for running the test suite), while still using the helpers for ensuring tests behave expectedly. Change-Id: I2a6ce24526ed345f3513548f11da05c7804c203f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | iOS: Document how to handle URL requests from external applicationsTor Arne Vestbø2018-07-091-0/+22
| | | | | | | | | | Change-Id: Ideeb0b06b6c7fc792e2102eb71296e99f3023842 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | SIMD: Add a haswell sub-architecture selection to our supportThiago Macieira2018-07-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the comment says, Haswell is a nice divider and is a good optimization target. I'm using -march=core-avx2 instead of -march=haswell because the latter form was only added to GCC 4.9 but we still support 4.7 and that has support for AVX2. This commit changes the AVX2-optimized code in QtGui to Haswell- optimized instead. That means, for example, that qdrawhelper_avx2.cpp can now use the FMA instructions. Change-Id: If025d476890745368955fffd153129c1716ba006 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>