summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-1124-837/+1434
|\ | | | | | | Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
| * QVulkanWindow: Fix setQueueCreateInfoModifier signatureLaszlo Agocs2020-03-102-2/+2
| | | | | | | | | | | | | | ...per API review. Change-Id: I4a5a1cc895eac32f21f8a830507b841318509992 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * rhi: d3d11: Honor resource/sampler slot limitsLaszlo Agocs2020-03-101-66/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Show a warning but allow applications to survive by not attempting to call VS/PS/CSSetWhatever() with an invalid number of resources. Relevant for samplers in particular, where the limit is 16. Qt Quick 3D exhibits problems with this when using custom materials combined with shadow mapping, and while this is not a solution to the problem there, at least the problem is now clearly indicated instead of crashing. Task-number: QTBUG-82719 Change-Id: I83914b7648001fa421ed1cf07a7b7444e0ef8fc0 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * Multithread some QImage routinesAllan Sandfeld Jensen2020-03-096-519/+996
| | | | | | | | | | | | | | | | Use QThreadPool to process QImage smooth-scaling, format conversions, and colorspace transforms multithreaded. Change-Id: Ic142b1fa899f56e7e5099d36ca713701a47b681b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Add default arguments to QPainterPath methods using transformJarek Kobus2020-03-065-10/+15
| | | | | | | | | | | | | | Fixes: QTBUG-82602 Change-Id: Id82f145ffb33e6d4ef9b81282ad14657b1c8fbd0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * rhi: vulkan: Silence useless desc.set validation warningsLaszlo Agocs2020-03-061-0/+9
| | | | | | | | | | | | | | | | | | | | This is deemed more appropriate than having some time consuming tracking of descriptor types in pools, just to avoid the rare case of attempting a failing vkAllocateDescriptorSets(), which is then always followed by another, successful attempt. Change-Id: I7a3a1d80afe400dc96605a3d6c834e8b2c71143a Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * rhi: Add support for arrays of combined image samplersLaszlo Agocs2020-03-059-168/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces a new QRhiShaderResourceBinding function that takes an array of texture-sampler pairs. The existing function is also available and is equivalent to calling the array-based version with array size 1. It is important to note that for Metal one needs MSL 2.0 for array of textures, so qsb needs --msl 20 instead of --msl 12 for such shaders. Comes with an autotest, and also updates all .qsb files for said test with the latest shadertools. Task-number: QTBUG-82624 Change-Id: Ibc1973aae826836f16d842c41d6c8403fd7ff876 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * Don't use deprecated QPixmapCache::find overloadVolker Hilsheimer2020-03-041-2/+1
| | | | | | | | | | | | | | | | Silence compile time warning and show correct usage in example snippet. Change-Id: I1936f006e4b5f3ca71bbc0100ed039beeb459271 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Fix distribution of font properties in QTextFormatEskil Abrahamsen Blomfeldt2020-03-102-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The area reserved for font properties was too small for the properties we needed, and as a result font properties were added outside of the area and special-cased (in the case of FontLetterSpacingType) or ignored (in the case of FontStretch) by conditions that check if the property is within the designated area. We reorganize the enum values now that we can, and allocate some more space for the font properties area. Fixes: QTBUG-65345 Change-Id: I8121ff7f72102d8022c6a6d2f8ed9c35dcdbb321 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | CMake: Remove old 3rdparty mechanism for harfbuzz-non-ngAlexandru Croitor2020-03-101-0/+4
| | | | | | | | | | | | Change-Id: I37c1e561ac83c51a06aae50ccb176094785d52f5 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Regenerate configure.cmake files to get reportsAlexandru Croitor2020-03-091-0/+146
| | | | | | | | | | Change-Id: Ifa1646c7e471b3eaba552498ee1dc24f6ab864de Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Simplify OpenGL and OpenGL ES2 library tests in Gui's configure.jsonLeander Beernaert2020-03-091-12/+2
| | | | | | | | | | | | | | | | | | Change OpenGL and OpenGL ES2 library tests to just include the header file in the test header code. This mimics what the OpenGL ES3 library tests does. Change-Id: Ic63879ea100bc66cf58ffd660e89c5803c6e29e6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Enabler: Store more properties of application fontsEskil Abrahamsen Blomfeldt2020-03-067-211/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The family name of a font is ambiguous and without additional information there is no way to separate one font from another inside that family. In order to make it possible to expose more info about application fonts from FontLoader in Qt Quick, we need to store them in the font database. Task-number: QTBUG-68829 Change-Id: I931e1c2c004437ac0a21d4d88e55d176de676f34 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Initial cleanup of qevent.h for Qt6Allan Sandfeld Jensen2020-03-053-137/+19
| | | | | | | | | | | | | | | | | | | | | | | | Takes care of the first round of todos and deprecations for Qt6 in qevent. Not touching anything that might interfere with changing the class hierarchy as the file also suggest. Change-Id: If72d63d8932f1af588785bf77b34532358639a63 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Remove QImageIOHandler::name()Shawn Rutledge2020-03-052-14/+0
| | | | | | | | | | | | | | | | It has been marked obsolete for a very long time, and deprecated in code since f9e6f8efda350689211286db9154677924df8aab. Change-Id: Ib351025369584bf3b8a3a17f980a567d2b9556ca Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Lars Knoll2020-03-0431-209/+408
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-03-0431-209/+408
| |\| | | | | | | | | | Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
| | * QVulkanWindow: Remove queueCreateInfoModifier getterLaszlo Agocs2020-03-032-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | This is inconsistent with the other similar functions in QVulkanWindow, we do not provide getters for those either. Change-Id: If764b49f4b26ff14a2fa908b8d5b37429047250c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * rhi: Add a way to communicate back the native image layout for a QRhiTextureLaszlo Agocs2020-03-034-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relevant when doing custom rendering combined with QRhi, and only for APIs like Vulkan, where image layouts are a thing. As shown by demo apps, it is not currently possible to implement a correct application that renders or raytraces into a QRhiTexture's backing VkImage, and then uses that QRhiTexture in a QRhi-based render pass. This is because QRhi has no knowledge of the image layout if it changes due to commands recorded by direct Vulkan calls, and not via QRhi itself. So, except for certain simple cases, one will end up with incorrect image layout transitions in the barriers. (at minimum this will be caught by the validation layer) To remedy this, add a simple function taking the layout as int (we already do the opposite in nativeTexture()). Task-number: QTBUG-82435 Change-Id: Ic9e9c1b820b018f3b236742f99fe99fa6de63d36 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Add since 5.15 to new QVulkanInstance functionLaszlo Agocs2020-03-031-0/+2
| | | | | | | | | | | | | | | Change-Id: Ib1fb6186a8c76d6848d5eda1756e7749383dae40 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * rhi: Use versioning in QShaderDescription serialization as wellLaszlo Agocs2020-03-035-23/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first time that we add something to QShaderDescription after migrating to the non-JSON based serialization system. This now involves checking the "qsb version" when deserializing. Task-number: QTBUG-82624 Change-Id: I2bd875ef21e461559b878dccc5537cdfa43feaa2 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * rhi: Include an arrayDims vector in InOutVariable tooLaszlo Agocs2020-03-032-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the this struct to describe combined image samplers and storage images as well. Especially with the former, it is not unlikely that we will need arrays, so e.g. layout(binding = 1) uniform samplerCube shadowCubes[8]. In this case the '8' is something that must be reported in to the reflection information. The new arrayDims member is expected to work exactly like the similarly named member in BlockVariable. Task-number: QTBUG-82624 Change-Id: I1fb8b0318906ff4c116c1a7ec23a399c6545c730 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * rhi: vulkan: Sanitize device extension handlingLaszlo Agocs2020-03-033-18/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of qputenv("QT_VULKAN_DEVICE_EXTENSIONS", "VK_KHR_get_memory_requirements2;VK_NV_ray_tracing"); one can now do params.deviceExtensions = { "VK_KHR_get_memory_requirements2", "VK_NV_ray_tracing" }; on the QRhiVulkanInitParams passed to QRhi::create(). The environment variable stays important for Qt Quick applications, which provide no configurability for the QRhi construction (yet). On the other hand, applications using QRhi directly can now also use the new approach to specify the list of device extensions to enable. In addition, take QVulkanInfoVector<QVulkanExtension> into use. There is no reason not to rely on the infrastructure provided by QVulkanInstance. This also implies showing an informative warning for unsupported extensions, instead of merely failing the device creation. (applications will likely not be able to recover of course, but at least the reason for failing is made obvious this way) Task-number: QTBUG-82435 Change-Id: Ib47fd1a10c02be5ceef2c973e61e896c34f92fa3 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * rhi: d3d: Use native resource binding mapping table when presentLaszlo Agocs2020-03-032-64/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer versions of QShaderBaker will now use distinct, zero-based b, t+s, and u register spaces in the generated HLSL source. If this is the case, the native resource binding map (which so far we only used with Metal) contains the SPIR-V binding -> HLSL register binding mappings. This way we won't end up with invalid resource binding attempts (consider that e.g. D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT is only 16), just because, for example, a combined image sampler had a binding of 18 which then got blindly mapped to s18 and t18 in HLSL. Task-number: QTBUG-82472 Change-Id: I8bdcb5378634cf159f6367424582f9e9e5821c8e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * rhi: Execute pending host writes on nativeBuffer() queryLaszlo Agocs2020-03-037-30/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise it is impossible to write an application that pulls out the VkBuffer for a Dynamic QRhiBuffer, and then uses it with custom Vulkan operations that read from the buffer. More precisely, the problem arises only if the buffer in question is not used in combination with any QRhi operations, because in that case there is nothing that would trigger doing the host writes queued up by a resource batch's updateDynamicBuffer(). Task-number: QTBUG-82435 Change-Id: Ieb54422f1493921bc6d4d029be56130cd3a1362a Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-03-034-9/+23
| | |\
| | | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-294-9/+23
| | | |\ | | | | | | | | | | | | | | | Change-Id: I851c0328c3c38ea67b5ad115b205ac6a1262706e
| | | | * Fix geometry handling for native child windowsFriedemann Kleint2020-02-282-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't move the native child window position for native child windows. Initial-patch-by: Błażej Szczygieł <spaz16@wp.pl> Task-number: QTBUG-82312 Fixes: QTBUG-79166 Change-Id: I117ef08da13c8e90ff60cf034126c9efdc17b836 Reviewed-by: Błażej Szczygieł <mumei6102@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | | * QTextMarkdownImporter: fix use after free; add fuzz-generated testsShawn Rutledge2020-02-282-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was possible to end up with a dangling pointer in m_listStack. This is now avoided by using QPointer and doing nullptr checks before accessing any QTextList pointer stored there. We have 2 specimens of garbage that caused crashes before; now they don't. But only fuzz20450 triggered the dangling pointer in the list stack. The crash caused by fuzz20580 was fixed by updating md4c from upstream: 4b0fc030777cd541604f5ebaaad47a2b76d61ff9 Change-Id: I8e1eca23b281256a03aea0f55e9ae20f1bdd2a38 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
| | * | | Remove overrides of QImageIOHandler::name()Shawn Rutledge2020-03-0310-54/+0
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will remove the virtual base class function in Qt 6. For now, name() returns format(). Change-Id: I1597e823b859e4db148b3e5ac0f1c15350a582eb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | | CMake: Remove incorrect hardcoded harfbuzz conditionAlexandru Croitor2020-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-system harfbuzz feature doesn't actually have a condition in the json file. Change-Id: I4b74915f28da97d6ef8f89690e91306d243913ee Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | | Revert "Remove flagBits from QMatrix4x4"Fabian Kosmale2020-03-042-181/+654
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5ebb03c47604e0597502fbe1069de636987f33fc. Reason for revert: Removing flagBits breaks the batchrenderer in declarative, which accesses them via QMatrix4x4_Accessor. If flagBits are still going to be removed, we need to first find a solution for the renderer. Change-Id: Ib0a3fc7a327926f2245058c0e2ed30e8789aa75d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | | Remove references to QTextDocumentPrivate from public APIEskil Abrahamsen Blomfeldt2020-03-0418-129/+139
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The private object of QTextDocument has been exposed through public APIs marked internal, which we should avoid as much as possible, since it clutters the headers. For accessing private data without adding friends, we have a nice pattern of adding a static get() function to the private class itself. Fixes: QTBUG-55059 Change-Id: I03e949a677e03487e95f24e3608a06aa0a3511ab Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QImageIOPlugin: fix typo in class documentationRolf Eike Beer2020-03-031-1/+1
| | | | | | | | | | | | | | | Change-Id: Ic459ddc861a33501940e5aea5d5455455af5c584 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-036-10/+10
|\| | | | | | | | | | | Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
| * | Avoid using deprecated QTabletEvent::device() methodAllan Sandfeld Jensen2020-02-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | It was renamed to QTabletEvent::deviceType() in 882f340f62b8dc34633f5f296be12243b6e8999d. Change-Id: I070404bfc9a04144ae3565bfa3cc3a016040a07d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-283-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | Doc: Fix punctation in QPdfWriter::addFileAttachmentKai Koehne2020-02-281-1/+1
| | | | | | | | | | | | | | | Change-Id: Ic00ffd88ecbaa88409bf968f6794fad6f53a2f0e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Remove flagBits from QMatrix4x4Jarek Kobus2020-02-282-654/+181
| | | | | | | | | | | | | | | Change-Id: I14a22f3272b4793abd1e1b448351c94d3e07e946 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Lars Knoll2020-02-284-4/+6
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-02-284-4/+6
| |\| | | | | | | | | | | | | | Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Lars Knoll2020-02-272-2/+4
| | |\| | | | | | | | | | | | | Change-Id: I4212d070d5752275085e754b96f0392113604dba
| | | * Fix a quadratic behavior in the BiDi algorithmLars Knoll2020-02-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reset the lastETPosition after we changed DirET to DirEN, to avoid iterating over the same set of characters many times. Change-Id: Ib4113d0ba87ad70fc6bb386632eb094f943c080d Reviewed-by: Robert Loehning <robert.loehning@qt.io>
| | | * Fix bounding box of zero-width entities in QFontEngineFTAllan Sandfeld Jensen2020-02-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freetype can give us non empty bounds for zero-width characters, this change just makes us skip metrics of characters already found to not contribute to text advance. The coretext and windows font-engines already uses the already calculated advance. Change-Id: I82b3521a4fb92614be509be5982cd5ab9c1eb7de Fixes: QTBUG-58854 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * | QScreen::virtualSiblingAt(): pass QPoint by valueShawn Rutledge2020-02-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's too small to bother with passing by reference. Change-Id: I793678f5ae352b7f24d2c7e758dc75827c2190df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | | Get rid of QMatrixJarek Kobus2020-02-2829-1985/+145
|/ / / | | | | | | | | | | | | | | | Task-number: QTBUG-81628 Change-Id: Iad66bfdf49b9ee65558a451108c086fc40dc3884 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QTextOption: fix handling Qt::AlignBaselineChristian Ehrlicher2020-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextOption stores the Qt::Alignment flag in a eight bit bitfield. When Qt::AlignBaseline was added the bitfield was not extended so the newly used ninth bit is not stored in QTextOption. Fix it by using one of the unused bits. Simply extending the bitfield is not binary compatible so this has to wait for Qt6. Fixes: QTBUG-74652 Change-Id: I2539f5619ffe729459102fa5406fb6c0dd463ea1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Prepare QGuiAction::checked property for declarative useAllan Sandfeld Jensen2020-02-262-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the order checkable and checked are set in insignificant, by storing ignored checked value for un-checkable actions. Also gives checkable its own changed signal. Change-Id: If03db7c92481a542b6220604860abddb322bb517 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-2623-96/+463
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/bearermonitor/CMakeLists.txt examples/network/CMakeLists.txt src/corelib/tools/qlinkedlist.h src/sql/kernel/qsqldriver_p.h src/sql/kernel/qsqlresult_p.h src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/tools/moc/allmocs_baseline_in.json Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
| * | Add replacement message to deprecation of QImage::alphaChannel()Allan Sandfeld Jensen2020-02-251-1/+2
| | | | | | | | | | | | | | | Change-Id: I1d8afecc6da5df6fef72ecc59d14ac455c43d9a6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>