summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Emit autolinks in QTextMarkdownWriterShawn Rutledge2022-06-241-6/+12
| | | | | | | | | | | | | | | | | | | When a markdown document contains a "naked" URL, or an angle-bracketed <URL>, md4c recognizes it, and we set the AnchorHref charfmt property. There's no need to expand it into the [text](url) form if the text is the same as the url, there is no tooltip, and the url is valid. QTextMarkdownWriter now writes a CommonMark "autolink" in that case: https://spec.commonmark.org/0.30/#autolinks [ChangeLog][QtGui][Text] QTextMarkdownWriter now writes an autolink whenever a hyperlink has no custom text and no tooltip, including when the document was parsed from Markdown containing a naked URL. Pick-to: 6.4 Fixes: QTBUG-94713 Change-Id: I432db8499c62e1e0b1e913bfd8ef2147e3c2bb2a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Add qthelp dependency to gui and widgetsLuca Di Sera2022-06-221-1/+2
| | | | | | | | | | | | | | | | The documentation for both gui and widgets defines members of the "helpsystem" group, which definition is given in qthelp. Due to recent changes in QDoc that automatically link a class page to its owning group, it is now required for those project to be dependent on qthelp, so that it is possible to retrieve the necessary linking information for the group definition. Hence, such a dependency was added. Change-Id: Id9399e76bbe10fb9ae0c05d637006b5cdc0b742b Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add the qt_class pragma to file listed in sync.profile classnames mapAlexey Edelev2022-06-221-0/+4
| | | | | | | | | This makes header files self-contained and reduces the number of 'sources of truth' for syncqt procedure. Change-Id: I7f5865abc69934603139d23e1b5452da46ccb110 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Document QMouseEvent::pos() as deprecated in 6.0Mikolaj Boc2022-06-221-0/+1
| | | | | | | | | The API is deprecated, but the documentation does not state that. Fixes: PYSIDE-1750 Pick-to: 6.4 6.3 6.2 6.1 6.0 Change-Id: I038ffeb958312d7648690743e06598a15dfb4cbc Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Port QXlibEglIntegration::getCompatibleVisualId to xcbIlya Fedin2022-06-203-170/+0
| | | | | | | | | | In combination with EGL_EXT_platform_xcb support, this allows xcb_egl to be used without xlib. Without EGL_EXT_platform_xcb support, this still reduces amount of code using xlib. Pick-to: 6.4 Change-Id: I29e2b29f7ef8ea34320887f62697f84232b86fba Reviewed-by: Liang Qi <liang.qi@qt.io>
* QWindow: fix C++20 buildGiuseppe D'Angelo2022-06-201-4/+4
| | | | | | | | | | In a lambda, capturing of `*this` by reference via `=` is deprecated, and breaks the build. Capture everything needed instead. Amends e7477e8934ab38722f5589914d08b3f15e870109. Change-Id: Ibdbf51cb7a5ec54004b14b719dfd44e86d6f0893 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix improper moc includes inside the Qt namespaceThiago Macieira2022-06-192-4/+4
| | | | | | Pick-to: 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16fa1b1413fd0d41 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* xcb: Get some style hints from xsettingsJiDe Zhang2022-06-183-2/+5
| | | | | | | | | | According to https://www.freedesktop.org/wiki/Specifications/XSettingsRegistry/. Added support for Net/CursorBlinkTime Net/DoubleClickTime Net/DoubleClickDistance Net/DndDragThreshold. Change-Id: Ief208736ed2938792d935bfd730fefdd745394b6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QFont: remove support for comma split setFamily()Janne Juntunen2022-06-171-12/+1
| | | | | | | | | | In the documentation it is said that from Qt 6.2 onwards setFamily() only sets a single family but so far this hasn't been the case. Fixes: QTBUG-102768 Pick-to: 6.4 Change-Id: I2a5037ea1385cb8c6644d1e256b89e167c590967 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix typos in docs and commentsKai Köhne2022-06-156-10/+10
| | | | | | | | | Found by codespell Pick-to: 6.4 Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Replace QT_NO_ACCESSIBILITY with QT_CONFIG(accessibility)Allan Sandfeld Jensen2022-06-1523-50/+48
| | | | | | | Pick-to: 6.4 Change-Id: Iee4bd8970810be1b23bdba65a74de912401dca65 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add support for painting at integer DPR with downscaleMorten Sørvig2022-06-142-14/+39
| | | | | | | | | | | | | | | | | | | Enable by setting QT_WIDGETS_HIGHDPI_DOWNSCALE=1 and QT_WIDGETS_RHI=1. This will make the backing store and painter operate at the next highest integer DPR in cases where QWindow::devicePixelRatio() returns a fractional value. The backing store image will then be downscaled to the target DPR at flush time, using the RHI flush pipeline. [ChangeLog][QWidgets] Added experimental support for always painting at an integer device pixel ratio (rounding the DPR up if necessary), followed by a downscale to the target DPR.Enable by setting QT_WIDGETS_HIGHDPI_DOWNSCALE=1 and QT_WIDGETS_RHI=1. Pick-to: 6.4 Task-number: QTBUG-86344 Change-Id: Id5b834a0e3499818b0b656161f5e0c38a6caa340 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Make rhiFlush() support custom source DPRMorten Sørvig2022-06-145-17/+21
| | | | | | | | | | | | | | | | | | | | | | | The rhiFlush() implementation currently assumes that QWindow->devicePixelRatio() is the correct scale factor for transforming device independent window geometry to source geometry. However, this assumption does not hold if/when we add support for drawing to a rounded-up DPR, with a downscale later in the rhiFlush implementation. Fix this by adding a sourceDevicePixelRatio argument to rhiFlush(), which is set to either QWindow::devicePixelRatio() or QWidget::devicePixelRatio(), depending on from where it is used. Change deviceRect() and friends in qbackingstoredefualtcompositor.cpp to be scale*() functions instead which take a scale factor instead of a QWindow. Update call sites to use srouceDevicePixelRatio where that makes sense. Pick-to: 6.4 Change-Id: Idb7b1e2f36816a201e00f0defe100d2dc079cb17 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Use consistent ordering in QShaderLaszlo Agocs2022-06-143-4/+45
| | | | | | | Fixes: QTBUG-101923 Change-Id: I62df3eba773350e47ed650acb00bc42b3ce6a899 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CoreText: Fix fonts with synthetic stretchEskil Abrahamsen Blomfeldt2022-06-141-2/+7
| | | | | | | | | | | | | | | If a font is synthetically condensed / expanded, we need to scale the advances as well as the bounding boxes for the glyph cache. The logic is adapted from DirectWrite font engine, where the same scaling is already in place. [ChangeLog][macOS] Fixed a bug where synthetically stretched fonts would get the wrong advances and sometimes glyphs would be clipped. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-103838 Change-Id: I09fc87b245d1f2de980c10ad9253b9a83571f714 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix font rendering when Qt is configured with -no-harfbuzzEskil Abrahamsen Blomfeldt2022-06-141-1/+5
| | | | | | | | | | | | | | | When Qt was configured with -no-harfbuzz, we would get overlapping glyphs, because we skipped the shaping step but did not set up things correctly before that. Instead, we force the PreferNoShaping code path when there is no shaper available. [ChangeLog][Text] Fixed font layouts when Qt was configured without Harfbuzz. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-100361 Change-Id: I1c54dbc457dbb235548b9d70324d607a0ee6d501 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Trace QImage::Format as int in QImageData::create()Shawn Rutledge2022-06-142-2/+2
| | | | | | | | | | Traces can contain only a few types; for now, enums have to be converted to int. Amends 6d323c0b221a3b127d80e338a42306cc34bc4d40 Task-number: QTBUG-102862 Change-Id: If129d03b13e723350bac987c6e35d471aa6c17e2 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
* Q*ApplicationPrivate: remove unused "flags" argumentsThiago Macieira2022-06-142-5/+5
| | | | | | | | | | | | | | | | They weren't flags. They were the version of Qt that was used in compiling the application itself. The protection against rollback isn't necessary any more, since qversiontagging.h, which applies to everything and not just the main application binary. And using them to make decisions on functionality or behavior is misguided (see previous commit). This commit does not deprecate the front-end classes' argument. In the future, we may find some need for them. Pick-to: 6.4 Change-Id: Ia4a094014ddb48cc9f6dfffd16f83a7b58ff95d3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Print QScreen geometry debug state using the underlying typesTor Arne Vestbø2022-06-131-11/+2
| | | | | | | | A QRect is unambiguous, and easier to parse than a custom rect format. Change-Id: If8c197a5e522744b9629d5d89536df5c0da7308c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update window geometry when QWindow::m{in|ax}imumSize is updatedJan Arve Sæther2022-06-132-22/+40
| | | | | | | | | | | | | | | | | | | | More specifically, if either minimum or maximum size are updated, make sure that the current window geometry is updated so that it is within the minimum and maximum sizes. Previously, these constraints was only respected by the window manager when the user resized the window. For widgets this already worked, because a top-level widget will take care of respecting these constraints if they are changed. Since QWindow::setMinimumSize and QWindow::setMaximumSize started to share so many common things, a new function (setMinOrMaxSize_helper()) is added. Task-number: QTBUG-102771 Change-Id: Ia4b2680dcf865f84a3cf6424187f9a6036b76386 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use CSS classes on html list items for checkbox supportShawn Rutledge2022-06-112-1/+23
| | | | | | | | | | | | | | If we replace the bullet character with a UC checkbox character, it looks ok in a browser, and the HTML parser can recover the BlockMarker attribute from the css class. [ChangeLog][QtGui][Text] Checkbox list items can now be read and written in both HTML and Markdown, including conversions. Task-number: QTBUG-103714 Change-Id: Ic6b74512075cd4ac16d6f80fdf55b221447491a9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Support cosmetic brush patterns in the pdf and opengl paint enginesEirik Aavitsland2022-06-041-4/+11
| | | | | | | | | | | | | | | | | | This implements the recent functionality extension of painting cosmetic (untransformed) brush patterns, and the corresponding NonCosmeticBrushPatterns render hint, in the pdf and opengl paint engines. As part of the implementation it also fixes a couple of pre-existing bugs in the opengl engine, relating to updating the brush after changes in transformation or brush origin. As a driveby, it also includes a minor fix for the lance testing tool: request stencil buffer, as that is needed and not always provided by default. This echoes a recent fix done to tst_baseline_painting. Change-Id: Ia8811477e015eebeb40ed138bca96643ce1ab0dc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QEdidParser: fix number of data blocksJonathan Liu2022-06-041-1/+2
| | | | | | | | | | | | | | | | | | | | The EDID standard defines 4 x 18 byte descriptors: 54-71: Descriptor 1 72-89: Descriptor 2 90-107: Descriptor 3 108-125: Descriptor 4 Immediately following the 4th 18 byte descriptor are the following: 126: Number of extensions 127: Checksum Therefore the number of data blocks (known as descriptors in the EDID standard) should be 4 instead of 5. Pick-to: 5.15 6.2 6.3 Change-Id: I63555b9142125df17b26401d81a6717936832162 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* QRhi(d3d): add missing qcryptographichash includeMårten Nordheim2022-06-031-0/+1
| | | | | Change-Id: I9e57c9dca3197c224aad9b6da32a2791fbb34d7c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QBrush: port from array of char[24] to qOffsetStringArray()Marc Mutz2022-06-021-2/+3
| | | | | | | | | | | | | | | | | | | | QOffsetStringArray has a more compact representation and silences warnings from GCC 12 builds with asan and ubsan sanitizers enabled: qbrush.cpp: In function ‘QDebug operator<<(QDebug, const QBrush&)’: qbrush.cpp:978:77: error: array subscript [0, 31] is outside array bounds of ‘const char [25][24]’ [-Werror=array-bounds] 978 | dbg.nospace() << "QBrush(" << b.color() << ',' << BRUSH_STYLES[b.style()] << ')'; | ~~~~~~~~~~~~~~~~~~~~~~^ qbrush.cpp:954:23: note: while referencing ‘BRUSH_STYLES’ 954 | static const char BRUSH_STYLES[][24] = { | ^~~~~~~~~~~~ cc1plus: all warnings being treated as errors Task-number: QTBUG-103923 Pick-to: 6.3 6.2 Change-Id: I5f81f516894e57b47783e2d89489a676b657fdb7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix misuses of 0.9999 constantAllan Sandfeld Jensen2022-06-022-9/+4
| | | | | | | | | Replace it with floor and round. It appears the old behavior was to work around combining ceil with inaccurate FP, but it doesn't appear this hacky ceil is needed. Change-Id: I5c16ec0fa4916e17198a733c46937fde53f2ddb5 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QKeySequence: constinit ALL the thingsMarc Mutz2022-06-021-3/+3
| | | | | | | | | | | | C++20 constinit acts as a static_assertion that the initialiation of the object doesn't incur runtime initialization overhead. Task-number: QTBUG-100486 Change-Id: I818f5ca9703273cd41e44e5ce7085cb5c643ca8e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QKeySequence: statically assert the sortedness of the MacSpecialKey arrayMarc Mutz2022-06-011-0/+7
| | | | | | | | | This array has, in the past, silently failed this test (cf. 5d8f815e101da3ae9cd6a666cc097853f52b21da). Make sure it doesn't happen again. Change-Id: I26192749d43de4a7add9d14c7ca04391c1799525 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Avoid uninitialized data after getRgbF() even for invalid colorsEirik Aavitsland2022-06-011-5/+2
| | | | | | | | | | The other getXxxF() functions will fill in values in the out parameters even in case of Invalid cspec. So make getRgbF() behave consistently, and return the same values as getRedF() etc. do in that case. Change-Id: Ibb8b0c9526b43ce61118c04b479328dbe88d0419 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Do metadata detach simpler than full detachAllan Sandfeld Jensen2022-06-012-14/+38
| | | | | | | | | Avoid a full data detach when only metadata changes. This paradigm was already used one place, and made generic. Fixes: QTBUG-81674 Change-Id: I605253babc6ad9fc130e19e8cef3812690933ac5 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* wasm: export a few symbolsLorn Potter2022-06-011-3/+3
| | | | | | | These are needed for dynamic linking/ shared library Change-Id: Ibd01d2b70ecf4afca273d07fafb2a5bd0650cf94 Reviewed-by: David Skoland <david.skoland@qt.io>
* QRasterPaintEngine: fix GCC 12 -Werror=array-boundsMarc Mutz2022-06-011-0/+1
| | | | | | | | | | | | An enum variable can legally have values larger than the largest enumerator, so GCC isn't wrong in warning about accesses out of bounds. But we know that we don't OR enumerators of this enum together, so tell GCC, too, by using a Q_ASSUME(). Pick-to: 6.3 6.2 Task-number: QTBUG-103923 Change-Id: I3472fdb19a73a22f04df53a13f809d899613adf5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* rhi: d3d11: Make the "pipeline" cache save/load functionalLaszlo Agocs2022-06-013-34/+272
| | | | | | | | | | | | | | | | | | | | | | | | There are no pipelines here of course. That's only for Vulkan. But the QRhi APIs provide a common interface for retrieving the serialized blob and pre-seeding the cache with a blob. The OpenGL backend already implements that interface via GL program binaries. We can do something similar with D3D, but it's a lot simpler: we just need to include the bytecode from HLSL->DXBC compilation (i.e. the result of D3DCompile() calls) and pick up the already present bytecode and skip the D3DCompile() call when applicable. Thus the mechanism is now available for Vulkan, OpenGL, and D3D11 as well. Has no effect whatsoever if EnablePipelineCacheLoadSave is not set at QRhi create() time. Also update the related docs. Task-number: QTBUG-103802 Change-Id: I91f1fb1f471bc7c654e26886a37c283066e842a8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QFontEngine: fix GCC 12 -Werror=array-boundsMarc Mutz2022-05-311-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Says GCC 12 with -sanitize address -sanitize undefined: qfontengine.cpp: In member function ‘bool QFontEngine::processHheaTable() const’: qfontengine.cpp:386:65: error: array subscript 4 is outside array bounds of ‘const char [1]’ [-Werror=array-bounds] 386 | qint16 ascent = qFromBigEndian<qint16>(hhea.constData() + 4); | ~~~~~~~~~~~~~~~~~^~~ qbytearray.h:56:23: note: at offset 4 into object ‘QByteArray::_empty’ of size 1 56 | static const char _empty; | ^~~~~~ (repeats several times) The compiler apparently assumes that data() and size() are independent of each other, and so finds that that constData() may return &_empty, which is a const char[1]. For some reason, storing the result of constData() in a temporary and indexing off of that fixes the issue. Potentially adding Q_ASSUME(d.data()[d.size] == '\0'); in some strategic place would fix it, too, but would incur runtime overhead. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105348 Task-number: QTBUG-103923 Pick-to: 6.3 6.2 Change-Id: Ia6e24e01d1c2a6bd9d91d4d082df9fba0d5c668f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Add new map methods for QColorTransformAllan Sandfeld Jensen2022-05-313-0/+58
| | | | | Change-Id: I520fc4f4bd958472c6d6359bf671835796c677fe Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Test prepared qcolortransformAllan Sandfeld Jensen2022-05-312-7/+19
| | | | | | | | | | Add test of explicitly prepared qcolortransform, this is a state a transform can get into if used for an image transform. Also cleans up the test code. Change-Id: I9445ed114bed0edc790e14024aaae6a42989220b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add painter render hint for brush pattern transformationEirik Aavitsland2022-05-317-14/+29
| | | | | | | | | | | | | | [ChangeLog][QtGui][QPainter] In Qt 5, the predefined brush patterns would always be transformed along with the object being painted. In Qt 6.0 onwards, they would or would not, depending on the SmoothPixmapTransformation render hint. Instead of this somewhat surprising behavior, make the default be untransformed (i.e. cosmetic), which makes sense when it comes to dpr scaling. For the cases where one wants scaling, a new render hint is introduced to enable that: NonCosmeticPatternBrushes. Change-Id: I2208c7a28af9056d7ab97a529b66bf2d502c3c4f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Drag and Drop: Fix the broken XDND protocol linkLaszlo Papp2022-05-301-8/+8
| | | | | Change-Id: I74b985d9198223891bb977e367f1265bfc148f95 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Fix documentation for vulkan licensesKai Köhne2022-05-302-1/+65
| | | | | | | | | | [ChangeLog][Third-Party Code] Vulkan API Registry is available not only under MIT License, but also Apache License 2.0. Make this explicit in the license documentation. Pick-to: 6.2 6.3 Change-Id: I6f07a7970319aef0a26f291de1eff7c316195802 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Make it possible to create QTextureFileData from imagesPaul Olav Tvete2022-05-272-17/+55
| | | | | | | | | | | | | Currently it is only possible to create a cube map texture from a single compressed texture file. In many cases, the cubemap asset is available as a set of individual image files. Making it possible to use these images directly will make the development process more efficient, and will reduce the size of the assets needed to be shipped with demos and examples. Task-number: QTBUG-103191 Change-Id: Icd12548e2dab55ec2123804cb28353cbf29926ce Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix documentation that claims that QStyleHints is read onlyVolker Hilsheimer2022-05-271-5/+4
| | | | | | | | | Most properties are, but some properties (such as useHoverEffects or showShortcutsInContextMenus) can be set by the application. Pick-to: 6.3 6.2 Change-Id: Ia6e0563a892f26456d595026f6c82502a9e888da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QTextDocument: add setLayoutEnabled()David Faure2022-05-264-4/+45
| | | | | | | | | | | | This allows to set up everything first - without paying for the layout calculation at every step - and only then trigger the layout once. Results: 0.065 msecs to create a QGraphicsTextItem with some text (layouted) 0.036 msecs to set everything up in a QGraphicsTextItem with 0 width Change-Id: I138bd1d58941d029bc0a36d2730216778f1fbd97 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Expand QColorTransformAllan Sandfeld Jensen2022-05-268-13/+135
| | | | | | | | | | Add comparison operators and an isIdentity() method to detect (1-1) transforms. [ChangeLog][QtGui] Added QColorTransform::isIdentity() method. Added QImage::colorTransformed() transitive method. Change-Id: I5fbcd14e75f2179e43e94e8c5f42cd0a5600790b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add test of QColorTransformAllan Sandfeld Jensen2022-05-261-1/+1
| | | | | | | | | Before it was only tested indirectly as part of the qcolorspace tests. This also fixes a rounding for maximum RGB64 values. Pick-to: 6.3 Change-Id: I6106e662c0f9d00c0b3a0c13213cb051ea39e14e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QFileSystemModelPrivate: de-inline ctor and dtorThiago Macieira2022-05-252-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | This class is dllexport'ed and has members that refer to classes that are only forward-declared in the header (such as QRegularExpression, used in std::vector). GCC and MSVC appear to emit the destructor at the point where it is used, which I guess is the vtable, which probably means where the constructor was inlined because I don't see any virtual overrides. Clang (at least in the form of ICX) appears to emit it at the class declaration point. C:\Qt\qt-everywhere-src-6.3.0\qtbase\src\gui\itemmodels/qfilesystemmodel_p.h(94,20): note: in instantiation of member function 'std::vector<QRegularExpression>::~vector' requested here class Q_GUI_EXPORT QFileSystemModelPrivate : public QAbstractItemModelPrivate ^ C:\Qt\qt-everywhere-src-6.3.0\qtbase\src\gui\itemmodels/qfilesystemmodel_p.h(94,20): note: in implicit destructor for 'QFileSystemModelPrivate' first required here C:\Qt\qt-everywhere-src-6.3.0\qtbase\src\gui\itemmodels/qfilesystemmodel_p.h(94,7): note: due to 'QFileSystemModelPrivate' being dllexported Fix by defining both the default ctor and the dtor out-of-line. Task-number: QTBUG-45582 Fixes: QTBUG-103605 Pick-to: 5.15 6.2 6.3 Change-Id: I77c8221eb2824c369feffffd16f08ee39004a825 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* doc: cross-link markdown functions in QTextDocumentFragment, QTextCursorShawn Rutledge2022-05-251-6/+5
| | | | | | | | Followup to 7c7606460403e6495b860134f28e8d4d45c6c810 Task-number: QTBUG-76105 Change-Id: I15ec22fb2bb40dc7b0f6f685cb2dc77a08c89918 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QKeySequence: Add missing modifier namesLaszlo Papp2022-05-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue is that when someone is trying to use the following code: QKeySequence keySequence(Qt::Key_Shift); qDebug() << keySequence.toString(); This will print seemingly gibberish output. It is unicode in practice. For Qt::Key_Shift, this would be: "�_@\uDC20" The reason why this is happening is because we have platform-specific ways to handle this due to Mac glyphs which are not available on Linux or Windows. This works fine on Mac. But for the Linux and Windows codepaths, there is not really any mapping like for other keys. It seems that modifiers were left out. The solution is to simply amend the list of mapping from these modifier key codes to raw strings for Linux and Windows like it is done for other key codes. So, now, modifiers will also be included in the list. So, the expected output will be generated for the above code, as: "Shift". [ChangeLog][QtGui][QKeySequence] Added missing modifier names Fixes: QTBUG-69715 Fixes: QTBUG-40030 Change-Id: I460d54bc8e593b350ff95894f23c5b4a7c819a44 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* rhi: Fix texture format doc typo and rephraseLaszlo Agocs2022-05-241-3/+3
| | | | | Change-Id: Ica4cc0fcea642eccfff7b53a65e7d1a428fd4dad Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Enable text layout drawing on coordinates outside QFIXED_MAXEirik Aavitsland2022-05-241-5/+12
| | | | | | | | | | | | | | | In an earlier commit, painting on such coordinates was rejected, since it would overflow the internal calculations using QFixed. Instead, avoid the overflow by translating the painter to avoid the huge coordinate values. Also reduce the max value somewhat, so that pos stays well away from QFIXED_MAX, to avoid overflows in the other QFixed variables that have values offset from pos. Fixes: QTBUG-103745 Pick-to: 6.3 6.2 Change-Id: Iebdec32bed57fe8e65551c7d278da9fd6c041b37 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QKeySequence: fix dynamic initialization of shared_emptyMarc Mutz2022-05-201-4/+1
| | | | | | | | | | | | | | The QKeySequencePrivate default constructor wasn't constexpr, so shared_empty was not constinit'able. To make the constructor constexpr in C++17 as well as C++20, needed to replace the fill_n() on the key member with Uniform Initialization. Found by attempting to apply C++20 constinit to its definition. Pick-to: 6.3 6.2 Change-Id: I2941e96348eb969029da2f0f7231079967bba996 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>