aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
Commit message (Collapse)AuthorAgeFilesLines
* Quick: Make the branch for choosing profiler timing data constexprUlf Hermann14 hours1-1/+1
| | | | | | | | | This might be faster and it might help the compiler figure out that the array access is actually within the bounds of the array. Pick-to: 6.8 Change-Id: Ib65c244844e36744b7f7bd7a98e97fba499ec17c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Add snippet for DragHandler.acceptedButtonsShawn Rutledge27 hours2-0/+99
| | | | | | | | | | | | | | | DragHandler docs have been showing TapHandler code snippets, because both DragHandler and TapHandler inherit properties from PointerDeviceHandler, which is abstract and uses TapHandler code snippets in some of its property documentation. Override the acceptedButtons property documentation by adding it to the DragHandler class, and add a testable snippet. Task-number: QTBUG-119866 Pick-to: 6.8 6.7 6.5 6.2 Change-Id: Ic2c8ee98c33929fd90c8ec11509d510647c4a074 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* Fix build by including QTimer instead of QBasicTimerVolker Hilsheimer39 hours2-2/+2
| | | | | | | | | QSmoothedAnimationTimer subclasses QTimer, and QSGThreadedRenderLoop uses it, so include that class. Pick-to: 6.8 Change-Id: I4b77cc67a5ff79e73019a72668104c1eb0d41e45 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Prepare for Q{AbstractAnimation,Unified}Timer::runningAnimationCount() ↵Marc Mutz44 hours1-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | return value change Applying headersclean_check to private headers has pointed out that QAbstractAnimation{Timer,Job}::runningAnimationCount() narrow qsizetype to int in their respective return statements. Since this is private API, we can change the return type of the functions called runningAnimationCount() (incl. the one in QUnifiedTimer) from int to qsizetype, but have to adapt the users in other modules first. QtDeclarative is the only such module. For the virtual function, use a C++ macro defined in the respective QtBase change. For the caller, just receive as qsizetype already, and safely narrow when passing to the next function, which still takes int. Task-number: QTBUG-103530 Task-number: QTBUG-126219 Change-Id: Ib3d57290e74e8c099bbf23c615c409525ce690d2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* SelectionRectangle: clear selection from TableViewRichard Moe Gustavsen3 days1-2/+5
| | | | | | | | | | | | | | | | | | | If the TableView delegate has a TapHandler, it will shadow the TapHandler in TableView that normally clears the old selection when a new drag selection begins. This means that the SelectionRectangle will keep on extending the current selection, even when no modifiers are being held. This patch will make the selection logic more robust by leaving it to QQuickTableView::startSelection() to clear (or not clear) the existing selection. Then we don't depend on the TapHandler in TableView to be called, and we can also simplify SelectionRectangle a bit. Pick-to: 6.8 6.7 6.6 Task-number: QTBUG-125867 Change-Id: Iaa3c6414d916773f62de4faec5a2fcb7b2f3e6d0 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Remove the use of GENERATE_CPP_EXPORTS argumentAlexey Edelev3 days1-1/+0
| | | | | | | | | The behavior that argument was enabling is the default one now. Pick-to: 6.8 Task-number: QTBUG-90492 Change-Id: I11711d4c794f0b22169abb595b8ffad2eeb1300d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use the correct format for custom depth texturesPaul Olav Tvete4 days1-1/+2
| | | | | | | | | | The user-supplied depth texture has a format that is known to be supported. We need to use the same format for the intermediate depth-stencil buffer we create when multi-sampling is used. Pick-to: 6.8 Change-Id: If8c68da14d305c32bde966b7bb4fb85c1a4e0cab Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: fix snippet markers in pinchHandler snippetVolker Hilsheimer4 days2-3/+4
| | | | | | | | | | | | | Rename the snippet file so that qdoc doesn't look into the example file with the same name (and where there is no snippet to quote). Also add space between //! and [tag], and an empty line after the SPDX header. Pick-to: 6.8 Change-Id: I013df640c2fea6c25fd459c8a3a46312d14a93de Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io> Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* Remove the Window.parent and Window.z propertiesTor Arne Vestbø4 days4-35/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Parenting a Window directly into another Window or an Item had some subtle failure cases due to the way we hook into the Window and let the window container item control its positioning. The child item order of individual window containers were also wrong, causing problems for focus handling. Until we've solved these issues we remove (build out) the APIs on Window. The explicit WindowContainer item is still available, which doesn't have any of these issues. The machinery has been left in, so we can easily test and continue working on this, without exposing it to QML by default. [ChangeLog][QtQuick] The Window.parent and Window.z properties added as tech preview in Qt 6.7 have been removed due to known failure scenarios that are still being investigated. To embed a Window, use the explicit WindowContainer item, which does not have any of the known issues. Task-number: QTBUG-124756 Task-number: QTBUG-122415 Change-Id: I18667f254e398577d11d136a0a0b117cc5a9145b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Improve QQuickRhiItem introduction docsLaszlo Agocs4 days3-3/+42
| | | | | | | Pick-to: 6.8 6.7 Fixes: QTBUG-125720 Change-Id: I18b1bfa7da4e9ea3d6fbf1bfde8c0801fa6ef292 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* ListView: fix potential out-of-bounds write to list of visible itemsVolker Hilsheimer4 days1-1/+4
| | | | | | | Fixes: QTBUG-122658 Pick-to: 6.8 6.7 6.5 Change-Id: I5bec0d9d880d362d2633d29ff644876736949bb5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Ensure that "styleName" is set by Qt.fontLuca Di Sera8 days1-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt.font is a method on the global Qt object that allows creating a `font` value type from a JS object. The `QtObject::font` implementation for the method delegates to `QQmlValueTypeProvider::createValueType(const QJSValue&, ...)`, which takes care of setting up the relevant structure from the `QJSValue` wrapping the JS object. Currently, this will call the `create` function on `QQuickFontValueType`, the value type wrapper for the `QFont` type, which will extract all relevant properties and set them accordingly. The `create` function went out of sync with the actual structure of the type, so that it will not extract and set a `styleName` property from the JS object even if it is exposed by the value type. Thus, for example, trying to set `styleName` with call such as: ``` Qt.font({ styleName: "some style" }) ``` Will produce a `font` type that has a default `styleName` instead of the provided one. Thus, the `create` method for `QQuickFontValueType`, was amended to take into consideration the `styleName` property. A new test-case was added to ensure that usages of `Qt.font` will set a `styleName` when it is provided. Fixes: QTBUG-125495 Change-Id: Ic048d18012370e59947cbd19d116039799446458 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* ComboBox: fix popup palette inheritance, part twoMitch Curtis9 days1-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0ad15c4101889a22bf9ff761e7d20ec515f46514 fixed the colors of ComboBox's popup, but as a drive-by, tried to simplify several bindings to palette properties. For example: background: Rectangle { color: control.palette.window } became: background: Rectangle { color: palette.window } I'm guessing I thought that the standard Item palette propagation would kick in there and so the "control" part wasn't necessary. If ComboBox.qml's popup had a line like this palette.window: "red" then it would work, because the role is explicitly set. By setting a role in QML, QQuickPaletteColorProvider::m_requestedPalette is set for that item (Popup, in the example above). Just having palette: control.palette isn't enough, because no role has been set and hence m_requestedPalette won't be allocated and it will use the default values. This patch restores the previous code to fix the regression. Fixes: QTBUG-125529 Pick-to: 6.5 6.7 6.8 Change-Id: I2103b81a34d9e7f17992d0355befb8b904134db1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* doc: Add some missing properties to font qml type docsEskil Abrahamsen Blomfeldt10 days1-0/+2
| | | | | | | | | | Two new properties were added in Qt 6.8 and we forgot to add them to the "font" type documentation (they were only added to the docs for the text components) Pick-to: 6.8 Change-Id: Icc425d595ed492b12213e1d76953a1a8c72bbc80 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Be more careful in intersection solver at start/end of segment 1Matthias Rauter10 days1-1/+1
| | | | | | | | | | | | | | At ordinary intersections we use the intersection angle to decide on the next step forward. This does not work for intersections at the start and end points and we are falling back to finding inside/outside numerically. However, this was only done for one of the segments, leading to rendering bugs if it happened on the other segment. This patch also applies the numerical method to the second segment. Pick-to: 6.7 Fixes: QTBUG-125864 Change-Id: I490acb74ea6215efa1986c7c6bfbcdd8c3172120 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Account for item scale when determining a11y geometryMorten Sørvig10 days1-6/+7
| | | | | | | | | | | | | | | Map the item rect to scene coordinates, instead of mapping the position only. This will account for item or parent item scale. We don't have QWindow::mapToGlobal(QRect), and the rect has to be broken up again when mapping the position to screen coordinates. Fixes: QTBUG-76809 Change-Id: Ia3327936efba64792d95ca12f4ef44b2ace2e69c Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* macOS: Back off the render thread's updates when window is resizedTor Arne Vestbø10 days1-4/+24
| | | | | | | | | | | | | | | | | | | | Animators will normally do their updates exclusively on the render thread, ensuring animations continue even if the main thread is stalled. This is fine for normal operations, but during window resizing we need to give the main thread a chance to present drawables via displayLayer (which we plumb to exposeEvent), so that the window size is continuously updated. If the render thread is left to update and present as fast as it can, it will starve the main thread from drawables, making resizing choppy. We now detect if the window is being resized, and if so direct the update to the main thread via requestUpdate, which gives the QPA layer a chance to prioritize the resize updates over the animations. Pick-to: 6.8 Change-Id: Ice1e863a452d9eb4de72bae82db8dc91371ef329 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Replace all occurrences of Q_OS_MAC with more appropriate definesTor Arne Vestbø11 days1-2/+2
| | | | | | Pick-to: 6.8 Change-Id: I6ea24d0439c78efbb1df242fb980d3d8b084eeb2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use QAccessible Identifier in QAccessibleQuickItemJens Trillmann11 days3-0/+37
| | | | | | | | | Set the identifier to the user supplied value. Fixes: QTBUG-123361 Pick-to: 6.8 Change-Id: I5fcb4f134354eb03888a8d8e3b10957e498d7f38 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Introduce preferTypoLineMetrics property to Qt Quick fonts as wellEskil Abrahamsen Blomfeldt11 days6-17/+98
| | | | | | | | | | | This matches the newly added QFont::PreferTypoLineMetrics style strategy. As a drive-by, this also fixes the return type of the newly added contextFontMerging property in the docs. Pick-to: 6.8 Task-number: QTBUG-125585 Change-Id: I2ff0bc26c3744dad783870e8d45c07fa0b1a8e95 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Restructure builtins and QtQml.BaseUlf Hermann11 days1-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QtQml library should hold the builtins and provide no plugin. Move the types currently exposed in QtQml.Base to QtQml where it makes sense. Anonymous object types as well as sequence types and value types can well be exposed as builtins. This makes everybody's life easier since you now can universally depend on their availability. The Qt object, despite being a named object type, also becomes a builtin because you always have the "Qt" member of the JavaScript global object which holds the same thing. So, formally exposing "Qt" as builtin doesn't really add anything new. QQmlLoggingCategory is split up into two classes, not only because we need the base class when printing to the console from QtQml, but also because this paves the way for compile time identification of logging categories as first argument to the console methods. For QQmlLocale we have to refer to a different trick. The value type and the QQmlLocale "namespace" have to be builtins, but the "Locale" name, due to being uppercase and versioned, has to be part of QtQml. We transform QQmlLocale into a struct so that we can inherit the enums from QLocale and extend a namespace with it in QtQml. Pick-to: 6.8 Fixes: QTBUG-119473 Fixes: QTBUG-125765 Change-Id: Ica59390e54c473e33b4315f4384b724c870c1062 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Android: Add QtAbstractListModel Java APISoheil Armin13 days2-0/+31
| | | | | | | | | | | | | | | | QtAbstractListModel is a standard interface for models that represent their data as a simple non-hierarchical sequence of items. The C++ QAbstractItemModel is its counterpart. QtAbstractListModel extends QtAbstractItemModel just like the C++ API. In the C++ API, the parent(), hasChildren(), and columnCount() became private. Narrowing down access modifiers is not allow in Java, hence instead we made them final in the Java API to achieve nearly the same intention. Task-number: QTBUG-125888 Change-Id: I43a25cad09d3e0bcbbf35c8beaf4546d443dbf3f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Add auto tests for Java QtAbstractItemModelSoheil Armin13 days2-2/+4
| | | | | | | | | | This auto test will test the Java QtAbstractItemModel when extending it in Java and getting the proxy object in C++. Task-number: QTBUG-125605 Change-Id: Id508ac8b47f760fe8857ede4fda9b22c62cfd72d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QQuickImageBase: don't swap pending/current too early; async testShawn Rutledge13 days1-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the test class deviceloadingimage.cpp, using d->pix1 only was not a thorough test: it bypassed the new feature from e0e0f722b86db7b99185ccd669dd5456623e7e69 to keep showing a previously- loaded image while a new one is being loaded. It so happens that PDF files are some of the slowest images to load, and we want that to be as asynchronous as possible. But as soon as I tried in Qt PDF, with a single-page viewer, what I noticed is that if a different PDF file is loaded before the first is done loading, pix1 loads one PDF file and pix2 loads the other; if we swap twice, we end up showing nothing, because that's the source whose loading gets cancelled. (And even Image.frameCount ends up being incorrect, which is problematic for QML code that depends on it to enable a page-advance Shortcut.) When loading begins, we call QQuickPixmap::connectFinished() to get a callback when it finishes; but if the loading is cancelled, that's not disconnected. So we should not swap buffers if the pending one is not in Ready or Error state. When the second job is done, requestFinished() is called again anyway. Since the swapping is done in requestFinished(), we now have to ensure that requestFinished() is always called, even if loading happens very quickly. tst_qquickpixmapcache::slowDeviceInterrupted() is added to test a similar scenario (but using a QQuickImageProvider. Neither it nor QPdfIOHandler do their own threading; but PDF loading is really async.) Task-number: QTBUG-66713 Change-Id: I85022909fe55bb439a4b37dbb8a4035d692ca96d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* a11y: Add a method for issuing a QAccessibleAnnouncementEventAleix Pol14 days2-0/+15
| | | | | | | | | | | Makes it possible to send announcements to the accessibility system for QtQuick systems. [ChangeLog][Quick][Accessibility] Add support for sending announcement events to QtQuick apps. Change-Id: I1068f567a2c5b102e201ba38b81d8c54c299586e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Merge "Merge branch 'nativemenus' into dev"Richard Moe Gustavsen2024-05-311-1/+1
|\
| * Merge branch 'nativemenus' into devRichard Moe Gustavsen2024-05-311-1/+1
| |\ | | | | | | | | | Change-Id: I90c2b9de9244b66556024b3b124004c1d1bb3174
| | * Forward keyboard events to the active popup windowOliver Eftevaag2024-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Popup windows will never become the focus window of the application. Meaning that window system events will be send directly to the "main" window, and then forwarded to any potential popup windows, if any. But since popup windows don't become "active", they won't receive the focus in event, and thus never call setFocus on their contentItem. This could cause setFocusInScope() to skip assigning the activeFocusItem to be the new focus item. Effectively breaking keyboard navigation for things like menus that are inside a menubar. Change-Id: Id1345aee09ed4dd31017781f5e0e6f5f925551e6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Curve renderer: avoid unnecessary re-triangulationEirik Aavitsland2024-05-311-13/+16
|/ / | | | | | | | | | | | | | | | | | | | | Changes in gradient and filltransform only require the uniform block to be updated. Clean up and improve the uniform updating in the pathdata and fill nodes, avoiding redundant recomputations and reallocations. Fixes: QTBUG-125403 Change-Id: I3cf3e8524e9386618cb8cc34a1097e27454da527 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Android: Docs: Add Java QtQmlComponent documentationSoheil Armin2024-05-311-0/+95
| | | | | | | | | | Change-Id: I03d3d8aa9f1088afa6cbfec410ed53ab4258f60a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Android: Add QtQmlComponent loading support to QtQuickViewSoheil Armin2024-05-313-24/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QQmlComponent component implementation, can deliver app library name, module name, and the path to QML component to be loaded. It also wraps set/get/connect methods of QtQuickView with protected access. We can generate QQmlComponent concrete classes for selected components at build time. Generated implementations, will have typed set/get/connect methods, associated with properties and signals of the QML component. Alternatively, it's possible for the user to subclass QQmlComponent. We add a new ctors to QtQuickView that takes only the Context. Later, The user should instantiate and pass the QQmlComponent to loadComponent(). QtQuickView gets required lib,module and component from the implementation and loads the QML component by an internal new QQuickView instance. If the there is already a QQuickView instance available, it will be reused. Task-number: QTBUG-124846 Change-Id: Ic29beb1b3faecd9f2e70621ddcc286a1a7659cb5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Android: Add QtQmlComponent to support QtQuickView strong-typingSoheil Armin2024-05-312-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtQmlComponent is an abstract class that can either get extended by the user, or by a code generator tool to deliver library, module and Qml component information to a QtQuickView instance. The set/get/connect methods, wraps QtQuickView correspondent methods. These protected methods, later can be used to add "typed" methods to set/get properties of the QML component that QtQmlComponent extension represents and is loaded by QtQuickView. The lifespan of QtQmlComponent is independent from QtQuickView. However, when a QtQuickView loads the QML component that is represented by QtQmlComponent instance, it attachs to the QtQuickView until the QtQuickView loads another component or gets destoryed itself. Task-number: QTBUG-124846 Change-Id: I6bfc139574bd9e1905a15fcf51ac1742d5589a4f Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Android: Separate callback interfaces from QtQuickViewSoheil Armin2024-05-305-62/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separating QtQuickView.SignalListener and QtQuickView.StatusChangeListener interfaces, helps to use these types in other classes like QtQmlComponent without referring to QtQuickView which is not a part QtQmlComponent class tree. This also introduces a public enum type QtQmlStatus, to remove static fields of STATUS_xyz, and replace their usage with the enum type. Task-number: QTBUG-125769 Change-Id: I4da04c56a2247298e2cc6faedec9d5ab2f240c88 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Add documentation about permission for QtQuickView embedding in ServicePetri Virkkunen2024-05-301-2/+3
| | | | | | | | | | | | | | | | | | Amends commit a59f727ae58ed57ae52a1162e8e46755475a9269 which did not document the permission requirement. Task-number: QTBUG-124620 Change-Id: Ia5fd5e47116ca08a0bdc2aa17e4715449c2b8cb7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Android: Add sibling method to Java QtAbstractItemModelSoheil Armin2024-05-293-1/+35
| | | | | | | | | | | | | | Task-number: QTBUG-124803 Change-Id: Id6d6be44486fb93901133c20599e1d6f79da2d8a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
* | Android: Add Java QtAbstractItemModel as a QAIM wrapperSoheil Armin2024-05-2912-7/+917
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtAbstractItemModel is a Java wrapper of QAbstractItemModel. QtModelIndex is a Java wrapper of QModelIndex. QtAbstractItemModel is an abstract Java class that wraps commonly used public and protected functions of QAIM. A QAndroidItemModelProxy instance can be created as a proxy between the Java implementation and C++. The instance can be used as a *QAbstractItemModel, for instance to be passed as a QML property to the QQuickView instance, through QtQuickView. The implementation also has a private QtAbstractItemModelProxy Java class that exposes QAbstractItemModel* to the Java QtAbstractItemModel instance. QtModelIndex wraps a subset of QModelIndex APIs. As the ctor of QModelIndex is private, we use row + column + internalId to create new Java QtModelIndex instance when proxying from a QtAbstractItemModel using the internal QtAndroidItemModelProxy. When the proxying happens from *QAbstractItemModel to Java, we use row + column + parent, as QAIM::index() should be used instead of QAIM::createIndex(). This change also add required type conversions between C++ types and Java types. [ChangeLog][Android] Added new public Java classes, QtAbstractItemModel and QtModelIndex to wrap a subset of their C++ counterpart functionalities, through internal proxies. Task-number: QTBUG-124803 Change-Id: I2464d3d30592aeec8b678445c946e4d167dc4886 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Android: Fix Java Boolean conversion to boolSoheil Armin2024-05-291-1/+1
| | | | | | | | | | | | | | | | | | The java Boolean and its jni value type jboolean, has been defined as uint8_t in jni.h. We should explicitly convert it to bool type when creating a QVariant out of it. Change-Id: I93651a8a11026970d63f7a008dc42f50808a0050 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Android: Add missing Long type conversionSoheil Armin2024-05-292-0/+8
| | | | | | | | | | | | Fixes: QTBUG-125723 Change-Id: I6f4fc4323feec489dae8213572d976cbd2653ec6 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Add PlanarTransform.identity()Eirik Aavitsland2024-05-282-0/+14
| | | | | | | | | | | | | | | | | | | | The recently added PlanarTransform utility for generating matrix4x4 values in qml was lacking this obvious, most basic variant. Although equivalent to Qt.matrix4x4(), add it for API completeness and code aesthetics. Change-Id: I1a3658a86ceca5b222becdf116e6c76e2c8e95e0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Texture fill for shapesEskil Abrahamsen Blomfeldt2024-05-277-39/+237
| | | | | | | | | | | | | | | | | | | | | | This introduces a "fillItem" property to ShapePath. Similar to gradient, this enables filling a shape with any texture provider item, such as an image, a ShaderEffectSource or a layer-enabled item. Fixes: QTBUG-104121 Change-Id: I8748a90c825e8eb4655a4ac90648c6ae74420527 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Doc&qmltypereference fix link to w3 css/svg colorsChristian Ehrlicher2024-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | The link to the svg colors changed to https://www.w3.org/TR/css-color-3/#svg-color Pick-to: 6.7 6.5 Fixes: QTBUG-74331 Change-Id: I52985e322c4da43fc78d768ebb60a0b27d112abe Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Support drag and drop section reordering in the table viewSanthosh Kumar2024-05-273-34/+370
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new drag handler (QQuickTableViewDragHandler) in the header view allows the user to drag and drop row or column at the required index. At any point in time, there can be only one active handler, and depending on the type of operation, the corresponding handler consumes the pointer events. The user can customize the delegate using the new property 'containsDrag' when any corresponding drop section is activated while dragging a column or row. [ChangeLog][QtQuick][TableView] Added new property 'containsDrag' for the delegate, and it is set when a user drags a column or row on top of another delegate. This property is applicable only for HorizontalHeaderView and VerticalHeaderView. Task-number: QTBUG-100440 Change-Id: I52b1079559192f406e295aa34ca1d86acef61a6d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QSGMaterial: correct link in docs for viewCountLaszlo Agocs2024-05-271-4/+5
| | | | | | | | | | | | | | The new 6.8 functions changed their names in the meantime. Change-Id: I971e03a41e64772c3cd75df9875d2f0992a90447 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | QQuickTextImageHandler: Use newly introduced max-widthCarl Schwan2024-05-271-2/+22
| | | | | | | | | | | | | | | | The implementation follows the one from QTextImageHandler added in ab2f4ef8fad82fd07dac8768b8dcb94b11b271b6 in qtbase. Change-Id: Ic5816546a0dec1852894b7a7ab5b40b6affa1958 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Add PathRectangle, a PathElement for optionally rounded rectanglesEirik Aavitsland2024-05-262-6/+352
|/ | | | | | | | | | | | This new path element type is particularly useful for QuickShapes, where it can be used to mimic a Rectangle item. It provides the same API for specifying common and/or individual corner radii. [ChangeLog][QtQuick] Add PathRectangle, a PathElement for optionally rounded rectangles Fixes: QTBUG-123913 Change-Id: Ia0de252f70c665bd70f63aa31e3010584cc9cd8c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QQuickAbstractButton: setAction will share its Accessible objectAleix Pol2024-05-242-17/+96
| | | | | | | | | | | | | | | In cases where a button acts as a view for an action, provide the Action's accessibility information into the visual component so that it can convey the action's information into the accessibility infrastructure. This is done by creating a Accessibility proxy object in the button that will communicate the information from the action's accessibility as part of the button. If the properties of the Accessibility object in the button are modified, these values will prevail. Fixes: QTBUG-123123 Change-Id: Ibeddcc918616d717bb1704177d482ff88bfe99ef Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add invokable default ctors to all named, structured value typesUlf Hermann2024-05-231-0/+8
| | | | | | | | | | This way you can create them using new and populate them manually (provided you have a way of obtaining type references to them). Task-number: QTBUG-124662 Change-Id: Icceacaefafc311044d519e4af011b078dbf2f1e7 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Document QtQuickView embedding in ServicePetri Virkkunen2024-05-231-0/+37
| | | | | | | | Add snippet and description of using QtQuickView in an Android Service. Task-number: QTBUG-124620 Change-Id: I04dcd4d11c810ebdf37bf73bed08a3361751464f Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* curve renderer: Fix uniform offset with multiviewEskil Abrahamsen Blomfeldt2024-05-231-2/+2
| | | | | | | | | | | | When QSHADER_VIEW_COUNT is > 1, then we need to offset the next uniform by the actual view count, even if the projection matrix count is smaller and we therefore do no initialize all matrices. This is a theoretical issue, but makes sense for consistency with how the generic renderer handles this error. Change-Id: Iccda597dac50a6c249df771814958e5f3754a870 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Improve font documentationMitch Curtis2024-05-232-3/+29
| | | | | | | | | | | - Move snippets into a file so they are tested by tst_quick_examples. - Add snippet that shows how to construct a standalone font, which is useful for sharing fonts among Components, for example. Pick-to: 6.5 6.7 Change-Id: I87ef72c601060b6874d727aa4800f254c62f3eaf Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>