Commit Graph

30700 Commits

Author SHA1 Message Date
Safiyyah Moosa 961d11e55f Docs: Fix "Can't link to" example warnings
Task-number: QTBUG-113160
Pick-to: 6.5
Change-Id: I49de891c36d778df5d2727f2f0703d534421e2d5
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-05-02 19:29:25 +02:00
Semih Yavuz befaf0cd69 qmlls: Remove leftover method
Change-Id: Ia88f508bbec868497cc72c4ba5b5d81b75e46555
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 19:29:25 +02:00
Marc Mutz f961f5e221 Use new rvalue overload of QMetaProperty::writeOnGadget()
The new overload avoids the unconditional deep copy inside
QMetaProperty::write()'s lvalue overload.

Task-number: QTBUG-112762
Change-Id: Ic224faf72288e73bb6ad9049f1e0dc585e04ca19
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 17:16:07 +02:00
Doris Verria f6fb9252c6 RangeSlider: Don't update position only if mouse/touch is grabbed
A mouseClick will cause the RangeSlider handle to move to the click
position and we should expect the same for a touch press.

We update the position of the handle in handleRelease if keepMouse/
TouchGrab is set to true. However, we don't grab the touch on a
touch press in case eg.: a flickable wants to steal the event.
So we can remove the check as we shouldn't update the position
only if grabbed. This makes the behavior similar to the slider
too.

Fixes: QTBUG-112945
Pick-to: 6.5 6.2 5.15
Change-Id: Id2cf99416a52b5e42989a4adda1532e3ac550a93
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-05-02 10:12:35 +00:00
Mårten Nordheim 6f06068db8 Drop extra resizing of upload pools
It already happens as part of Renderer::map. So, if we set size = 0
before we call uploadBatch then it will implicitly set the size needed.
One of the loops was also grabbing the sizes before the final size
was determined.

Pick-to: 6.5
Change-Id: I610d9850a66011c3d17eea131c063c42fe149962
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-05-02 10:12:35 +00:00
Mårten Nordheim e061d654ea Really release pool resources in Renderer::releaseCachedResources
resize(0) only sets the size and doesn't deallocate anything.
Conversely, shrink(0), which was used before it was changed
to resize(0) doesn't change the size and only deallocates.
Use a mix of both for now.

Pick-to: 6.5
Change-Id: I3e36a766ef7483158a5a300351b0d7864d24e184
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-05-02 10:12:35 +00:00
Kai Köhne 2e6403f8bf Examples: Use versioned CMake targets for Qt modules
Use e.g. Qt6::Core instead of Qt::Core. This is better matching the
find_package(Qt6 ...) call, and also avoids issues that the versionless
targets have.

Pick-to: 6.5
Task-number: QTBUG-113277
Change-Id: Ib80f885e9f73fb9ad54b9e9b22cae2318877dc07
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-02 12:12:35 +02:00
Olivier De Cannière 8db22d191f Examples: Replace broken link to Qt logo in networkaccessmanagerfactory
Pick-to: 6.5
Change-Id: Idda2d0e70049873622e43baea2fbcf80f4b5723c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 12:12:35 +02:00
Mitch Curtis 9829dbd77d QQuickIndicatorButton: fix listeners being called after destruction
Remove the listeners of the indicator upon the button's destruction.

Task-number: QTBUG-98790
Pick-to: 6.2 6.5
Change-Id: I76509ebec601b8f6d004c90cdfbda46e390463a3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 18:12:35 +08:00
Mitch Curtis 098231ae31 PageIndicator: fix change listeners being called after destruction
Remove the listeners of the contentItem upon the PageIndicator's
destruction.

Task-number: QTBUG-98790
Pick-to: 6.2 6.5
Change-Id: Ic03a0ea149806de524567b4115255e308df90105
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 18:12:35 +08:00
Mitch Curtis 7481dff314 Menu: fix change listeners being called after destruction
Remove the listeners of the contentItem upon the Menu's destruction.

Task-number: QTBUG-98790
Pick-to: 6.2 6.5
Change-Id: Ic1aa842f003c9ced40e88b195021d085e86540eb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 18:12:35 +08:00
Olivier De Cannière c1983b446b cmake: Fix config for the networkaccessmanagerfactory manual example
Amends: d023d149d9

Pick-to: 6.5 6.5.1
Change-Id: I54adf85c1ff7da2d6cc1aa13b9c9c5e1a334c1d8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 10:12:35 +00:00
Richard Moe Gustavsen 1bac9de113 QQuickFlickable: avoid processing the same event twice
If Flickable has an exclusive grab (e.g if it's being dragged), and
at the same time, a child has a passive grab (e.g a TapHandler inside
a child of the content item), Flickable ends up getting the same pointer
events twice.

The reason this happens is because Flickable has a childMouseEventFilter.
So the flickable will first get all the pointer events since it has an
exclusive grab, just to see that the filter will receive the same
events once more, as they next are delivered to the passive grabbers.

The result is that Flickable will handle all pointer events
(move, release etc) twice when it has en exclusive grab, which will
even cause the flickable from stop flicking prematurely if the mouse
release ends up outside the bounds of the flickable (because of a double
call to handleReleaseEvent(), which will set stealMouse to false too
early).

To fix this, this patch will make sure that we don't handle any pointer
events in the childMouseEventFilter if we already have an exclusive grab.
After all, having an exclusive grab means that we're already getting the
events the "normal" way, and shouldn't handle the same events once more.

Fixes: QTBUG-104987
Pick-to: 6.5 6.4 6.2
Change-Id: Iaed49cb860cf50ea38a70a6e546d9dcf25cce444
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-05-02 12:12:35 +02:00
Fabian Kosmale a9644b46ca Remove obsolete Q_ENUMS usage
In qgfxsourceproxy_p.h, we can use the modern Q_ENUM. In
QQuickStyleOption, he usage of Q_ENUMS did not make sense to begin with,
as the class is neither a QObject nor a Q_GADGET (nor a Q_NAMESPACE).

Change-Id: I5b85a46f57033442504a27bf2e1a05d7b0aaac48
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-05-02 09:08:30 +02:00
Sami Shalayel e90b2040a2 add internal documentation to DomItem::visitTree
The usage is not clear from the implementation.

Change-Id: Iaa94bb88a6c190dcd7d3dcfcc4d1a396cb3affde
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-05-02 09:08:30 +02:00
Sami Shalayel eba8eb2305 Qml: Add script element for return statements
Implement and test the DOM representation of a JS return statement.

Task-number: QTBUG-100084
Task-number: QTBUG-111415
Change-Id: I2c11c0b9be3c93cf5be2bd9db5575335d4be19c1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 09:08:30 +02:00
Sami Shalayel 7d8ac7c2d3 qqmldomastcreator: set qqmljsscope in DOM script elements
Rename the getter from {setQ,q}QmlJSScope() to {setS,s}emanticScope().
Set the semantic scope in the script elements where needed.
Test that BlockStatements contain their semantic scope.

Task-number: QTBUG-100084
Task-number: QTBUG-111415
Change-Id: If8b34c7edaac6aaf42a1cb2c47b12820358709e5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 09:08:29 +02:00
Sami Shalayel 447fbe9186 tst_qmldomitem:domContructionTime for scriptexpression
Add a benchmark for DomConstruction using the scriptexpressions.

Task-number: QTBUG-92876
Change-Id: Ieab942a194d82933601424247d6ab71bce0540e2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 09:08:29 +02:00
Sami Shalayel 4a15598628 Dom: Introduce scriptelements in the DOM representation
Implement the Dom representation for some constructs, like:
* Literals (string and numbers)
* IdentifierExpressions (variableNames appearing in expressions)
* VariableDeclarations and VariableDeclarationEntries
* ForStatements
* BlockStatements
* IfStatements

Introduce the namespace QQmlJS::Dom::ScriptElements that will contain
the Dom representation of javascript statements and expressions.

To incorporate the new DomItem wrappers in the Dom, extend the
qqmldomastcreator to also visit the corresponding javascript AST parts.
Like this, it can create the new Dom script elements using its stack:
visit() pushes new elements on the stack while endVisit() collects the
children of the current element from the stack (note: in the reverse
order they were pushed on the stack). The implementation uses two stacks
to avoid having to check every time if the top of the stack is a
QmlStackElement or a ScriptStackElement, but logically both stacks work
as one stack, containing first all QmlStackElements and then all
ScriptStackElements.

In case non-implemented script elements are encountered by
QQmlDomAstCreator, it will disable the script expression
construction and print a warning, instead of asserting and making a lot
of unrelated tests fail. This mechanism can be removed once all script
elements are implemented in the DOM.

Wrap script element pointers into a ScriptElementVariant variant that
can be used to contain any script element.

Added a flag to enable script element construction during DOM
construction.

Task-number: QTBUG-92876
Change-Id: I24b070ca3ff6ce916036842280cf91a21d049f30
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 09:08:29 +02:00
Sami Shalayel a9e821d6ab QQmlDomAstCreator: Rename StackEl to QmlStackElement
This prepares qqmldomastcreator for the introduction of
ScriptStackElements in a later commit.

Task-number: QTBUG-92876
Change-Id: Ice74f05129c2935aa13bf68189cee211eaa72c7a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-05-02 09:08:29 +02:00
Qt Submodule Update Bot 4801a2d86e Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I92030ae5bbce5f61aa14ef0dad53e2338531ba77
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-05-02 04:49:08 +00:00
Fabian Kosmale 71541af735 QML metatypes: Adjust to QMetaType revision increment
Pick-to: 6.5
Task-number: QTBUG-113227
Change-Id: Icd2ca482ef8656d544c7c560ca05b9dd222f9c0a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-05-02 06:49:06 +02:00
Tasuku Suzuki fcf1adc840 Fix build with -no-feature-qml-delegate-model
Change-Id: I5c4d7df079346e9750b521e19bff3f34b6c81306
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-05-01 12:47:03 +09:00
Mitch Curtis 8efa148293 BusyIndicator: stop animation when not visible
This prevents unnecessary CPU and GPU usage with the iOS and Fusion
styles.

It's not currently possible to test this without adding objectNames to
each animation, which relies on us remembering to do so. Even then, not
all styles use QML animations in their BusyIndicator implementations -
some use e.g. QQuickAnimatedNode). Also, there is no QML API to find
QObject children of a given type (animations) - I've created
QTBUG-113264 to propose such an API.

Task-number: QTBUG-50161
Pick-to: 6.5
Change-Id: Ieafb5f2f1a9703d4dc26e4f934dbcc86e2709445
Reviewed-by: Doris Verria <doris.verria@qt.io>
2023-05-01 08:08:52 +08:00
Seokha Ko e6a363efe8 Flickable: Send movement signal when flick starts
If there are multiple moves between touch down and release,
but they are merged, or if there is only one move,
flick occurs but no movement signal is generated.
So, send movementStarted if the view is moving in
handleReleaseEvent

Fixes: QTBUG-112924
Pick-to: 6.2 6.4 6.5
Change-Id: I774799bac2a00296a72005dcfa9ade6683836d08
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-04-29 12:40:32 +00:00
Ulf Hermann e846864151 QmlCompiler: Inline some array methods
So far we can only deal with methods that don't change the source array
and don't use iterators or functions as parameters. We also omit
concat() for now. However, indexOf(), lastIndexOf(), includes(),
join(), slice() and toString() are possible already now.

Task-number: QTBUG-112722
Change-Id: Id19c74e8ad25af876bc954c040c767823b7e3259
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-28 21:24:17 +02:00
Ulf Hermann a63347100c QmlCompiler: Remove emptyListType
It was a stop-gap solution on the way to actual list type support. It
creates problems because it's a sequence type but doesn't have a value
type.

Add an assert to catch related problems earlier in the future.

Fixes: QTBUG-113265
Change-Id: Iae955ab6c5ca41113095b523a5d6b9bcfd4d2396
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-28 18:46:43 +02:00
Alexey Edelev bb8163a533 Add the use of the qt_internal_project_setup function
The function sets the required CMake variables and policies.

Pick-to: 6.5
Task-number: QTBUG-112685
Change-Id: Idae8f19eca28bac764480130dc679df1c1273598
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-04-28 12:51:39 +02:00
Matthias Rauter fcf3f5655b Add wrapped signal to Dial
The signal allows to track when a dial is wrapped around (jumping from end to
start or vice verse) and count the full rotations of the dial.

[ChangeLog][Controls] The dial element emits the wrapped() signal when it is
wrapped around.

Change-Id: I6e4cb29b0ddf96a7819b51cff3b21e1755edf765
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-28 09:54:23 +02:00
Matthias Rauter d93ca833f6 Add startAngle and endAngle properties to Dial
The start and end angle of the Dial element were hard coded before. Now
they can be set by the application developer using the new properties
startAngle and endAngle. The angle property is set to an angle between
those values, even if it is >360 or <0. The setter functions make sure
that the relation between angle and value is unique. Further, values for
start and endAngle are limited to [-360, 720]. Wrap works as before.
Tests have been updated.

All styles have been updated to the new functionality except the Imagine
style (see task QTBUG-112387).

[ChangeLog][Controls] The start and end angle of the dial element are
made customizabe.

Fixes: QTBUG-57822
Change-Id: I941837008d4f9b4dde1979e91db5adb624bcbe41
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-28 09:54:16 +02:00
Fabian Kosmale 0a333bc7e5 QQmlData: Implement markAsDeleted without recursion
While a normal QML scene should not feature extremely deep object trees,
one can still encounter them in some test cases.
Those test cases might then run out of (C++) stack space with the
previous recursive version of markAsDeleted.

Thus, we change the implementation to use an explicit workqueue instead
of relying on recursion. This changes the visitation order, but code is
not supposed to rely on the order of Component.onDestroyed calls anyway
(and we keep at least the order in so far that the parent emits the
"signal" before it's children.

Pick-to: 6.5
Change-Id: I93b30cc26b984d1a21cff92df1dd68cd45e67477
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-28 05:41:06 +02:00
Seokha Ko 407675b191 Blacklist failing tests in tst_flickableinterop
pinchHandlerOnFlickable fail with QTBUG-112924.
Blacklist it for now.
It will be handled in QTBUG-113226

Fixes: QTBUG-113226
Fixes: QTBUG-112924
Pick-to: 6.2 6.4 6.5
Change-Id: I58c646f957fb6f397405dc477d00eee770602e80
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-04-28 00:33:29 +00:00
Tim Jenßen db01d4ef5a qmlpreview: fix crash on exit
saveWindowPosition() uses QSettings which uses
the special file engine, which does not exist
at destructor time anymore.
This resulted in a crash.
QQmlPreviewPosition idea is that saveWindowPosition()
is called when there was a move event.
Also saving it at the constructor was just a nice to
have.

Pick-to: 6.5
Change-Id: I650176691acf8ad1ef9ae46b76f61dafee82a56d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-04-28 00:23:18 +02:00
Ulf Hermann 0f139dfbfc Models: Make all model roles available for array models
This includes various kinds of objects in lists of various kinds. We
just dynamically create a metaobject that includes all keys we've seen
so far.

For example, you can now pass an array of JavaScript objects as model
to a ComboBox and it will retrieve the correct textRole:

    ComboBox {
        model: [
            { name: "Apple", color: "red" },
            { name: "Orange", color: "orange" },
            { name: "Banana", color: "yellow" }
        ]
        textRole: "color"
    }

This will create the entries "red", "orange", and "yellow".

Amends commit 86794e82ea.

Change-Id: I3df1f0b43ca1496f7eaed1165731d871c354ac1a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-27 22:23:18 +00:00
Mitch Curtis ad08d9e342 Add more output to lcContextMatcher
Combined with qt.gui.shortcutmap, this makes it possible to see why a
Shortcut isn't activated, as you can now see which popup blocked it.

Change-Id: Ieadcfd47300bd41d8ca42116650d94ab711f59d4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-04-28 04:16:45 +08:00
Volker Hilsheimer 741b5c6b51 Make the colorresolving benchmark also a benchmark for cmake
Using qt_internal_add_test for a benchmark gives it a _check target, not
a _benchmark target. Use qt_internal_add_benchmark instead, link against
QuickTest, and set the QUICK_TEST_SOURCE_DIR variable explicitly.

Pick-to: 6.5
Change-Id: Id72f2623b7edaa538ef3ff2cb3f505506652ee5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-04-27 16:56:36 +02:00
Ulf Hermann 0d10fcbb0f qml: Construct QQmlApplicationEngine only when we need it
Otherwise we leak a lot of memory if any of the exit() calls is
triggered.

Change-Id: I338abe2ef63217e6b80ffc2f8fe65d9cac03d994
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-27 10:06:11 +02:00
Ulf Hermann 100ac19151 qqmllist.h: Include qcontainerinfo.h
Task-number: QTBUG-113148
Change-Id: I9dfdc5601b684b2c54c6436ab86cd2f633c432b5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-27 10:04:40 +02:00
Qt Submodule Update Bot 8e14829dc7 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I0eb05e0a2d4fb50a2d5181b0f3c5e3c94b20f530
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-04-27 04:52:54 +00:00
Ulf Hermann be884811d3 Models: Fix condition for context object
As shown in the ComboBox test, it is possible for a context object to
coexist with required properties. We have to check if the context object
is the same as the model object.

Amends commit e9f650cad8

Task-number: QTBUG-111176
Task-number: QTBUG-110980
Task-number: QTBUG-104752
Change-Id: Idfee277b5c3b78c514b2d239d73fcb6809577678
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-04-26 20:58:55 +02:00
Kai Köhne 68ca4261ac Doc: Fix typo in qmllint overview
Change-Id: I4ea406cac1acc138c4a1097795ba9347f21d9530
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-04-26 16:06:11 +02:00
Ulf Hermann f10630aa03 QmlCompiler: Use actual type of enums, rather than int
Now that the type is available from qmltypes we can just use it.

Task-number: QTBUG-112180
Change-Id: I315372da0925f19c209f676226f450863b0d3ea5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-26 10:57:27 +02:00
Ulf Hermann 9088125f14 Controls: Remove remaining isArray() hacks and improve delegates
The text role data can be retrieved with model[textRole] in all cases
these days. The delegate components should be bound and the model and
index properties should be required.

Also adapt the documentation to not explain the isArray() hack anymore.

Task-number: QTBUG-112291
Change-Id: Ife323b4de1b081168bb02e2564a67203741818e0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-26 10:57:27 +02:00
Jan Arve Sæther adc3d8b2e4 Fix StackLayout to keep the current visible item after insert/removal
If an item is inserted or deleted at an index less than or equal to the
current index, StackLayout.currentIndex will be updated in order to
reflect which is the current visible item. This is consistent with
QStackedLayout, QStackedWidget and TabBar

[ChangeLog][QtQuick][Layouts] StackLayout will now update currentIndex
if an Item is inserted or removed at an index less than or equal to the
current index.

Task-number: QTBUG-112691
Pick-to: 6.5
Change-Id: Id1d687e309c8f199a4f68698b53ca7c169f17dcd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-26 10:57:26 +02:00
Antti Määttä e362381e59 Trace: Convert qtdeclarative to use new tracepoint generation
Pick-to: 6.5
Change-Id: Ieacfa716b657ac221a75cd5a0dd75d5099962e91
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2023-04-26 08:28:04 +03:00
Semih Yavuz 3da2a8209c tst_qmlls: Fix CMakeLists.txt
Some tests link to Qt::QuickTestUtilsPrivate which depends on Qt::Quick
target. In case qtdeclarative is built without qtshadertools, qtquick is
not build and cmake fails for those tests. Add Qt::QuickTestUtilsPrivate
check and also remove the duplicate dependency.

Change-Id: Ifafe567a8d61fe4174d31fc0ab7a6a3148fdd4c9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-04-26 01:19:54 +02:00
Laszlo Agocs 017bf54020 Hook up GPU frame timing to QQuickGraphicsConfig and the logs
The idea being that setting QSG_RHI_PROFILE=1 will not just enable
debug markers (which is only actively used in Quick 3D right now),
but also timestamps, and then we can start showing GPU frame times
from the GPU side with Vulkan, Metal, and D3D11 atm.
(the only catch is that the value is heavily asynchronous and is
always referring to a previous frame, usually current - 2, but may
be up to current - 4 etc.)

In addition to the env.var., the setter/getter API is added to
QQuickGraphicsConfiguration. In the end they all maps to the
QRhi::Timestamps flag.

Once enabled, the renderloop timing log, both with threaded and
basic, will start including a new line, as long as the underlying
3D API supports timestamp queries or similar. (in practice this is
implemented for Metal, Vulkan, and D3D11 for now)

[ChangeLog][QtQuick][Scenegraph] The scenegraph render loop timing
logs can now show GPU-side times as well, as long as the application
is launched with the env.var. QSG_RHI_PROFILE=1 or the feature is
enabled via the new APIs in QQuickGraphicsConfiguration.

Change-Id: I42202882b418e12028d6a287c19352a8fb893365
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-04-25 16:53:00 +02:00
Edward Welbourne 0cba58b6c7 Tidy up stray braces and blank lines in XHR test-cses
Change-Id: I9155f0a78443a8bbd11dc6ddb05cbc4f21bf6c00
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-25 16:53:00 +02:00
Edward Welbourne b4e0f9efa2 Remove spurious && true from two boolean conditions in XHR test QML
The properties modified by this condition are booleans, that have been
set, so there is no need to && true them to ensure they are boolean.

Change-Id: I94f166c91549a5c212de5f694901896657cd04e0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-04-25 16:53:00 +02:00
Edward Welbourne 42955653cb Save some duplicate code in send_ignoreData.qml test-case for XHR
Change-Id: Ib6f8fedcf77e647021f3d3d7a4ca0464739c7558
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-04-25 16:53:00 +02:00