Commit Graph

30700 Commits

Author SHA1 Message Date
Topi Reinio 79e8c11eca Doc: Use \relates for functions and macros in the global scope
This addresses the recent warnings introduced by a change to QDoc:

src/qmlmodels/qqmlchangeset_p.h:120: (qdoc) warning: No documentation
    generated for function 'operator<<' in global scope.
src/qml/doc/src/qmlfunctions.qdoc:534: (qdoc) warning: No documentation
    generated for macro 'QML_SEQUENTIAL_CONTAINER' in global scope.

Pick-to: 6.5
Change-Id: I437933f797efc7569eb402e5c31cce8c2ba7d301
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-03-29 14:31:59 +00:00
Matthias Rauter b093fdc0be Add implicit height and width to custom dial snippet
This is required to capture mouse events properly. Similarly handled in basic dial.

Pick-to: 6.5
Fixes: QTBUG-108390
Change-Id: If273cc72a25bfea21f08d7c1511f14d7ab9d2fd0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-29 10:58:42 +02:00
Matthias Rauter 66b63ddaa2 Add copyright header to OpacityMask shader code
Pick-to: 6.4 6.5
Change-Id: I465f166855955b027b0ce4ba3d09f9fcf994bc1f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-29 10:58:42 +02:00
Fabian Kosmale f2c108518c AnchorChanges: Fix restore logic
The logic to decide whether a state change triggered a size change.
When AnchorChanges did not remove all old anchors, we might end up with
an anchor configuration that changes the size of an item (e.g.,
anchors.left and right being set), even if the new state only adds a
single anchor, e.g. anchors.left.

Moreover, we need to pass the correct dirty flags to setDirty, otherwise
the UI will not actually reflect the state of the Item.
As a driveby, fix an accidental double negation of qt_is_nan for
height.

Fixes: QTBUG-112354
Fixes: QTBUG-106677
Pick-to: 6.5 6.2
Change-Id: I6c456fbdc314672f4fcbe740d941b44183fd5500
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-29 08:39:21 +02:00
Mitch Curtis 2b979a2979 Stabilize some tst_QQuickFileDialogImpl test functions
As with 989e05a0b8, ensure that the
ListView delegates are up-to-date before checking the selected
delegate.

Task-number: QTBUG-101488
Pick-to: 6.5
Change-Id: Ib33df6d1a67d2090a5e6af52783212c2979930fb
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-03-29 08:24:42 +08:00
Mitch Curtis 590485bcc0 Improve tst_QQuickFileDialogImpl
Instead of hard-coding the list of expected visible file delegates,
move that logic into functions and call them.

Also, implement Clazy's suggestion of using the multi-argument overload
of arg().

Task-number: QTBUG-101488
Pick-to: 6.5
Change-Id: Iafb35329c30452b5689303d962675ea908e0f32a
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-03-29 08:24:37 +08:00
Ulf Hermann a6f5a3886d Doc: Rename and rephrase pages for QML {script|type} compiler
They describe the user facing concepts, not the actual tools. In the
case of QML script compiler there are two tools that implement it.

Clarify what qmlsc and qmlcachegen actually do and highlight the
differences.

Also, lower case all references to type compiler and script compiler.
They are not product names and therefore should not be upper cased.

Pick-to: 6.5
Change-Id: If800d368c904bd829d88b7376b107b1c5351a1ed
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-28 20:54:27 +02:00
Shawn Rutledge 2a6151097e doc: Use \value rather than \li for enumeration values and constants
Pick-to: 6.2 6.5
Change-Id: Ica8354a53d0a5fb5dd1d8cd5f774dcdc56b6f99a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-03-28 15:31:02 +02:00
Qt Submodule Update Bot 7cb4ccef52 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: If792eb008b2aead7cb17177bb4484e149d3366d5
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-03-28 13:31:01 +00:00
Shawn Rutledge b26439b2cb doc: Improve BorderImage; make snippets scaleable, detailed; screenshots
- This started with QTBUG-112322: introduce the border property next to
  the first snippet where it's used.
- Give declarative-scalegrid.png a white background rather than
  transparent, to be consistent with the screenshots and to look better
  with a dark documentation style.
- Make the snippets resizable so that it's possible to test the effects
  of the horizontalTileMode and verticalTileMode properties.
- Get the borderframe.svg and .png files from the qtdoc repo (which
  ought to have been in this repo already, but perhaps not).
- Resize borderframe.svg to 120x120 and set document size to match
  (in Inkscape); this makes it possible to use the svg directly in
  BorderImage, to test that QTBUG-25244 is really fixed.
- Make the snippets match the screenshots (all 182px wide, with grey
  rectangle borders as shown).
- It seems our scaling is smoother (less jagged) than in the old
  screenshots, so the new ones make a better impression.
- Add region index labels to snippets and screenshots to be a bit less
  confusing next to the paragraphs that are talking about "parts of
  image in regions 2 and 8" and so on. Too bad they have to be so tiny.
- Use \value rather than \li for enum values.

Amends 1a84b190bd

Pick-to: 6.2 6.5
Task-number: QTBUG-25244
Fixes: QTBUG-112322
Change-Id: I697ae1356eee62990b7903601cc493a04d3647a2
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-03-28 15:31:01 +02:00
Ulf Hermann 583b8269be QtQml: Improve handling of CU's sourceFileIndex
In the unlikely case that we get a corrupted CU from a cache file and it
still passes the header verification we don't want it to access invalid
memory when checking the file name.

We also generally want to use uint as index into the string table. A
signed integer makes no sense here.

Pick-to: 6.5
Coverity-Id: 310389
Change-Id: I12e9b8f39e1d3c68fd701c1ef4f54845ab8c3c12
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-28 15:31:01 +02:00
Shawn Rutledge b73ecfc066 doc: Fix some warnings (broken links)
Change-Id: I9ef36d761860b7b28c5e5e6e37826abfda9d998f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-28 11:43:31 +02:00
Olivier De Cannière c534d6b7b0 QV4: Mark singletons as deleted before actually deleting them
In cases where a singleton A holds a reference to another singleton B at
the end of the program and if B is destroyed before A, then the update
from B's destruction updates any binding A has on B. If the binding
tries to access B's members then "TypeError: Cannot read property
<property_name> of null" happens.

This fix marks all singletons as deleted before actually deleting them
so that bindings targeting them won't be reevaluated on update.

Randomness, likely due to a random seed in the QHash holding the
singletons changes the order of destruction of the singletons making the
issue sporadic. To account for this in the accompanying test, both
singletons hold a reference to the other.

Pick-to: 6.5
Fixes: QTBUG-111918
Change-Id: I30450fa08f89f7686c4a41fa46dde2174ce83606
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-03-27 13:52:34 +02:00
Ulf Hermann 05ae4d743b Controls: Improve various delegates
Their internal components should be bound, they should use required
properties, and they should prefer IDs over the "parent" property.

Change-Id: Iac61a4d7b9daf34928a1b41a29658e491e3ac39f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-27 12:52:34 +01:00
Ulf Hermann 86794e82ea Controls: Remove the model/modelData workarounds
Now that model has modelData as anonymous property and also has useful
properties for list models, we can remove the workarounds.

Change-Id: I744247821fba3c14e5bfff125daeeb7a3128f3b5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-27 12:52:34 +01:00
Friedemann Kleint a841da2c75 Gallery/Text editor: Update example logos
Pick-to: 6.5
Change-Id: I552edf074958be3af8c72042e65c6586308f434f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-27 08:22:16 +01:00
Bumjoon Park 023849fce4 Keyinteraction example: Update by coding conventions from official doc
- string are translated.
- JS statements no longer end with semi-colon.
- Fix qmllint warning.

Pick-to: 6.5 6.5.0
Change-Id: I83f2b702c9bb9f02f86728e2277297272cd75251
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-27 12:45:36 +09:00
Andreas Eliasson 82375b8590 Doc: Improve QML string value type documentation
QML only has a string value type, no String object type.

* Remove the QML String (Object) type page as it may cause confusion.
* Clarify that the QML string value type extends the JavaScript String
  (primitive) type.
* Link to the JavaScript Host Environment page for information about
  which version of ECMAScript QML supports.
* Provide some examples of features and methods that QML string
  supports.
* Make minor grammatical adjustments.

Fixes: QTBUG-111809
Pick-to: 6.5
Change-Id: Iadbd0586579c6190122cccbd1097a2bc51c0d9e4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-03-25 19:26:02 +01:00
Ulf Hermann e9f650cad8 Models: Straighten out model and modelData properties
If there is more than one role, just return the whole model item as
modelData. This makes sure we can always require modelData. That's a
basic precondition for writing delegates that work with any model.

The test shows that model and modelData behave quite erratically in the
different cases, but much of this cannot be changed anymore. At least
they are now both available in all cases.

Furthermore, provide modelData as anonymous property of model. This way,
if you have a model that can be singular, and a role that will be an
empty string if the model is singular, you can just write:

SomeDelegate {
    required property var model
    someData: model[role]
}

Task-number: QTBUG-111176
Task-number: QTBUG-110980
Task-number: QTBUG-104752
Change-Id: Ie200be467df2098d817b85b03d2409267722b596
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-24 12:12:06 +01:00
Mitch Curtis afa15792eb Add how-to for active focus debugging
This is a popular question online:

https://stackoverflow.com/q/47960622

Task-number: QTBUG-109634
Pick-to: 6.5
Change-Id: I640654a96f0cdd5d7571562b9140dc20f86e73b5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-24 15:44:31 +08:00
Mitch Curtis ac9830268a Add a how-to page for Qt Quick topics
The goal for this page is to have an easily discoverable, useful
reference that shows the simplest and best way of performing specific
tasks using Qt Quick. Each task will have its own section title (so
they can be linked to) in the form of a question. For example:

    How do I make a QML Button call C++ code when clicked?

Each section will provide QML and/or C++ code snippets, or link to
other parts of Qt's documentation where those snippets already exist.
The QML-only snippets will be tested by
tests/auto/quick/doc/how-tos/qml, and the mixed QML and C++ snippets
will be tested by individual auto tests under
tests/auto/quick/doc/how-tos.

Fixes: QTBUG-109634
Pick-to: 6.5
Change-Id: I512e016db2c914fd9e0241d5e0738af82a98d08b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-24 15:44:21 +08:00
Morten Sørvig d66db6c802 QSGDefaultPainterNode: Skip fillRect for invalid fill color
The initial background can be skipped safely in cases where
the painted item user code paint to all image pixels during
the paint() callback.

This makes for a performance improvement since we are then
no longer filling all image pixels twice.

Enable this behavior by interpreting an invalid fill color
as "disable background fill".

[ChangeLog][QtQuick][QQuickPaintedItem] Background filling
can now be disabled by setting the fill color to an invalid
color. This may improve performance, and is safe to do if
the paint() function draws to all pixels on each frame.

Change-Id: Ie403a92ec698df57954672fffb856cb200736886
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-03-23 19:33:25 +01:00
Ulf Hermann a0867cf1f4 QJSEngine: Fix some conversions
The optimization for object-to-string conversion would never trigger
because we were checking the wrong metatype for the PointerToQObject
flag.

Furthermore, we can provide a very simple optimization for the case when
we just want a QObject*. Finally, if we have both types, we can use
is_base_of_v to optimize cases where we are converting to a base class.

Pick-to: 6.5
Task-number: QTBUG-111986
Change-Id: I731fe0398730a2a83222d8c2fdff8aa3d21f7aec
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-23 19:33:25 +01:00
Jan Arve Sæther 24f5695d35 Do not crash if resizing a layout that got its child destroyed
Normally updatePolish() would call ensureLayoutItemsUpdated(), but in
some cases the layout might be resized before the updatePolish() is
processed.
We therefore have to also call ensureLayoutItemsUpdated() from rearrange()

Fixes: QTBUG-111792
Change-Id: Iab24dafc26dfa86975348c92244034f7ff825e5f
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-03-23 19:33:25 +01:00
Laszlo Agocs e9c0b15060 Fix destroying glyph cache textures with hidden text items
Move the management of the to-be-released textures up to the
rendercontext, so that the glyph cache objects do not need to
care about this. Issuing a delete(Later) on the QRhiTexture in
the glyph cache is too early if there is no visible text item
in the scene that's going to commit the resource updates
collected on the rendercontext's QRhiResourceUpdateBatch.
Instead, it is logical to move also the list of pending-release
textures to the rendercontext, since it already has the update
batch object.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-111995
Change-Id: Ic4309166f265950a7061ae510567ce677c4943df
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-23 13:27:58 +01:00
Matti Paaso 1b7042a566 Add Axivion config
Task-number: QTQAINFRA-5244
Change-Id: I55cc21be78a920eb5d53b587b57eee55e3fb85f4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-23 08:43:12 +00:00
Bumjoon Park 06985ea991 Positioners example: Update by coding conventions from official doc
- string are translated.
- JS statements no longer end with semi-colon.

Pick-to: 6.5 6.5.0
Change-Id: I2c8077cea2bd55ec6a407eca85394a667c6a289e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-23 15:29:45 +09:00
Mitch Curtis 65122609fb Material: fix Drawer issues
- Fix rounded edges only being shown correctly for Qt.LeftEdge (the
default value).
- Add vertical padding to ensure that the contents of the drawer isn't
rendered within the curved edges.

Fixes: QTBUG-112159
Pick-to: 6.5
Change-Id: I0ebc44848c913dbd3e745d13b82519aae187acc6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-23 12:02:29 +08:00
Olivier De Cannière d876ce343d QmlCompiler: Simplify isRescricted checks down to only enums
Most checks in isRestricted were redundant. Only those related to enums
seem to be useful. These are kept in the new checkForEnumProblems while
isRestricted is removed.

The error checking in checkForEnumProblems should also provide better
error messages for enum problems.

Pick-to: 6.5
Change-Id: Ic3f3589464ebe519bee8b4c580b2e80d310c937f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-22 13:57:24 +01:00
Richard Moe Gustavsen d1bf0e6d01 QQuickTableView: fix minor documentation issues
Several documentation errors have sneaked in here
and there. This patch will fix those issues.

Pick-to: 6.5
Change-Id: I57beb9a39a06a8302e1e83f91078a8f3c1c50670
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-03-22 13:57:24 +01:00
Richard Moe Gustavsen 9b804c58fc QQuickTableView: only clear selections when selections are enabled
TableView should only modify a selection (which includes clearing
it) when selections are enabled. Otherwise it should leave it to
the application to modify the selection model explicitly.

This can be used to set a selection that "sticks", regardless of
what the user does.

Pick-to: 6.5
Change-Id: I264946d1b3513846794e1fe12b7d94cfaef050ed
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-22 09:47:30 +01:00
Ulf Hermann ca5e691996 tst_qquickvisualdatamodel.cpp: Avoid memory leaks
Change-Id: I5ee44fec9cc214c5a7ffb916dc23ea5db10574d0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-21 11:27:18 +01:00
Andreas Eliasson 86313beb56 Doc: Remove broken link to Network Access Manager Factory example
The example has been moved to manual tests, which broke the link. Now,
that it's in manual tests, I'm guessing we can stop promoting it.

Pick-to: 6.5
Change-Id: I5b7c6838b632538f9c7a942cf28c138699ef51bc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-21 10:27:18 +00:00
Ulf Hermann d32f8bfa1a Doc: Update documentation on model/view/delegates
You should generally use required properties for all of this.
Furthermore, correct some grammar problems, and synchronize the
documentation to the examples it references. Remove the non-working
ListElement in a C++-defined model.

Pick-to: 6.5
Change-Id: I1be9b9997a86dc1028a71bdd5a94d6919c0f8a81
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-21 11:27:17 +01:00
Laszlo Agocs 6b0744066b Expose Vulkan queue indices from QSGRendererInterface
...in the absence of other options since some users will not want
to resort to private APIs (QRhi). Just reference the values in
the QRhiVulkanNativeHandles.

Fixes: QTBUG-108895
Change-Id: I619f0d7c8088421416178dd750e0b5fe2e360969
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-21 11:27:17 +01:00
Richard Moe Gustavsen 540017652f doc, HeaderView: add a code snippet to the documentation
Add a doc snippet to the HeaderView documentation
that shows how can use it together with a TableView.

Pick-to: 6.5
Change-Id: Id1043d2b6561f6e68e0ac120b7ba040760263314
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2023-03-21 09:10:39 +01:00
Andreas Eliasson f2e8dccbf2 Doc: Fix typo
Change-Id: Id17c37a7f7fc95afd89d0e674e7d7979d345b5f0
Pick-to: 6.5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-21 03:52:53 +00:00
Fabian Kosmale d2787d9556 Remove cmake porting artifacts
The condition could never have been met anymore (given that we depend
undconditionally on C++ > 17), and we apparently don't miss whatever the
porting script could not parse.

Change-Id: Ia6fcc09aa212f8a4fcc0e226e98e45bf4c9b8ccc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-03-21 00:43:15 +01:00
Topi Reinio c5a1849ed1 Doc: Fix QJSPrimitiveValue::to() \fn signature
And add \since information.

Change-Id: I3634a3b2dbc48e63fac4810cfc0c1a5137e925db
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-03-20 21:40:11 +00:00
Topi Reinio 9c8a63b6c0 Doc: Fix documentation warnings
* Remove \generatelist example[files|images] commands, they do not
  produce any output, only warnings.
* Add missing full stop to \brief descriptions.

Pick-to: 6.5
Change-Id: I90c67b8c3f3bbe901fa083f781e9056da7763671
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-03-20 21:40:00 +00:00
Mikolaj Boc 65636e6478 Introduce a new feature: quick-pixmap-cache-threaded-download
The new feature replaces USE_THREADED_DOWNLOAD in qquickpixmapcache.

Some code has been removed when it is not used:
- eventLoopQuitHack - not needed as event loop is not used with the
feature off
- mutex - thread synchronization measures are not needed if threads
are not used

Also, perform last job housekeeping in ~QQuickPixmapCache sync with
threaded downloads disabled.

Change-Id: Ic67385c94bbe403ed0544e78f30e7c237b4f4a95
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-20 18:39:41 +01:00
Bumjoon Park b1115d957f Dynamicview example: Update by coding conventions from official doc
- Fix qmllint warning.
- Fix runtime warning.
- string are translated.
- JS statements no longer end with semi-colon.

Pick-to: 6.5 6.5.0
Change-Id: I33958c414537aff32814f4ef2f04c73a03dc5295
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-20 17:16:23 +09:00
Oliver Eftevaag 2fcb336698 Revert value label for the Qt Quick Controls Material slider
The SliderHandle was changed in 0ac8eb67ea
to display the current value of the slider, while the SliderHandle was
being pressed.

This feature should be optional, and we currently don't have a nice API
for hiding it.

Let's look for a way to introduce this feature in Qt 6.6 instead.

Task-number: QTBUG-111355
Pick-to: 6.5 6.5.0
Change-Id: I3c3f240839d1b69c0fea32d59c8abc8e64e1a184
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-20 14:01:01 +08:00
Mitch Curtis 18b4a5ceef Doc: add \since to Text's renderTypeQuality property
Amends cbbbfe3bff.

Pick-to: 6.5 6.2
Change-Id: If1247a4f2d347f5c8b4993e24b04736db45df80d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-03-20 10:08:22 +08:00
Qt Submodule Update Bot f696331971 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: Icc6841a1879583312c07c999c662dc26af7bf14b
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-03-19 21:30:56 +00:00
Andreas Eliasson da4e62d07a Doc: Promote the Multieffect QML type page
This QML module, part of the Qt Quick Effects submodule, is not very
visible across the Qt Quick pages. Also, inform that this QML type
is the successor to the Qt Graphical Effects from Qt 5.

Fixes: QTBUG-111481
Pick-to: 6.5 6.5.0
Change-Id: I933bcc196a292a08135bcf77b397b5f7ff5d4827
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2023-03-19 17:27:01 +00:00
Andreas Eliasson 8ab0cd63b8 Doc: Fix example code for QQmlApplicationEngine::objectCreationFailed
The example should use &engine, not &app.

Fixes: QTBUG-111881
Pick-to: 6.5 6.5.0 6.4
Change-Id: I434fc602a9f945f3e18b5289f548864c2e9f27e5
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-18 10:52:48 +01:00
Ulf Hermann 9f4ecf2a75 QmlCompiler: Guard against ID-lookup of value types
Pick-to: 6.5 6.2
Task-number: QTBUG-111986
Change-Id: I10657e4176b5f57f3552728d8b2835e74b82bb60
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-17 21:42:04 +01:00
Andy Nichols 02e9a6b325 SceneGraph: Don't let QSGRenderNode::m_matrix be a dangling pointer
Previously QSGRenderNode::m_matrix would be a dangling pointer most of
the time. We document it as being valid during both the prepare, and
render methods, but it would only be valid during the prepare phase.
This was solved with the projectionMatrix by keeping a local copy
instead of a pointer. No code was actually using the dangling pointer,
but as a preventive measure since we document matrix as being valid also
during the rhiRender we now have a local copy in QSGRenderNodePrivate,
and manually set the pointer reference for the API, as well as a note to
fix this non-ideal situtation in Qt 7.

Fixes: QTBUG-97589
Change-Id: Idc0617de579d3d4ce5cc590534445f609adb9d61
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-03-17 20:57:14 +01:00
Ulf Hermann 55cb484934 QmlCompiler: Do not generate invalid code on generate_As
Pick-to: 6.5 6.5.0 6.2
Task-number: QTBUG-111986
Change-Id: Ib6e7179c20e6c7a4d6fc3a1a17eac550d2bbfa56
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-17 20:57:14 +01:00