aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* QQuickWindow: disconnect incoming signals in dtor to avoid assertDavid Faure7 days2-7/+13
| | | | | | | | | | | | | | | | | | | | qtbase commit 92a65fdac69d7773b114584f1637946622cf4f72 changed what happened when deleting a QWindow with child windows: they are now deleted earlier, from ~QWindow rather than from ~QObject. As a consequence, if the deletion of the child window triggers any signal (such as QSGRenderContext::invalidated), the parent window now receives it (while before, the code in ~QObject would disconnect the parent window from all senders). Fixed by explicit disconnects, using a std::array of QMetaObject::Connections, like in QSortFilterProxyModel for instance. Task-number: QTBUG-140170 Pick-to: 6.10 6.10.0 Change-Id: Id2c402d3121c8a3e6962cfed0afe1e90f5f14b3f Reviewed-by: Marc Mutz <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
* Mark security header for qt labs animationSanthosh Kumar7 days1-0/+1
| | | | | | | | QUIP: 23 Task-number: QTBUG-136184 Pick-to: 6.10 6.9 6.8 Change-Id: I2867ec1ba4faa7c03e95735504b3052fea132ff3 Reviewed-by: MohammadHossein Qanbari <[email protected]>
* QtQml: Unregister QML animation timer on deletionUlf Hermann7 days2-3/+26
| | | | | | | | | | | | The QUnifiedTimer generally outlives the QML animation timer and needs to be notified about that latter's deletion. Otherwise it will hold a dangling pointer. Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-136629 Change-Id: I52b7f2f3ae716128e4acac628ea29477fc17b677 Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* qmlls: fix manual testSami Shalayel7 days1-2/+6
| | | | | | | | | | | | | Fix the module name, it seems that the author didn't realize the mismatched case probably due to his case-insensitive file system. Also add an artificial warning (assigning to inexisting property `invalid`) to better distinguish the cases of "qmlls has no lint warnings to show about the module import" and "qmlls crashed and thats why no lint warnings are to be seen". Task-number: QTBUG-119163 Change-Id: I32735dfa08417ca1dba11f4a4899a040907c4999 Reviewed-by: Ulf Hermann <[email protected]>
* QQmlCodeModel: simplify build path handlingSami Shalayel7 days4-93/+33
| | | | | | | | | | | | | | | | | | | | | | | The introduction of QQmlCodeModelManager made the per-root-url build path map of QQmlCodeModel redundant. Replace the per-root-url build path map with a single list of build paths. The API is adjusted accordingly: - replace buildPathsForRootUrl() with buildPaths() - replace setBuildPathsForRootUrl() with setBuildPaths() - remove unused helpers for root-url matching The build paths are now stored in a QStringList instead of a QHash keyed by root URL. This simplifies the logic in buildPathsForFileUrl(), which now falls back directly to settings when no explicit build paths are set via the environment or the commandline option of qmlls. Also fix a test to actually write a settings file on disk, as we now avoid reading settings values if no settings file was found. Change-Id: I4e7f409a9cf1368cc6afa134a1386fd98833693f Reviewed-by: Ulf Hermann <[email protected]>
* CMake: Guard examples that use Svg in a qt build without SvgAlexandru Croitor7 days2-5/+11
| | | | | | | | | | | | | | | | | | Otherwise one gets errors like the following in standalone examples build: CMake Error at tools/svgtoqml/Qt6SvgToQmlMacros.cmake:65 (add_custom_command): Error evaluating generator expression: $ No target "Qt6::svgtoqml" Because the examples now use the new qt_target_qml_from_svg() function, which will try to reference a non-existent svgtoqml tool target. Change-Id: I16b10c4fa31bd73d0d95bbad371cde54f17c236a Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* QQDAP::deliverPressOrReleaseEvent: return true if event was acceptedMitch Curtis7 days3-1/+79
| | | | | | | | | | | | | | | Previously it was returning event->allPointsAccepted(), which can be false even if the event was accepted, because the event points' accepted states are set to false before delivery. This fixes an issue where a MouseArea under a ContextMenu created by a text editing control would emit its pressed signal when a MenuItem in a popup window above it was clicked. Fixes: QTBUG-139342 Change-Id: I4d4043929c316a8e70fecdb4a8b23b48f9442390 Reviewed-by: Mitch Curtis <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
* QmlModels: Signal list model changes also via QQmlTableInstanceModelUlf Hermann7 days5-36/+103
| | | | | | | | | | | | | | | Allow QQmlDelegateModelItemMetaType to store any QQmlInstanceModel, but also store the kind of model we're dealing with so that we can quickly produce a QQmlDelegateModel or a QQmlTableInstanceModel when necessary. This allows us to send the modelChanged() signal. We do not expect to perform the same trickery that QQmlDelegateModel and QQmlTableInstanceModel do more often. Therefore this solution does not need to scale beyond those. Pick-to: 6.10 Task-number: QTBUG-139941 Change-Id: Id6d2a8ae5f96b755a776eb354e6ae291314dbf7b Reviewed-by: Sami Shalayel <[email protected]>
* QQuickTableView: Expose internal model changes via the model propertyUlf Hermann7 days6-4/+71
| | | | | | | | | | | | | | | If the delegate changes the model, those changes need to be visible in the "model" property of the view. To this end, use QQmlTableInstanceModel's model variant instead of the assigned one once it has been synchronized. The inner change signaling from the delegates to the view will be added in a separate change. Pick-to: 6.10 Task-number: QTBUG-139941 Change-Id: I1296fa2c886dad063b6b39defef56cb7faf1e943 Reviewed-by: Sami Shalayel <[email protected]>
* QmlCompiler: Guard against disappearing arrow functionsUlf Hermann8 days4-38/+107
| | | | | | | | | | | You can override a QObject method with a JavaScript function and take away the JavaScript function later by swapping out objects. This should not crash. Pick-to: 6.10 6.9 Fixes: QTBUG-140074 Change-Id: I85b17f4f619235024d0f1a27b4ff4128c7a57083 Reviewed-by: Sami Shalayel <[email protected]>
* QtQuick: Add delegateModelAccess test for QQuickTreeViewUlf Hermann8 days2-0/+223
| | | | | | | | | QQuickTreeView can't handle array or object models and therefore we don't need to take special measures to propagate changes to arrays back out of the view. Change-Id: I0d0bc2ea04b5862c1a2eac71cb9f5195c5b07af6 Reviewed-by: Sami Shalayel <[email protected]>
* QtQmlModels: Eliminate groupCount from QQmlDelegateModelItemMetaTypeUlf Hermann8 days2-20/+24
| | | | | | | | | It's the length of the groupNames +/-1, depending on context. We often want to count from 1 to end included, because the flags are offset by one. That does not change the number of groups, though. Change-Id: I6dfd4cc6f31bf85156a54b8ff3164e4275c7ff15 Reviewed-by: Sami Shalayel <[email protected]>
* QQmlCodeModel: split buildPathsForFileUrl() methodSami Shalayel8 days1-15/+20
| | | | | | | | Split the buildPathsForFileUrl method into a static helper method. Future commits will use it to add early exits in buildPathsForFileUrl(). Change-Id: Icadb89e8ea04bcf3e07f6b163c2cf9213e7d5945 Reviewed-by: Ulf Hermann <[email protected]>
* QQmlDomElements: remove unused enumSami Shalayel8 days1-6/+0
| | | | | | | | Amends 288e03a84d16f43d220a7f7912f1a5cbd3093062 that removed the need for the ParseMode struct, but didn't removed it. Change-Id: Id5b05b1e3c4907c42f822b4722cc721fc39c5125 Reviewed-by: Ulf Hermann <[email protected]>
* Fix build with V4_USE_VALGRIND definedAndreas Hartmetz8 days1-1/+1
| | | | | Change-Id: I3f3a58771d2721dc822add922c16a7efab3024ab Reviewed-by: Ulf Hermann <[email protected]>
* QtQuick: Simplify TableView model handlingUlf Hermann10 days3-24/+17
| | | | | | | | | Unwrap any QJSValues right away and eliminate a copy of the model. Pick-to: 6.10 Task-number: QTBUG-139941 Change-Id: I7f4a3ea97ae64cf0bb24aa032f8307c56bf7a597 Reviewed-by: Santhosh Kumar <[email protected]>
* Account for safe margins in tst_qquickwidget::layoutSizeChangeAssam Boudjelthia10 days1-2/+4
| | | | | | Pick-to: 6.10 6.9 Change-Id: Ie20dbbc0edcd1a559209322e2f297aefc3fb121b Reviewed-by: Tor Arne Vestbø <[email protected]>
* Add license headers to new shaders; stop doc bot complainingShawn Rutledge10 days3-2/+8
| | | | | Change-Id: I36862f842ece2432733036da18f2ab1cd663a4e9 Reviewed-by: Shawn Rutledge <[email protected]>
* Add ShapePath.cosmeticStrokeShawn Rutledge10 days32-157/+1097
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSvgRenderer already obeys the QPen::isCosmetic() setting. Now we add a ShapePath.cosmeticStroke property and try to support cosmetic stroking both with SVG and with Shapes, in all renderers. The curve renderer now starts with skinny triangles: each segment's end vertices are passed to the vertex shader with their original positions, and the shader uses the normal and the stroke width to expand the stroke triangles outwards as needed. We always add triangles for end caps, regardless whether they are square or round. We get rid of addBevelTriangle and fix bevels, square caps and miters: All three of these cases are done by drawing lines adjusted to the right direction within the respective triangles. And to avoid seeing rounded ends at any reasonable zoom level, we need the line equation coefficients to take the line very far outside the actual triangles. Square caps are really square: we render line segments in those three triangles, not extensions of the adjacent curve or line. Miters are also rendered as straight tangent lines. The bevel's triangle is very short when the join is an acute angle, and almost as tall as the full stroke width when the join is very obtuse. But when the triangle is short, we need to diminish the stroke width rendered in the fragment shader so that the center of the stroke falls on the inner corner of that triangle, and the edge of the stroke is rendered along the outer bevel edge rather than trying to go outside. That's achieved by multiplying the stroke width by the cosine of half the total angle, AKA the dot product. That is now in the normalExt.z vertex attribute. Normals (normalExt.xy) can be premultiplied rather than normalized: in fact some of them already have length > 1. In qsgbatchrenderer, Renderer::prepareAlphaBatches() breaks batches when overlaps occur. Now that we stroke lines with vertices that represent them as zero-width lines (and thus Element.bounds has the same x or y coordinates on both corners), we must consider lines right on top of each other to be overlapping: e.g. the stacks of horizontal (dashed) line segments in paint-stroke-202-t.svg must be in separate batches. At the time QQuickShape::updatePaintNode() is called, the available transform node (from UpdatePaintNodeData or an individual node's parent which is a transform node) does not contain the scaling factor that we need to allow for the stroke width to be adjusted for cosmetic stroking. But in QQuickShapePrivate::sync(), windowToItemTransform() is known, and from bde55ad574ac84440e2cdc9c1122a344bb1cb67a we have a precedent in QSGCurveStrokeMaterialShader::updateUniformData() for using the square root of the matrix determinant as a scaling approximation (ok when the scaling is uniform). QQuickShapeSoftwareRenderer::setNode() was already adjusting a path's bounding rect by its stroke width, and we need a multiplicative factor there to account for cosmetic stroking, to avoid excessive clipping in the software renderer. So now we have another use for the triangulationScale that was introduced in bcfcaeb87be783d8c329b0bc96323f1c9863982d. When QQShapeGenericRenderer is used (rendererType == GeometryRenderer), and any ShapePath has cosmeticStroke, we need it to re-triangulate whenever scale changes. QQuickShapeGenericRenderer::triangulateStroke() calls QTriangulatingStroker::setInvScale(1 / triangulationScale), and QTriangulatingStroker::process() multiplies its m_width by the inverse scale that was set (since 2009). So this tells us that the intended meaning of triangulationScale is the inverse of the factor by which we multiply the pen width. And when QQShapeGenericRenderer is in use, and there are cosmetic strokes, QQuickShape::itemChange triggers re-triangulation on changes in scale. When setting the QQuickShapeCurveRenderer::DebugWireframe debug visualization flag, we need to repeat the vertex shader calculations to expand the "skinny" triangles according to stroke width, just as we do with the actual stroking vertices. For now customTriangulator2 remains as legacy code, to be removed later on. It's poorly named, and returns a list of TriangleData which need to be iterated afterwards ("fix it in post"), looking up the QQuadPath::Element again in that second loop, which can go wrong when a path contains a move command. (For example, it could calculate a bevel between the end-tangent of one subpath and the start-tangent of the next.) customTriangulator2() was called from only one place, processStroke(), to which addStrokeTriangleCallback() is given: so the new way is to just call the callback directly as soon as we've calculated each triangle. Because we are not iterating again afterwards, the switch(type) is not needed in that case, and we no longer need TriangleData::type, except for supporting customTriangulator2(). [ChangeLog][QtQuick][Shapes] ShapePath now has a cosmeticStroke property which causes strokeWidth to be constant despite scaling. Set the environment variable QT_QUICKSHAPES_STROKE_EXPANDING to 1 to enable an experimental method of expanding strokes in the vertex shader, minimizing the need to re-triangulate when strokeWidth changes. Task-number: QTBUG-124638 Change-Id: I4eac0ddcd6f623b79bc70c766ff116f4b77736cb Reviewed-by: Paul Olav Tvete <[email protected]> Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* Properly wire up DelegateModel's modelChanged signalUlf Hermann10 days9-9/+94
| | | | | | | | | | If the model contents change we need to notify. This enables the signal propagation for Instantiator, Repeater, ListView, and GridView. Pick-to: 6.10 Task-number: QTBUG-139941 Change-Id: I384dcd296068ca7abfd1cad9fe662ae6e8938338 Reviewed-by: Fabian Kosmale <[email protected]>
* QmlModels: Align Instantiator implementations with other viewsUlf Hermann10 days2-82/+62
| | | | | | | | | | | | Use the common pattern for setModel() and use QQmlDelegateModel::createForView(). In turn, remove the hacky effectiveReset mechanism. Also remove the "initial 0" optimization. There's barely a point to this since the default model is 1. You had to go out of your way to trigger it. Change-Id: I80030ef36b82b312e6b7600616eebf2615a2f3d8 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
* QmlModels: Make QQmlInstantiator require QQmlDelegateModelUlf Hermann10 days4-39/+2
| | | | | | | | | | | | | | | Instantiator is almost entirely useless without QQmlDelegateModel. The only thing you can do is give it a list of pre-constructed objects which it then reflects in its own "objects" property. I don't see a reasonable use case for such a thing. [ChangeLog][QtQml] If you build with -no-feature-qml-delegate-model, along with most functionality of QtQml.Models, Instantiator will also be missing now. It makes no sense to provide an Instantiator that can't actually instantiate anything. Change-Id: If0c31346c43ebea21abf1aef53dc3a76f96f6fbd Reviewed-by: Fabian Kosmale <[email protected]>
* QmlModels: Test model-writing behavior of delegatesUlf Hermann10 days2-0/+33
| | | | | | | | | | When writing through a delegate, the original data is already written. We are only missing change signals. Pick-to: 6.10 Task-number: QTBUG-139941 Change-Id: I3124a8dc5852e3858a1e9bd9b74c07608bb5e446 Reviewed-by: Fabian Kosmale <[email protected]>
* QtQml: Empty SimpleArrayData vacant space when truncatingUlf Hermann10 days2-2/+37
| | | | | | | | | | | Without this we effectively soft-leak the contents of any SimpleArrayData whenever we truncate it. Only when the array was either completely dropped or re-filled would the extra objects be reclaimed. Task-number: QTBUG-139025 Pick-to: 6.10 6.9 6.8 Change-Id: I88e9dc3ea8ec57c1de71b7b5417ebcfbaa75bb61 Reviewed-by: Fabian Kosmale <[email protected]>
* Release section item when the corresponding view item removedSanthosh Kumar10 days3-0/+118
| | | | | | | | | | | | | | | | | | | | | | | The section item has not been removed or added to the section cache in all cases when the corresponding delegate item has been moved out of the visible area, either during flick or scroll. This happens in a case where the delegate item has been requested to be removed (as it goes out of the visible area) from the list view, but it's not released from the delegate model due to its caching mechanism. When an item is outside the visible area, releaseItem() is triggered, intended to free the item and its sections. The problem arises when releaseItem() calls QQmlInstanceModel::release(), which caches the item in the delegate model, but does not free the section. This prevents the section item from being released properly. This patch releases the section item whenever removeItem is triggered from the list view, which happens when the delegate item is moved out of the visible area. Fixes: QTBUG-137172 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ib7e78309e076e76750b03f3238a7501563a3962a Reviewed-by: Oliver Eftevaag <[email protected]>
* Add debug streaming operator to TriangleDataShawn Rutledge11 days3-0/+33
| | | | | | | | Also ifndef QT_NO_DEBUG_STREAM around the QQuadPath debug op. Both will be omitted from the build if QT_NO_DEBUG_STREAM is set. Change-Id: Ie86577ba61fc4f2b118d7e0a2b1ab702b318a473 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* cmake: use QT_NAMESPACE propertyTim Blechmann11 days1-1/+1
| | | | | | | | | QT_NAMESPACE is a public API to access the namespace from the Qt::Core target, replacing the private _qt_namespace property Pick-to: 6.10 Change-Id: I013be62bbe9068e0a9eb77ea2ffb40ac2f2f1b2e Reviewed-by: Alexandru Croitor <[email protected]>
* svgtoqml: Don't output full file path in commentEskil Abrahamsen Blomfeldt11 days1-1/+3
| | | | | | | | | | | | | | As part of the comment generated by svgtoqml, we would include the entire file path as it was provided in the arguments. With the introduction of the automatic svgtoqml build step, this argument will now include the full absolute path. Since the QML file is embedded in the binary, this caused internal file paths from our build farm to leak into the binaries, triggering an alert in the QA system. Change-Id: Iecffb5cfcf1cee127186b2c5d2e21e2ccc47f48a Reviewed-by: Samuli Piippo <[email protected]>
* Make svgtoqml run correctly even without default platform pluginEskil Abrahamsen Blomfeldt11 days1-10/+11
| | | | | | | | | | | | | | | The Qt SVG parser depends on having a QGuiApplication in order to load e.g. fonts. We want to prefer the default plugin on desktop platforms, since you will then be able to use SVGs that depend on system fonts as well. However, in a host build, where there are no GUI-enabled QPA plugins, we fall back to offscreen, which has some font support but which does not depend on a window manager. Task-number: QTBUG-139976 Change-Id: Ia9a5239c3d16f1daa4ad68d66412f519109361c2 Reviewed-by: Eirik Aavitsland <[email protected]>
* Gallery example: Brush up the .cpp fileFriedemann Kleint11 days1-24/+30
| | | | | | | | | Use modern string literals and replace #if-defery by a check on QOperatingSystemVersion::currentType(). Pick-to: 6.10 6.9 Change-Id: I319b6c7665a4c4cadd7d1e711d8527f79ca35261 Reviewed-by: Mitch Curtis <[email protected]>
* Spreadsheets example: Bump minimum required Qt versionSze Howe Koh11 days1-3/+3
| | | | | | | | | | | Amends 9601b74dabed53e93a7a5144d4c1fadb7876db18 The example no longer runs with Qt 6.9 or older as it uses the new (Horizontal|Vertical)HeaderViewDelegate types. Change-Id: I8430f4e9a48ddc9f72b20a4e998fde21480c4032 Pick-to: 6.10.0 6.10 Reviewed-by: Mitch Curtis <[email protected]>
* QtQml: Check for locals in metatypes stack frame before accessing themUlf Hermann11 days2-7/+20
| | | | | | | | | | | | ScopedStackFrame has no locals and we don't want to crash if we manage to run the GC while e.g. initializing a component. Amends commmit 2d016a2653c59f10a57dc1903b817f71d16d0622 Fixes: QTBUG-140057 Pick-to: 6.10.0 6.10 6.9 6.8 Change-Id: I7aeb39d6cb1f0ca0a661b8cfa2e7c159f968e224 Reviewed-by: Sami Shalayel <[email protected]>
* QtQml: Untangle "locals" member of stack frame a bitUlf Hermann11 days2-4/+1
| | | | | | | | | | It's only valid in the MetaTypesStackFrame and we should use its accessor. Amends commit 2d016a2653c59f10a57dc1903b817f71d16d0622. Change-Id: I6900fc01a0af2acf29324e54c0206c84f032c22d Reviewed-by: Sami Shalayel <[email protected]>
* QmlModels: Rename QQmlInstantiator::instanceModelUlf Hermann11 days2-28/+28
| | | | | | | It's called just "model" in other views. Change-Id: I50ae0456d52b8751a4fb5f1fe3a18ba339ef2fd4 Reviewed-by: Sami Shalayel <[email protected]>
* QQmlDelegateModel: Drop FINAL from some propertiesUlf Hermann12 days2-4/+6
| | | | | | | | | | | The dynamic metaobject of QQmlDelegateModelAttached likes to override them, which produces warnings. Amends commit 9355b7173c10045f7908bf16a97ba693967517e1. Pick-to: 6.10 6.9 6.8 Change-Id: Iaf0d6627fe6c373177f7f28a750fa2baf5fa2a7e Reviewed-by: Sami Shalayel <[email protected]>
* Move qqmlsortfilterproxymodel private class to a separate fileSanthosh Kumar12 days4-165/+259
| | | | | | | | | | | | The components used by QQmlSortFilterProxyModel (such as QQmlSorterCompositor) require access to the QQmlSortFilterProxyModelPrivate members, which are not possible as of now, and thus it would be better to keep it separate and, include it wherever required. Pick-to: 6.10 Change-Id: I4159a0ef988dc0a67dfb2ed8443137fa91e5a5d9 Reviewed-by: Mitch Curtis <[email protected]>
* QtQml: Avoid double-wrapping when converting to QVariantListUlf Hermann12 days5-4/+46
| | | | | | | | | Amends commit 1b89c1edcae68351632c2755e5408410c2ff98e3 Fixes: QTBUG-139764 Pick-to: 6.10 6.9 6.8 Change-Id: I1488527a235d74fc0352c72b9bfb69589c2f3d93 Reviewed-by: Sami Shalayel <[email protected]>
* doc: Highlight the weather forecast exampleEskil Abrahamsen Blomfeldt12 days1-1/+2
| | | | | | Pick-to: 6.10.0 6.10 Change-Id: I5f00ae24c3d170e5271d15e29ea4982b197171ad Reviewed-by: Eirik Aavitsland <[email protected]>
* Calculate correct device pixel ratio when rendering to layerEskil Abrahamsen Blomfeldt12 days4-2/+141
| | | | | | | | | | | | | | | | | | | When rendering to a layered item, the actual device pixel ratio is determined by the ratio between the width of the texture and the width of the logical rect. For most use cases, using the window's device pixel ratio would be correct, since the texture size is automatically calculated based on this. But in the cases where a manual texture size is set it would be incorrect and this would cause artifacts in the antialiasing for text and shapes. This also adds the correct scale factor to shapes, since this was even missing the device pixel ratio factor. Fixes: QTBUG-139997 Change-Id: Ibf1392f546f5cbcedd062852cbd87c0c0c097460 Reviewed-by: Laszlo Agocs <[email protected]>
* painterpathquickshape test: Add designhelpers_rectangleshape.qmlShawn Rutledge12 days3-0/+79
| | | | | | | | | | | | | | | | Lancelot at some point complained about AA changes in (among others) the designhelpers_rectangleshape.qml baseline. By having a closer look, it became clear that the issue was actually overlapping triangles on arc triangulation. It's not the only case where those occur, but it seems like a good test case to have, because rounded rectangles are so common. This is not the complete set of shapes from designhelpers/designhelpers_rectangleshape.qml : just a few that were flagged in Lancelot, plus a ControlledShape that reproduces a similar shape and is adjustable in the usual ways. Change-Id: Ic87f51e284157ca37b0e693e057a5ff9bdba3dcf Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* Cleanup, refactoring and internal docs in curve processor and rendererShawn Rutledge12 days5-148/+176
| | | | | | | | | | | | | | | | | | | - calculateJoin() is too big to continue as an internal lambda, and changes to customTriangulator2 (the only user) are coming later; so move it out to a top-level static function - use const - capture simple constants in the tooLong lambda - explicit captures in remaining lambdas - replace some single-letter variables with more meaningful ones - turn some plain comments into internal function docs - a couple of spelling and grammar corrections - init TriangleData::pathElementIndex=INT_MIN by default, to be able to distinguish default-constructed instances. Of course they are usually >= 0, but customTriangulator2() uses small negative indices as special triangle-type indicators. Change-Id: I7b70a02ac56522ee0c6aff26be80ac4e3e546bbd Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* Android: append Qt Quick for Android fragments documentationRami Potinkara13 days2-29/+62
| | | | | | | | | | | | This patch - fixes small syntax error - adds the link to Qt Academy course - add alternative way to initialize layout parameters Task-number: QTBUG-139320 Pick-to: 6.10 6.10.0 6.9 6.8 Change-Id: I981f097474fdbc410df30076098b71f08c070a1f Reviewed-by: Assam Boudjelthia <[email protected]>
* QQmlCodeModel: move read to QMLLS_BUILD_DIR in qmllsMainSami Shalayel13 days3-24/+7
| | | | | | | | | | | | | | | Move the code that reads the QMLLS_BUILD_DIR environment variable to qmllsMain, where the other environment variables like QMLLS_NO_CMAKE_CALLS are read. Modify a test in tst_qmlls_qqmlcodemodel that tests whether variables from the environment variables are used in qmlls to not test environment variables anymore, as the functionality was moved from qqmlcodemodel to qmllsMain. We already have tests for reading build folders from environment variables in tst_qmlls_cli, so no need to add new tests. Change-Id: I5deb1e4dcd67fecb68bbbadfeb3e803fc33cece9 Reviewed-by: Ulf Hermann <[email protected]>
* QQmlCodeModel: pass command line build folder to codemodelsSami Shalayel13 days2-26/+38
| | | | | | | | | | | Set the build folders possed via -b on all codemodels in QQmlCodeModelManager. Modify the buildPathsForUrl test to make sure that the build path passed to -b is passed to the correct workspace codemodel. Task-number: QTBUG-119163 Change-Id: I5696c481eb15ea111cced55718af598e3f23112a Reviewed-by: Ulf Hermann <[email protected]>
* QQmlCodeModel: populate files after loading themSami Shalayel13 days3-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | Populate the QML file after loading it, to avoid crashes later on. UpdateItemInSnapshot would write the DomItem of the qml file inside the snapshot, and then populate the lazy parts of the qml file while checking whether the file should be added to the valid snapshot too. This leaves the snapshot in an invalid state where the main thread responding to requests might access and use the only-partially-populated snapshot and crash, for example in the case of the document symbols that expect the Qml file to not be empty. Therefore, make sure that the qml file is populated by the qml file loading thread before writing it inside the snapshot. Note that addFileWatches() populates the file, so the crashes only happened when the CMake feature is disabled. Add a test to make sure that we don't load unpopulated files when the CMake feature is disabled. Task-number: QTBUG-119163 Change-Id: I6e73420f750e873898b7b426fe333edaf4d6a7c0 Reviewed-by: Ulf Hermann <[email protected]>
* QQmlCodeModel::addFileWatches: don't warn for already watched filesSami Shalayel13 days11-29/+118
| | | | | | | | | | Don't emit a warning for files that are already watched in QQmlCodeModel::addFileWatches, add a parameter to findFilePathsFromFileNames and findFilePathFromFileName to filter out unwanted filePaths from the result. Change-Id: Ic71229723952852437ea01d0d7e5c2ae1c53ac1c Reviewed-by: Ulf Hermann <[email protected]>
* qqmlcodemodel: add UpdatePolicy enum for snapshot updatesSami Shalayel13 days7-52/+52
| | | | | | | | | | | | | Add an UpdatePolicy enum for snapshot updates to be able to force update snapshots and force relint files, even if they have the same version. Also replace an existing enum that was doing the same thing with UpdatePolicy, and replace some methods that was accepting a 'force' boolean argument to take an UpdatePolicy enum. Task-number: QTBUG-119163 Change-Id: I4b7e2f4229a3aa5bccd798232dc9cfef04c88b9f Reviewed-by: Semih Yavuz <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* OpenDocumentSnapshot: remove unused scopeVersion memberSami Shalayel13 days2-3/+0
| | | | | | | Remove unused scopeVersion member, its not written to anywhere. Change-Id: Ib8ea1fe48b1c00b56e8ea0552cf878f7f06ef4d2 Reviewed-by: Semih Yavuz <[email protected]>
* QQmlCodeModel + HelpManager: guard shared data with mutexesSami Shalayel13 days4-36/+86
| | | | | | | | | | | | | | | | | | | | | | | QQmlCodeModel is accessed by two threads: the main thread handling LSP client requests, and the background thread that loads QML files. Both read and write members, which can lead to data races. Add missing QMutex usages to guard all member accesses, both reads and writes. Add a comment to the members that don't require the m_mutex because they have their own (DomEnvironment, HelpManager, QQmlToolingSharedSettings) or because they are const (m_rootUrl). HelpManager is also accessed concurrently: the main thread processes hover requests while the background thread sets the documentation path from a settings file. Protect its state with a mutex to avoid incomplete or inconsistent data being observed during hover requests. Group the member by whether they need to be protected, add a comment why they don't need to pbe protected, rearrange the members by size to avoid padding. Change-Id: I06fae1ca546a11a71c33e4f154f202977494ca51 Reviewed-by: Semih Yavuz <[email protected]>
* mac style: fall back to draw ProgressBar manually on macOS Tahoe 26Richard Moe Gustavsen13 days5-3/+191
| | | | | | | | | | | | | | | | | | On macOS Tahoe 26, the drawing of a ProgressBar using the mac style is broken. Nothing is drawn if we continue to use [NSView drawRect:], [NSView bitmapImageRepForCachingDisplayInRect:] or [CALayer renderInContext:] (and similar API) for drawing an NSProgressIndicator. This patch will therefore implement a fall back approach where we draw the ProgressBar manually when we detect that the current version of macOS is running with liquid glass support. Pick-to: 6.10 6.9 6.8 6.5 Task-number: QTBUG-138947 Task-number: QTBUG-138942 Change-Id: I26faea6e24d48bf0cb7bf2cd2b114d6ca2c2825f Reviewed-by: Tor Arne Vestbø <[email protected]>