We don't know in advance if a URL is part of the source code and should
be relative to the current element, or if it is part of the application
data and should not be touched.
[ChangeLog][QtQml][Important Behavior Changes] URLs are not resolved or
intercepted anymore when assigning them to a "url" property. Instead
they are resolved and possibly intercepted when used to access an actual
resource.
Fixes: QTBUG-76879
Change-Id: Iaa2385aff2c13aa71a12e57385d9afb5dc60a073
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
...and fix up the docs.
The string-based setSceneGraphBackend() stays of course (the docs have
been enhanced, however). The GraphicsApi enum-based overload is now
renamed to setGraphicsApi().
Using the same name for both functions is a historical artifact, reflecting
the evolution (5.0 - 5.8 - 5.14). In 6.0 we can give it a more appropriate
name, since it does not have much to do with "backends" from the user's
perspective.
Change-Id: Id75dbf81f50a148797e5b5de9be4000153737473
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Also add support for doing
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Unknown). This
becomes relevant especially in tests, where we may request a specific
graphics API, but then want to switch back to the default behavior.
Change-Id: Ib09c411432fc37bd4d36ce55d54d20af3f83860a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This reverts commit 7ec30c51b287159377761338fe6d3b48706d74ee.
We don't want to half-decode directory separators on assignment. This
just introduces inconsistency down the line.
[ChangeLog][QtQml][Important Behavior Changes] Percent-encoded directory
separators in URLs are not automatically decoded on assignment to url
properties anymore. This was obviously not a good idea to begin with.
Fixes: QTBUG-81244
Change-Id: I1938abbe8aada88beff0d628397674255e8b2472
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
..and so fully compatible in behavior with properties like Image.source.
The main improvement here is that unlike with the old code, which incorrectly
handled local file URLs, one can now write fragmentShader: "myshader.frag.qsb"
which leads to picking up the file relative to the component (the .qml file),
as expected.
Existing code (that uses file: or qrc: URLs) will continue to work
as-is.
Change-Id: I89dd84b998b59ae6d5b6cb3d8a6353961ee8bb4a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Accelerated graphics is now possible without OpenGL support. With
this change, a Qt build with -no-opengl can still run Qt Quick with
a Vulkan, Metal, or Direct3D backend.
Fixes: QTBUG-84027
Change-Id: Ib63c733d28cfdf7de16b138df136fa7628e1747b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Amends a20132c326, which fixed a crash,
but also prevented the item from being culled. This is fixed by
narrowing the scope of the condition to affect only the caching related
part.
Fixes: QTBUG-84604
Pick-to: 5.15
Change-Id: I9b8a1a148d6538a18280475d89b87a4049ff3465
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
We move all the types into QtQuick itself and retain QtQuick.Window only
as alias to QtQuick. This requires support for qmldirs that consist of
only an import statement.
[ChangeLog][QtQuick][Important Behavior Changes] The contents of the
QtQuick.Window QML module have been moved into the QtQuick module.
QtQuick.Window is merely and alias for QtQuick now. An explicit import
of QtQuick will override this alias. Therefore, if you import QtQuick
with a different version than QtQuick.Window, you will get the
QtQuick.Window types of the version given in the QtQuick import now.
Task-number: QTBUG-84639
Change-Id: Ia82afab0ac2faba70cfdaf53dc8dfe4261e1113f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When Repeater used for Item creation, we have following issue:
When Repeater creates a new item and this item tries to
set keyboard.left or keyboard.right to another Repeater-created
sibling, these items haven't been created yet, and we have issue with
navigation keys.
Set rightSet to true if right really changed.
When object calls KeyboardNavigation::setRight(null),
rightSet = true, but right field did not change (null).
After that, navigation keys work incorrectly.
The same for other cases.
Task-number: QTBUG-83356
Pick-to: 5.15
Change-Id: I9ea6d6a7d13ff989aac3d9e2d22467b48080de13
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Fix up the scenegraph and qquickwindow autotests as well. (direct OpenGL
specifics are now completely removed from both, i.e. the remaning OpenGL
specific tests are now run (and not skipped) with OpenGL-on-RHI)
[ChangeLog][Qt Quick][QQuickWindow] openglContext() has been removed
from QQuickWindow. Use QSGRendererInterface to query the QOpenGLContext.
Change-Id: If5c9802b71ac5f9cffc695827e286eb2a2d03580
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
And workaround hash issue for now by using qHashMulti
Also, fix test build failure
Change-Id: Ia6b696b2531149206c73e7a5a958d7fba74a0f19
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
These persistent hints are still taken into account by the threaded
render loop, so keep them, but get rid of "OpenGL Context" from the
function names.
The qquickwindow autotest has been updated accordingly, and with a few
OpenGL-related cleanups it now runs without any warnings or skips with
OpenGL-on-RHI, while it skips only 1 case when running with some other
API, and 2 with the software backend.
[ChangeLog][Qt Quick][QQuickWindow] The setPersistentOpenGLContext() and
isPersistentOpenGLContext() functions are renamed to
setPersistentGraphics() and isPersistentGraphics().
Change-Id: Ifc4cc7c4b94fe9f7e402b39ca4f28952dcafd588
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
And remove a few superfluous "disable" entries, which are enabled in
another place.
Task-number: QTBUG-84869
Change-Id: I1d4008c5e18563a36d129cef4813f20d776ef1e6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Also add the missing cmake file for mousearea_interop
Task-number: QTBUG-84869
Change-Id: I7e48653c815aaaa3e23824783f6a0ff390c0907a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
- Don't use context properties: a singleton is better
- Use required properties to declare dependendencies
Change-Id: I10a0a301e0a397b1d4fc9edf804eea3499c79025
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
- Don't use context properties: a singleton is better
- Use required properties to declare dependendencies
- Rename to treeDelegateModelLayoutChange() to describe what it's testing
rather than just a bug number, and because it's somewhat analogous to
tst_QQuickPathView::treeModel()
Task-number: QTBUG-39492
Change-Id: I753bbdf625b8d8c82774b6a2b1754fe3c8895823
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Remove printing OpenGL stuff. Rather, print something more useful,
such as the QRhi backend that is going to be used.
Some mipmap workaround for old Mesa is removed. Even with OpenGL, we
will not be running with such old Mesa versions in practice.
Change-Id: I9f32ef4645aaa750b2c00ee30e021b2708b06493
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
It is not necessary to render selection color which is transparent.
Pick-to: 5.15
Fixes: QTBUG-83819
Change-Id: I45c086652e194192619aad025121e6064ab37a58
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This also removes QQuickUniformAnimator, which is not yet ported
to RHI (QTBUG-83976)
Task-number: QTBUG-83977
Change-Id: I3e656e6817ac991371b7f6557f050e122635d279
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The lookThroughShaderCode test function had to be removed, since
it does not make sense when the shader code may not be available.
Added testConnection() to verify that connections are made.
Fixes: QTBUG-84123
Change-Id: I33594367bea97de9ef0d54711b105a33c8a57fa8
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Includes:
- new api calls
- some new dependencies
- some TARGET_DESCRIPTION
- some additional tool directory exclusion when cross-compiling
(qmlplugindump)
- some missing add_subdirectory calls
Change-Id: Iea43e45b94f37367ffc1d8dd6ce0ff1021a31b1a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
To make the API less error prone, we have changed the
void pointer to the texture handle to a 64-bit in
instead, since all handles are maximum 64-bit.
Task-number: QTBUG-78638
Change-Id: I9d995d6a883b3377f57d7c5b19d4bc4e15aa347b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The qquickrendercontrol autotest had no CMakeLists.txt.
Change-Id: Ic5285292cf9f02b4d06b2209bae4ac75c7ba2efe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We should not call device functions after resetting them.
Change-Id: I0470792457eff070ba3aeb767f5f5be622ebda42
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
We don't need to register the Type enum for both QtQml and QtQuick.
QtQml is enough. Removing this makes the whole manual value type
registration obsolete. Furthermore, we want QEasingCurve as QML_FOREIGN
as we have several classes with properties of that type. To keep it nice
and tidy, we make the uppercase-named enum holder class a separate type.
Unfortunately, the Type enums differ in one entry:
QEasingCurve::BezierSpline is called Easing.Bezier in QML. Therefore, we
need to keep the custom enum around. We can change all users in
qtdeclarative to use the name from QEasingCurve, though.
Change-Id: Ibbc78d8bbf8938e2a8722f8c09833a0c73394c3d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
...because OpenGLInfo itself is deprecated and was replaced by
GraphicsInfo back in Qt 5.8.
Change-Id: Icfeff14cc404d9b82da07991c77fc4a7a0869883
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
It was never really necessary: the value is queriable from the
rendercontext.
Change-Id: Ibb7cf1b86a59c9dbf14476f2e798a29cabf6282f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The existing warning was pretty much useless since it would only warn
after having looped INT_MAX times. In addition, it didn't actually
detect if polish() was called from within updatePolish().
Instead, the counting is changed to be strictly more correct:
The counter is now only increased when polish() is called within the
updatePolish(). It will reset back to 1 if that does not occur.
Effectively, the counter will reflect how many consecutive polish loops
we have processed.
This patch will show diagnostics after having reached 1000 consecutive
polish loops. It will only warn for the next 5 items in order to not be
too verbose...(most likely they will be the same 5 items).
If the counter reaches 100,000, we break out of the loop:
This might be important for e.g. CI runs so that the process can actually
terminate in order to get some useful diagnostics.
Note that the item that calls polish() within updatePolish() doesn't
have to be the same item as updatePolish() was called on. We also want
to track these since there might be several items working in tandem to
create the loop.
With this change it will now give the following output:
main.qml:10:5: QML Row: possible QQuickItem::polish() loop
main.qml:10:5: QML Row: Row called polish() inside updatePolish() of Row
(This is when Row called polish() from within its own updatePolish())
Fixes: QTBUG-40220
Task-number: QTBUG-83856
Pick-to: 5.12
Pick-to: 5.15
Change-Id: Ib8a7242908082c70d8cf71efbbe1fa148dbfada0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
It works correctly in Qt 6. Previously running with the software backend
(which is exercised by the QEMU-based CI configurations) had a bug
in postJob(). A side effect of the RHI-related changes is that this is
corrected so the QEXPECT_FAIL is no longer necessary.
Change-Id: I6167856f1df6689707a1934a71bf668d0b051aec
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Blocks CI with RHI (in developer builds).
Needs a full port at some point, or it will have
to be removed.
The CMakeLists.txt is not updated because the test
in question is not present there in the first place.
(some goes for some other tests)
Change-Id: Ib16a7ee1ab307eb9e52865c2d97415a2c0bdf9e5
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
It uncovers a valid issue (that seems to affect Vulkan only, which is
pretty odd), but that test is not the right place to exercise this.
Just do like every other case in the same test does: show the window.
The non-exposed window grab issue will be handled separately.
Change-Id: Id2c1ff46251adf058dd26a30dedd30ecd27e4aa6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>