The non-native filedialog was missing a text input field that would
allow the user to easily set the filename in a filedialog with fileMode
set to SaveFile.
Pick-to: 6.4
Fixes: QTBUG-101502
Change-Id: Id800a1e34de0e65455409a7edc5fa2f5f13b4b19
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
908aa77d16 hid old scroll bars, but
didn't account for the situation where the old scroll bars would be put
back into place, and so they never showed up.
In the case of the linked bug report, since there was a binding to the
ScrollView's contentItem, a default Flickable would be created. After
that binding was evaluated, the contentItem was set, causing the scroll
bars to be hidden (as part of the process of disconnecting from the old
flickable). To fix the issue, we now do the reverse of hideOldItem when
a new contentItem is set.
Fixes: QTBUG-104983
Pick-to: 6.2 6.3 6.4
Change-Id: I910259cc3e8f6a6231ae6c87c7d4f0f652bd0545
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Nate Graham
Stuff cannot just magically move under a different prefix
when shaders are referenced with relative paths.
As the example uses the common main helper code, it is
easier to switch to absolute paths than to use
NO_RESOURCE_TARGET_PATH.
Amends d270c51f81
Change-Id: I527314725210e02675dc8c2f5fc5042dc5e1c478
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Adds a docuemnt outlining some of the details of how the plugin system
works.
Change-Id: I9b6d6987bf0fcdf9b12791bed93d4142b59f267d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We should use the enums from QLocale instead of just recreating them in
QQmlLocale.
Change-Id: Ieb2985f93f3da36781e5c6bb4b582e3abb166d81
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
flushFrameSynchronousEvents() is only called on the window's DA, so a
touch event stored in QQuickDeliveryAgentPrivate::delayedTouch in a
subscene DA would be lost, unless we make the flush recursive.
However, a grabbed touchpoint remembers its DA; when that's a subscene
agent, subsequent touch moves are delivered directly via the subscene
DA, and touch event compression does not occur at all. This may
pessimize performance if touch events occur many times more often than
frame rendering, but it's not expected to matter a lot on 3D-capable
hardware.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-105566
Change-Id: I9102b20806f9577fba0f741f7589ee5b1642e5a5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
To add translation bindings to qmltc, the methods used to create
translation bindings need to be adapted to work without
QV4::CompiledData::Binding as it is not available from qmltc. Instead,
information already available from the QQmlJSScope should be used, along
with a newly introduced helper class QQmlTranslation.
Details:
Add a QQmlTranslation class that represents a call to qsTr, qsTrId etc
that knows how to translate itself (without needing any
ExecutableCompilationUnit or Binding). It encapsulates the
information needed to create a translation binding.
ExecutableCompilationUnit::bindingValueAsString refactored
so its functionality can be used without Binding.
Instead, it uses only the translationId, see
ExecutableCompilationUnit::translateFromId
and
ExecutableCompilationUnit::translateFrom.
Refactored QQmlTranslationBinding to work with QQmlTranslation instead
of CompiledData::Binding.
Same for QQmlCppBinding::createTranslationBindingForBindable,
QQmlTranslationPropertyBinding::create and
QQmlCppBinding::createTranslationBindingForNonBindable.
Changed TranslationBindingInformation to work without
CompiledData::Binding, and also removed static unused
QString ProxyTranslator::originStringFromInformation(
const TranslationBindingInformation &translationBindingInformation)
as I could not find out what this origin string is.
Same for the translation debugging in qmldb_preview.
Added QmltcCodeGenerator::generate_createTranslationBindingOnProperty.
Added #if to avoid compilation error for standalone DOM compilation due
to the new QQmlTranslation class.
Task-number: QTBUG-105345
Change-Id: Iccd94d5cba4eaf63901233451fec48051c855c2a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
All the Qt Quick types in src/quick/util are exported
except this one, so export it as well. It may also be
used by external users when implementing something in
pure C++ instead of QML.
Pick-to: 6.4
Change-Id: If224608127e5fdc2c834b294f200b7a72fae6f96
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
StdinReader::run() (qmllanguageservertool.cpp) just uses readSome,
which might read just a single character (and on several platforms
that is what it does), and then sends it via signal to another thread.
This is rather expensive, we should read larger chunks to be more
efficient, but we should never wait for more data if a full message
was already read (to avoid deadlocks). This commit uses
QHttpMessageStreamParser in dry mode to know when to send the data
via the signal, that is, when a message has been entirely read.
Change-Id: Iee795ded0a539413ec15c686a416f2ccf6673ec9
Task-number: QTBUG-104553
Fixes: QTBUG-104150
Pick-to: 6.4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
If this function is called and the resulting event says that
event->pointingDevice() is a mouse, something went wrong somewhere.
We require that the recipient of the event can find out that it came
from a touchscreen, if that's where it really came from; and this
function should never be called with an event that comes from a mouse.
Change-Id: I993fa5a491e58f63a90b2df6f0885f7fcf8cb8ec
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Import as resolution (i.e. finding a type that was imported with an import as)
was broken in two ways: the shortcut looking for types did look only to types
imported without as, and the normal lookup for symbols declared the ImportScope
as visited (to avoid loops) too early in one case and would skip it.
This was visible in qmlls completions of Controls.
Pick-to: 6.4
Change-Id: Ifc1e777973ddc251bd0685290e8d28bfb025f269
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This test fails the dependency update on macos x86_64 platforms
but is just checking if/when a qFatal error is thrown. Therefore, it
is blacklisted.
Change-Id: Ie08c24e0b00aedbcf40b5b51191a0e4a6180a1dd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The QStringView overload of match will be deprecated in Qt 6.8.
As a drive-by, replace a match(view.toString()) with a a matchView; the
view lives long enough, so no reason to convert to QString.
Also use capturedView instead of captured when working with
string-views, and hoist one regex construction out of a loop.
As the QML DOM has to build with older Qt versions, condition the use of
matchView on Qt being >= 6.4
Fixes: QTBUG-105360
Change-Id: If248d135fd381c6368d446376798a52dec220b40
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
There are two main problems with the existing table:
* The user has to scroll horizontally to view all the content in the
right column.
* It is difficult to link to the individual entries.
Splitting the column into subsections solves these issues. In addition,
add a list of all the commands in the qmldir file to get a quick
overview of the subsections that follow.
Also, make small grammatical fixes to the text.
Fixes: QTBUG-105239
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ic33caedf317ae1d33ecc606cffc5d664490e242c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Users need code they can copy, and qt_add_qml_module lacks examples of
e.g. main.cpp and its position within the recommended directory
structure.
Pick-to: 6.2 6.3 6.4
Change-Id: I29212b603bfd9cf24ecb327317be8f1410b2cfda
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
- Avoid mixed type bitfields: There are compilers which generally
support bitfields, but will not combine members if the type is
different. Requires explicitly casting bitfield members to bool in a
few places to avoid ambiguous overloads.
- Move all containment mask members into extraData: extraData will be
allocated anyway to store the contains meta-method, so we might as
well move the mask pointer there.
- Do not store quickMask separately; instead, cast mask to QQuickItem on
demand. qobject_cast<QQuickItem *> is fast, as it only has to check a
single flag.
- Do not store a QMetaMethod for the mask's contains method. Instead
store only the index, and retrieve the metaObject on demand.
Change-Id: Ib2120c3b01ea037eb17c6c903a2977c38cd6c40c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Before 6.4, it was only possible to make a selection in
TableView by using a SelectionRectangle. But in 6.4, you
can also make a selection directly in TableView by using
the shift+arrow keys. To make sure that a selection is
cleared either way on tap, move the implementation that
clears the selection from SelectionRectangle to TableView.
Pick-to: 6.4
Change-Id: Ic718763bf9b643cb3e3c04cc3b90c6ffcf9ca4b2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Previously we didn't set this flag properly if there were multiple modules
that were imported.
Change-Id: I05d81bc82f69e038a82131e20c23fb9dd497e9cc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
If the user used for(let x;...) we need to preserve the let and must not
change it to var.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-105361
Change-Id: I49fc3797505b569cc9b8a9138dd57ec7e70d3eb9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
For one, the Qt 5 autotest remained entirely disabled (with individual
cases all skipped) in Qt 6. Two, most of it is meaningless in Qt 6,
the state changes and the associated flags which are mostly ignored by
the renderer due to the QRhi-based architecture.
Replace the whole test. Start small, and have a test case that renders
using QRhi while exercising the modern QSGRenderNode features, such as
taking the projectionMatrix() into account and specifying
DepthAwareRendering, accessing the QRhiRenderTarget/QRhiCommandBuffer,
etc. This ensures that the basic functionality is not completely broken,
which is important for Qt Quick 3D for example.
For now have just one additional test, a very basic OpenGL one, to make
sure there is an OpenGL context current.
Fixes: QTBUG-105468
Change-Id: I05f4651e2d6b4b0760929aecdd32841ca69fa55c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Otherwise configuration fails due to not finding moc for AUTOMOC due to
the tests using non-internal target creation APIs.
Change-Id: I7df3d395bd253f5bc943fab8218aa9611ad8a02a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The previous logic attempts to create the texture anyway and will handle
it gracefuly if the texture creation fails, but trying to create an
unsupported texture on Metal causes a validation failure, so now the
code should bail out earily and print a warning instead for the Metal
backend.
Pick-to: 6.4
Change-Id: I9cd8a4c4b15107f4a819cb108b578db9a7a4e643
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Turns out that implementing "proper" QSGRenderNode subclasses is
not quite straightforward in Qt 6. If a rendernode wants to
query the projection and modelview matrices, and store something
calculated based on them somewhere (e.g. push to a uniform buffer),
this is not actually possible to do in prepare(), only in render(),
and that is is no good when working with QRhi or some modern API.
For rendernodes that do not query the scenegraph's projectionMatrix
this is not a problem but for those that want it, there needs to be a
way to access it outside of the RenderState interface, because a
RenderState is only passed to render(), not to prepare().
[ChangeLog][QtQuick] Added a projectionMatrix() accessor to
QSGRenderNode. This way a reimplemented prepare() can query both
matrices and can load the final modelview-projection matrix into a
uniform buffer for example. Previously this was only possible in
render() because the projection matrix was only exposed in the
RenderState. With QRhi, or modern APIs such as Vulkan, that is not
quite sufficient since it is more than likely that one will want to
calculate and store the matrix in prepare(), not in render().
Change-Id: Ic6ff734962381ee7b199329bf2a37b218c09dc2c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
For objects with circular structures we generate a proper error message
and fail earlier. For objects with excessive recursion we throw a range
error rather than crashing.
This behavior is modeled after node's behavior in such circumstances.
We use the existing stack overflow detection to determine when to throw
the range error. Testing shows that on windows the limit was
insufficient. Lower it.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-92192
Change-Id: I25dd302f65f359111e42492df3c71549c4ed7157
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
When we specify an override state from QML, like NeverHovered, we
also don't want the scrollbar to be drawn as pressed (sunken).
The point with the override state is to lock the image to a
certain state that doesn't change.
This will fix a drawing issue on macOS, where the scrollbar
becomes far too dark when you drag on it.
Pick-to: 6.4
Change-Id: I7f62e7ebd6d1ebbe808e035f63485ed292661bc1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
test that warnings are emitted for duplicate exports. Also, added
missing dependency in CMake for tst_qmltyperegistrar.
Fixes: QTBUG-103189
Change-Id: I7e26cd0de2f9a404c7c02822baef6eafa4f51c11
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
- Add Affinity Designer.
- Use full product names, otherwise Affinity Designer would just be
"Designer" if we were to be consistent with the existing section
headers.
- Sort sections alphabetically after these changes.
Task-number: QTBUG-105337
Pick-to: 6.2 6.3 6.4
Change-Id: I2441966eaa41cf2cec5b024b2611ada09a0721c2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
So that users can easily use them as a starting point for their own
assets.
Task-number: QTBUG-105337
Pick-to: 6.2 6.3 6.4
Change-Id: Ib2b4b2f38f32f55808c8b7e9d95dce91ae7b6d00
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Replace the use of FILE* in qqmltyperegistrar to QTextStream to make
qqmltyperegistrar more easy to use, as getting a FILE* to a temporary
file on any qt supported platform seems to be really complicated.
Uses QString for all QTextStream related operations as it formats
char16_t* as pointer addresses.
Change-Id: I2d1c71b22076d3083207b8d6fe20c7bb8a0c14ee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Just create a dummy type that has the actual name. To make that
possible, export the property cache creator's class counter to the
autotests – otherwise, we cannot know the name of the actual type, as it
would depend on the order in which the tests run.
Change-Id: I36b24183fbd041179f2ffffd17026b224c9737fa
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
With the helper struct (QSGRenderTarget) in place these are neither
needed nor help following the code. We can now also drop the
compatibility ctor from the struct.
Change-Id: I3f18630ed670788bf24e0d41ae788a0ad4ea1db5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
A QSGRenderNode in a subscene that is under a layer.enabled: true Item
is rendered to a texture, i.e. a render target different from the main
(the window/swapchain) one. It also involves using different a different
renderpass object. QSGRendererInterface allows to query window-level
stuff, so e.g. the main render target, but that is not useful here. The
QSGRenderNode subclass needs a way to access these things.
Start with just another private member var., this enables Quick 3D to
implement its Inline render mode correctly. This can be turned into an
API on QSGRenderNode later.
Pick-to: 6.4
Task-number: QTBUG-105354
Change-Id: Iba97ded98b08a23b671f3729d8bab35fad1fd0e8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
It talks about connecting to beforeRendering, but that approach predates
6.0 where in the end QSGRenderNode got another overrideable function,
prepare(). Mention both.
Pick-to: 6.4 6.3 6.2
Change-Id: I9e6fba6df38569917da3b3d318f9eb1894cceb9a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
qmlls is a user facing tool. People are supposed to set up the editors
to call it. For that, they should see it.
Amends commit 399cdef52b.
Pick-to: 6.3 6.4
Change-Id: I495e830171636e187ce3fe592ff4b60959ce701c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This fixes an oversight where in case of half-resolved grouped
properties we would forget to add the bindings to the "pending" list.
In addition we would fail to resolve their property caches later on.
Pick-to: 5.15 6.2 6.3 6.4
Fixes: QTBUG-94983
Change-Id: I88bd0ce56464438d2a105e5ed426e002495cc016
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When the image mipmap property changes and component has been created,
reload the pixmap.
Pick-to: 6.4
Task-number: QTBUG-105277
Change-Id: I54113f3f3120dd79acf7ef67622cbc0444940c4d
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Amends 1df2cf6bad
Clearly the intention is to continue using RGBA8 as the default when
nothing is specified, but then the unknown/invalid value is not handled
correctly in the conversion functions.
As a result, when running f.ex. tst_qquickrendercontrol one gets
warnings such as "VkFormat 0 is not supported". This is now avoided.
Pick-to: 6.4
Change-Id: I0dd2cda3fefe24a1bdac075892df5a6eb8796181
Reviewed-by: Andy Nichols <andy.nichols@qt.io>