summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Fix 32bit integer overflow in ICC parsingv5.15.0-rc1Allan Sandfeld Jensen2020-05-041-1/+2
| | | | | | Change-Id: I98c413374374a6143733860aa9bab1a957cd3b2d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix 8bit image conversions with non-default bytes_per_lineAllan Sandfeld Jensen2020-04-271-11/+33
| | | | | | | | | Copy line by line when bytes per line doesn't match between input and output. Fixes: QTBUG-83777 Change-Id: I44ca75963df6188c1de76196d9c12fd8bb081688 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Doc: add since for QWheelEvent::positionPaul Wicking2020-04-271-0/+1
| | | | | | Fixes: QTBUG-83779 Change-Id: Icd39c6e3b65e17a51d04ea3c0718f2957948aaa4 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15.0Qt Forward Merge Bot2020-04-271-1/+10
|\ | | | | | | Change-Id: I889c639db2fe24d17d535a2c4f52d72ea32491f8
| * Doc: Describe updating fonts with substitutes5.14Leena Miettinen2020-04-241-1/+10
| | | | | | | | | | | | Fixes: QTBUG-82577 Change-Id: I40662240da69c0d93d0386172c10f375fbb5fefc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Don't warn when loading icons via the image loadersTor Arne Vestbø2020-04-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9d5ae9f26c98 introduced a warning when a matching icon engine was not found for a given file suffix, under the assumption that all formats would go through icon engine plugins. Unfortunately QIcon itself falls back to a direct use of QPixmapIconEngine when no icon engine plugin is found, which would lead to the warning being emitted for built in formats such as PNG. Until this code can be moved properly into QPixmapIconEngine we'll remove it. Change-Id: I14d1d33a0f0c29e4b4604ef3b53c05cb8e02f867 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into 5.15.0Qt Forward Merge Bot2020-04-211-8/+11
|\ \ | | | | | | | | | Change-Id: I9d9f9e0955144241fcee6148fc78c4501e2ffcea
| * | Markdown writer: omit space after opening code block fenceShawn Rutledge2020-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CommonMark spec shows that it's not necessary to have a space between the code fence and the language string: https://spec.commonmark.org/0.29/#example-112 This also avoids a needless trailing space after a code fence that does not include a language string. Change-Id: I2addd38a196045a7442150760b73269bfe4ffb22 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | Markdown writer: don't wrap code block, and detect its endShawn Rutledge2020-04-201-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The end of a code block nested in a list item is now detected; and if the text of the list item continues after the code block, it continues to be indented. Code blocks should never be word-wrapped. Fixes: QTBUG-80603 Change-Id: I4427f8b1d4807d819616f5cb971e2d006170d9be Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Warn when trying to load an icon without a matching icon engineTor Arne Vestbø2020-04-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | A typical case is trying to load an SVG icon without the QtSvg module built. You want to know what's going on instead of trying to debug why the icon doesn't produce any valid images. Change-Id: I4418ad758a1232f1394058368c50e0d87235271e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | macOS: Don't produce NSImages without a single representationTor Arne Vestbø2020-04-171-3/+6
|/ / | | | | | | | | | | | | | | | | Doing so results in exceptions inside AppKit when passed on to APIs that expect valid images. It's better to produce nil-images. Fixes: QTBUG-83494 Change-Id: I1e5bfa2a7fecd75a1ddb95bd1a6dc2e8db6b24f8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Fix image scaling on WASM platformAllan Sandfeld Jensen2020-04-153-326/+92
| | | | | | | | | | | | | | Apparently it has trouble with multi-threading from the main thread. Change-Id: Ib544d69270c2780d4a42bde6fd7f491e32f29cd2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Remove more calls to deprecated TouchPoint functionsShawn Rutledge2020-04-091-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to ed3ed0b9db97a8fab0c03add23228b6b0a96f171 68916fede41d1eca5d07eb6b1db518d41a007616 and 3c159957f863cf8d367a9261e7016e52cd0348c1. In QWindowSystemInterfacePrivate::fromNativeTouchPoints() and QWindowSystemInterfacePrivate::toNativeTouchPoints() we continue using struct TouchPoint's QRectF area as storage for the screen position + ellipse diameters; as the comment says, this is _unrotated_, meaning that rotation is stored separately, and area should not be construed as the bounding box of the rotated ellipse. (In Qt 6 we can make the QPA touchpoint look the same as the QTouchEvent::TouchPoint to eliminate the need to calculate the center of the rect.) In QGraphicsScenePrivate::updateTouchPointsForItem(), setRect() sets the position and the ellipse diameters, but the latter is redundant because the purpose of this function is to localize a touchpoint to the coordinate system of a particular QGraphicsItem. Ellipse diameters should stay the same. In QApplicationPrivate::updateTouchPointsForWidget(), as in QGraphicsScene, we are localizing touchpoints to a widget and to the screen that the widget is shown on, so only the position needs to be set, while preserving the sub-pixel resolution that mapFromGlobal(QPoint) loses. Fixes: QTBUG-83403 Change-Id: I61d29e14cbe38567767b164af6ae895082c5e1a1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | MinGW: Fix debug only angle buildsKai Koehne2020-04-091-4/+5
| | | | | | | | | | | | | | Fixes: QTBUG-83397 Change-Id: I89e21cc8101a17dcdb232ff5df1a76cc08842434 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: André Klitzing <aklitzing@gmail.com>
* | Wasm: don’t deadlock on parallel image conversionsMorten Johan Sørvig2020-04-051-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A special restriction of threads on WebAssembly is that you should not block the main thread, also not to wait for worker threads. For example, blocking the main thread may prevent the browser from starting a new web worker to service the pthread the main thread is waiting for. We may be able create an abstraction to support use cases like this (most likely using emscripten asyncify), but for disable use of threads to avoid deadlocking. Change-Id: I35edd5e1bb465e2549fa7cc4288b47dcd2e4244b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | qpa: Remove references to lighthouseTor Arne Vestbø2020-04-033-3/+3
| | | | | | | | | | Change-Id: I37646113f626c878883cff49f4e186ec71bcfa15 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | macOS: Remove all use of deprecated Q_OS_OSX defineTor Arne Vestbø2020-04-035-6/+6
| | | | | | | | | | Change-Id: I49c285604694c93d37c9d1c7cd6d3b1509858319 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | QLineEdit: clarify the impact of using validatorsVolker Hilsheimer2020-04-011-2/+7
| | | | | | | | | | | | | | | | | | | | Values that are validated as Intermediate are possible to enter, but returnPressed and editingFinished signals are not emitted. Fixes: QTBUG-82915 Change-Id: I3e194cd6ee93b3402090117b67044cf3663a232e Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Fix 1 pixel wide imagesAllan Sandfeld Jensen2020-03-301-1/+1
| | | | | | | | | | | | | | | | | | Images are rounded up to 4 bytes per line minimum, so one pixel wide images might not shrink when resizing. Fixes: QTBUG-83179 Change-Id: If72c94409e4c899c5ad05b2867f5f53a94d0580f Reviewed-by: Christian Kamm <mail@ckamm.de>
* | Finish deprecating TouchPoint::rect, sceneRect and screenRect accessorsShawn Rutledge2020-03-302-26/+20
| | | | | | | | | | | | | | | | | | All 6 getters and setters were deprecated by doc comment \obsolete in 3c159957f863cf8d367a9261e7016e52cd0348c1 (Qt 5.9). Now we will generate compiler warnings too. Change-Id: I94c6da607fa5758072af1287c9286b6c52179cfb Reviewed-by: Frederik Gladhorn <gladhorn@kde.org>
* | Raster painting: fix dashing for separate linesEirik Aavitsland2020-03-271-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | When drawing multiple distinct (unconnected) lines (e.g. from QPainter::drawLines() or a QPainterPath with alternating movetos/linetos), the dash pattern should not continue from one to the next, as it should when drawing a connected line (e.g. polyline). Both the cosmetic stroker and the full stroker does it right, but the fast rasterizing codepath got it wrong. Fixes: QTBUG-83048 Change-Id: I3d090f7121726755a0e53cb66b99a5563ac0e1c0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Doc: Mark gamma-related functions deprecated in QImageReader/WriterTopi Reinio2020-03-262-9/+14
| | | | | | | | | | | | Change-Id: I0a9fbcca7a10a6555f5879cc4955f046eaa56602 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Doc: Don't mention deprecated functions in QTabletEvent overviewTopi Reinio2020-03-261-8/+8
| | | | | | | | | | | | Change-Id: I5d41d6061403f2923d673376be7cf1250d0f0e82 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Call post routines from ~QGuiApplicationMichal Klocek2020-03-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently depending if user uses QApplication or QGuiApplication we end up in different behavior when running post routines. For example QApplication destructor calls post routines before stopping event dispatcher, In case of QGuiApplication post routines are called from QCoreApplication destructor, so no more event dispatcher. This behavior is not consistent and creates troubles when releasing resources of web engine. Attached test will hang on windows with QGuiApplication, however works fine with QApplication. Task-number: QTBUG-79864 Change-Id: Ice05e66a467feaf3ad6addfbc14973649da8065e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix memory leakGiulio Camuffo2020-03-251-0/+3
| | | | | | | | | | | | | | | | | | | | When creating a new QColorSpacePrivate it must be reffed otherwise in the destructor the deref() will bring the count to -1 which is true and will not delete the d_ptr. Change-Id: Id569bae22134b56bf6ad37158d7079b495599fd7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 20eabb72de94ddcef3c36b5cad0ce88944d42f8c)
* | Extend tiled optimization in 64-bit painting to 64-bit sourcesAllan Sandfeld Jensen2020-03-241-4/+10
| | | | | | | | | | Change-Id: I74b88781d631ee68822cd08f9cb0aca03f7b688e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-03-241-4/+4
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbdrag.cpp Change-Id: I0b47324b70b0b4894e54b21aa3e7a5041f9bd5e3
| * Doc: fix copy paste errors in border-*-style documentationJoni Poikelin2020-03-211-4/+4
| | | | | | | | | | Change-Id: I442513ec87e25610898c2102170a5f2bfec5ee77 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | rhi: gles2: fix uniform gathering after struct-type member in UBOsJean-Michaël Celerier2020-03-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given: struct Light { vec4 foo; }; layout(std140, binding = 2) uniform material { Light light; int lightCount; }; the previous code would keep "light" appended for the prefix and look for `light.lightCount`. Change-Id: Ia8deacd0cb4833f45151e922fa7b5970169332eb Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Doc: replace deprecated references to QGLWidgetChristian Ehrlicher2020-03-201-1/+1
| | | | | | | | | | | | | | | | Remove references to the deprecated QGLWidget and replace it with QOpenGLWidget. Change-Id: Ia31df42ab61c25e9ce46f4491267d2c64910f55c Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Add SSE2 optimized solid source compositionAllan Sandfeld Jensen2020-03-202-0/+35
| | | | | | | | | | | | | | Very similar to source-over, but have traditionally been inlined. Change-Id: I211f0b1c91c1a00c4769fbbfe2e3d0c7b22d7048 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | rhi: gl: Reduce state changesLaszlo Agocs2020-03-202-74/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...between setGraphicsPipeline() calls with different QRhiGraphicsPipeline instances within the same pass. Also adds similar logic for the GL_ARRAY_BUFFER (vertex buffers) as that is a hotspot as well. This is not intended to be a 100% avoiding any redundant call solution, but rather to take care of the most common hotspots, so that bad OpenGL implementations with a larger API call overhead will not cause us to regress compared to the direct OpenGL rendering path in Quick and Quick3D. What we have here reduces the number of GL calls in the view3d example by ~200 within one frame, which is a pretty good start. Task-number: QTBUG-78603 Change-Id: I6aeab9c1c43b148ea6ef05d0284990a996c7ba28 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | QDrawHelper cleanupsAllan Sandfeld Jensen2020-03-193-10/+5
| | | | | | | | | | | | | | | | | | | | | | We don't need to handle solid SourceOver logic directly, this was already handled by getOperator and changed composition to Source. Also removes some dead code and changes an assert in unreachable code to Q_UNREACHABLE. Change-Id: I66a6c1248bd34e31096023f1acb20385099932c9 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-181-2/+6
|\| | | | | | | Change-Id: Iaab37b633a8286c2c21425aaac34d30529a3ea82
| * Fix double scaling of SVG icons on high DPI screensTor Arne Vestbø2020-03-131-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a high-dpi screen and AA_UseHighDpiPixmaps set, QIcon will ask its engine for a scaled-up pixmap. When the icon has been created from a theme, the engine is a QIconLoaderEngine. For a SVG icon, that engine would recursively use QIcon to load the scaled-up pixmap, leading to double scale-up. Fix by bypassing the QIcon API in the SVG case, loading the SVG icon directly from the SVG icon engine. Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Fixes: QTBUG-73587 Fixes: QTBUG-75039 Change-Id: I7fba02b6454decb5fcbca9c5a092e75954261dfd Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | wasm: remove uneeded platform plugins from buildLorn Potter2020-03-161-1/+1
| | | | | | | | | | | | | | Wasm does not use minimal, offscreen or qvnc platform plugins. Change-Id: I3a1919a260280ffdff33b68502d488f71f2b0c13 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Doc: Remove \contentspage commandsTopi Reinio2020-03-152-9/+0
| | | | | | | | | | | | | | | | The command is deprecated and has no effect apart from generating a documentation warning. Change-Id: I30871bfd6975f8268930cce99993a8579242fdb8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Update UCD to Revision 26Edward Welbourne2020-03-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Include WordBreakTest.html, since a test uses sample strings from it, albeit without actually reading the file. Had to comment out more of the new tests, as at Revision 24, pending an update to harfbuzz and the text boundary detection code. Task-number: QTBUG-79631 Task-number: QTBUG-79418 Task-number: QTBUG-82747 Change-Id: I0082294b09d67ffdc6a9b5c15acf77ad3b86f65f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | qpa: Return accepted state from mouse, touch and wheel handlersLorn Potter2020-03-132-77/+79
| | | | | | | | | | | | | | | | Return the value from handleWindowSystemEvent so platform plugins can detect whether it was accepted or not. Change-Id: I53ffb713afc8e0ec1789107c912433133cfaa11a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix range-loop implicit copy warningMorten Johan Sørvig2020-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Make the copy explicit. qhighdpiscaling_p.h:282:24: warning: loop variable 'rect' has type 'const QRectF &' but is initialized with type 'const QRect' resulting in a copy [-Wrange-loop-analysis] for (const QRectF &rect : pixelRegion) { ^ Change-Id: I4080ff42c41e464d081ab2b01cb2d010867b041b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Hide default-invisible characters when shaping is disabledEskil Abrahamsen Blomfeldt2020-03-131-25/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When shaping is disabled we also skipped the step which set dontPrint to true for soft hyphens, line separators, and similar characters. This caused boxes to appear in text with e.g. line separators. There is a minor modification to the code that is moved: In the case on unshaped text and only the CMAP able is used, the font engine for the soft hyphen can be a fallback engine, so we need to also set the correct engine index when changing the glyph index. [ChangeLog][QtGui][Text] Fixed an issue with QFont::PreferNoShaping where boxes would appear in place of unprintable characters. Fixes: QTBUG-81994 Change-Id: Ifc9f4f89d928475ca0487a92b4480bd5db5918fd Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Make vulkan-flavored GLSL known to QShaderFormatJean-Michaël Celerier2020-03-132-2/+4
| | | | | | | | | | Change-Id: I6a3799c35aafa38095b316ee01d14b9db3af5e04 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | macOS: Streamline QIcon to NSImage conversionTor Arne Vestbø2020-03-122-17/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The conversion uses NSBitmapImageRep and correctly sets the display pixel ratio and size of the resulting image, reducing the need for clients to deal with this. It also propagates the isMask property of the icon to the NSImage. The function returns an auto-released object, as is customary for class-functions like these. Change-Id: If97f3d383959cd0f58a0d1249f5c26e52c1da9cd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | macOS: Streamline QImage to NSImage conversionTor Arne Vestbø2020-03-122-15/+34
| | | | | | | | | | | | | | | | | | | | | | | | The conversion uses NSBitmapImageRep and correctly sets the display pixel ratio and size of the resulting image, reducing the need for clients to deal with this. The function returns an auto-released object, as is customary for class-functions like these. Change-Id: I5124d1d8145a7f5266921b22fda1987798771ec1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Fix multi-threaded shrinking conversionAllan Sandfeld Jensen2020-03-111-1/+13
| | | | | | | | | | | | | | | | | | | | The conversion takes place in separate blocks, but may need to be compressed after converting. Fixes: QTBUG-82818 Change-Id: I71431af3d41e1bfe1f9b3d8cd7c1e0a2020846cd Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-03-112-13/+17
|\ \
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-112-13/+17
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/plugin/qlibrary.cpp src/corelib/plugin/qlibrary_unix.cpp src/corelib/plugin/qpluginloader.cpp Change-Id: I866feaaa2a4936ee5389679724c8471a5b4b583d
| | * Fix non-trivial soft-hyphen line breaksAllan Sandfeld Jensen2020-03-101-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The effect of the soft-hyphen needs to be updated once the final the break point has been found. This change cleans the logic by using two variables keeping track of soft-hyphen at current evaluated position and at last confirmed break point. Also adds tests for supression of soft-hyphens in the tight WrapAnywhere case. Fixes: QTBUG-35940 Fixes: QTBUG-44257 Change-Id: I7a89a8ef991b87691879bb7ce40cec4a3605fdd5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Add the include for QPointer to avoid MSVC compilation errorShawn Rutledge2020-03-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | It has been reported that 7447e2b337f12b4d04935d0f30fc673e4327d5a0 needs amending to build on MSVC 2019, although it was OK in CI. Change-Id: Id22c2a3608529abebd66c0e8f401bc6f26f45e18 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Replace initialization of sparse table of converts with settersAllan Sandfeld Jensen2020-03-111-1105/+230
|/ / | | | | | | | | | | | | | | This is similar to how the similar table in qblendfunctions.cpp is now set, and is easier to read and maintain. Change-Id: I43a885fae7b1a92110bb33f0b22a5b02fddc0115 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>