Move files out of the v8 directory and adapt some comments and member
names.
Change-Id: I36dd9eaf6f51157627327bf46442a54c79a616a5
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
We can concurrently load multiple files from different threads, but the
loader can only handle one such request at a time.
Fixes: QTBUG-95825
Pick-to: 6.2
Change-Id: I2b94d55f2cf0da6e84dabc47df5699cc57b903a6
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Before a folder needed to be made the current folder in the
OpenFolderDialog, now it is enough to select the folder in the dialog.
Fixes: QTBUG-76860
Pick-to: 6.2 6.1
Change-Id: Icc91db76c0badc3b8397a87ec7202db41999dea3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* avoid copy in Path::component(i)
* find duplicate errors via map insert (log() comparisons vs n)
Change-Id: Ib664615187fada810427665d161a0c3cabace1cf
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Using zero as a pointer value is a legacy from the times before
nullptr got standardized.
Change-Id: I57a94e16a5b735c0faad1c0f4ff60faa9f23b4ce
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The mouseGrabberPopup is supposed to be unset in handleRelease, however
when the exit transition of the mouseGrabberPopup (that closed itself on
button press) finishes before the release event is delivered, it
unparents itself from the overlay (see
QQuickPopupPrivate::finalizeExitTransition) and the overlay sets itself
invisible if there is nothing else visible in it. Because the overlay
is not visible it handles no events anymore and the release is missed
and the grabber is never unset. When opening another non-modal popup
the overlay then will continue forwarding the events to now invisible
popup.
So when the overlay loses the currently grabbing popup as a child we need
to reset mouseGrabberPopup.
Fixes: QTBUG-95259
Pick-to: 6.2 6.1
Change-Id: I3c832d47f3cee216b81ef1b5cb7dd77bf4149991
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This issue is reproducable both in Qt 5 and 6. When calling grabWindow()
"early enough", such as from an Component.onCompleted handler, the
window is not ready for rendering (as it has not yet been exposed, there
is no scenegraph initialized, etc.). Checking the visible property is
not safe here, because it may well be true right from the start during
the window object's life, while telling nothing about the actual
low-level state. This becomes fatal in particular when one relies on
setting Window.visible to true from QML, instead of calling show() from
C++, because then the isVisible() check is clearly wrong (already true,
while the window is nowhere near to be ready for rendering) and leads to
hitting the wrong branch in the main condition of grabWindow().
It is probably safe to assume that the isVisible() check in grabWindow()
was never actually correct, and perhaps was an oversight. What it wants
to test for is being exposed (i.e. ready to render, with the scenegraph
and related machinery up and running), but it rather just tests the
visible property of the QWindow. It's just that in the majority of uses
that happens not to cause any problems in practice, either because
grabWindow() is only called once the window is up and running, or
because toggling visible is deferred to show() from C++ which masks the
underlying issue in the logic.
Switch over to isRenderable() which is a helper function based on the
exposed state.
Add an autotest case as well.
Pick-to: 6.2
Fixes: QTBUG-95393
Change-Id: Ia0193229f6b3980ff6bd51d85db1408017c43b38
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
It's content was incorporated into CMakeLists configuration, so it no
longer makes sense to keep dead file around.
Change-Id: Id85ce8d14c8862a59af1475e67666a3debc660e7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Qt 5's CustomCompileStep has limited use in Qt 6: as there are no
virtual compile() type of functions to override in the API anymore,
its only effect now is disabling batching for nodes using materials
that have the flag set.
Coincidentally it turns out that some views in Creator's QML Profiler
rely on some quite advanced manual alteration of gl_Position.z in the
materials' vertex shader.
This is pretty bad if batching is involved, although in Qt 5 they
could get away by setting the internal undocumented qt_zRange
uniform to a magic value (1.0) to alter the behavior of the final
gl_Position override statement inserted by the shader rewriter
to batched materials' vertex shaders.
In Qt 6 this approach is not available, so the Profiler's rendering
becomes incorrect due to the vertex shader's own gl_Position.z
alterations being lost when batching is active. Instead, Creator 5
(that uses Qt 6) will set CustomCompileStep on its QSGMaterial
subclasses where relevant in order to never batch nodes with
these materials.
All in all this implies that there is a need for a better-named flag.
Therefore, add a NoBatching flag in place of CustomCompileStep, while
still keeping the latter as an alias until Qt 7.
Change-Id: Ib806fbfa55132fdd02765adece366f0175129ae8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
- Added full stop at end of \brief statement
Pick-to: 6.1 6.2
Change-Id: Ifb00c0a489cb5839c40dfa8e5bdf0bb4c4381cbb
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
An error was reported for static builds:
[...]libQt6QuickDialogs2QuickImpl.a(mocs_compilation.cpp.o):(.data.rel.ro.local._ZN27QQuickFileNameFilterForeign16staticMetaObjectE+0x0): multiple definition of `QQuickFileNameFilterForeign::staticMetaObject'; [...]libQt6QuickDialogs2.a(mocs_compilation.cpp.o):(.data.rel.ro.local._ZN27QQuickFileNameFilterForeign16staticMetaObjectE+0x0): first defined here
This patch attempts to fix it by giving each foreign struct a different
name.
Pick-to: 6.2
Change-Id: I1b859ad1ec7b0ce82b40a1fa5a74ceb219841bf3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Add a SelectionRectangle to the macOS style. Since native macOS
apps doesn't use selection handles, we just add some small
subtle triangles on the inside of the selection.
Note: If the developer want the handles to be completely hidden,
he can set the handle delegates to null.
Pick-to: 6.2
Change-Id: I1d1733ae5b4a3192e3c52b9ddb7d3d0df976670a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Add a SelectionRectangle to the Windows style. Since native windows
apps doesn't use selection handles, we just add some small
subtle triangles on the inside of the selection.
Note: If the developer want the handles to be completely hidden,
he can set the handle delegates to null.
Pick-to: 6.2
Change-Id: Id2a98127803c7feb341480e97c7dcb8ef8d75f81
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
So that you don't have to click on a different tab each time you open
it.
Pick-to: 6.2
Change-Id: I6bb289539e08af368ffd77df132212405c03941a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
When both handles overlap, only the handle with
the higher Z value should be hovered.
Pick-to: 6.2 6.1 5.15
Fixes: QTBUG-94558
Done-with: Mitch Curtis <mitch.curtis@qt.io>
Change-Id: I6565e199ea77f3fae7a0d2dc84b36fa244bc7260
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
We now propagate the static qml plugin init libraries via the plugin's
target usage requirements, rather than at qt_import_qml_plugins time.
This ensures a nicer user experience for projects that don't want to
use qt_import_qml_plugins, but instead want to link to the qml plugin
targets directly, to ensure reconfigure times are not dominated by
qmlimportscanner.
With the current change, projects don't need an extra
target_link_libraries call for each qml plugin linked.
Amends 1a78a6df1d
Pick-to: 6.2
Task-number: QTBUG-95609
Task-number: QTBUG-92933
Change-Id: I6f5a25374f1909a85360262f9609e6d9e93f5454
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
It was added by the qtquickcontrols2 merge and was out-dated. To ease
maintenance while still providing some benefit to users, let's just
link to the Qt documentation for all modules.
Fixes: QTBUG-95414
Pick-to: 6.2
Change-Id: I4e2a75158c2c813c1689f628974d544278ab4e75
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Let Button.qml inherit from DefaultButton.qml, since they share
a lot of the same code. This then means we can remove a lot of
the duplicated code. We will also get any bug fixes done to
DefaultButton.qml for free, like ensuring that you can use
Button together with custom background delegates.
Pick-to: 6.2 6.1
Fixes: QTBUG-95544
Change-Id: Ie5edae58a44ae6e7b86cc016a07439844e387b1e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
As it stood, the implicit size of a button would be empty
if assigning it a custom background with an implicit size.
This differs from the other styles.
This patch will follow the same logic as in e.g the Fusion
style, and use the maximum size of the background
and the content item as the buttons implicit size.
Pick-to: 6.2 6.1
Task-number: QTBUG-95544
Change-Id: Ifaac9bea5814b2c7819906460019a85e951a063e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Now qmllint also imports qmldirs when importing directories (also applies to implicit importing of the current directory).
This matches the behavior of qml itself now.
Pick-to: 6.2
Fixes: QTBUG-95656
Change-Id: I58c3b8c13c1d06e3d146c9de298a3e02d8dffa28
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This is an internal class that makes no sense without QQuickPalette, which
is also an internal class (and already documented as such).
Pick-to: 6.1 6.2
Fixes: QTBUG-95591
Change-Id: I878d9bf9794530dfe57ba77db86c7ff9a9a02bd3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Add a SelectionRectangle to the imagine style. The style
will then draw selection handles that looks the same as
a slider handle.
Pick-to: 6.2
Change-Id: I20e23d01aee39d3cf05b313c95741fb274a1935f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Add a SelectionRectangle to the universal style. The style
will then draw selection handles that looks the same as
a slider handle.
Pick-to: 6.2
Change-Id: I87187c5053501c41066bd131c78ed53c92d5d24e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Add a SelectionRectangle to the material style. The style
will then draw selection handles that looks the same as
a slider handle.
Pick-to: 6.2
Change-Id: Ic83671b3a1238f51e0bb4a81cb1d2d75aa57cb2b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Currently, in order to render a QtQuick scene in a HiDPI offscreen
texture without a render window, one need to fight Qt, for example by
returning a dummy window in QQuickRenderControl::renderWindowFor().
This change adds a device pixel ratio property to QQuickRenderTarget,
which can be used by the QQuickWindow to calculate the logical size of
the offscreen texture.
The main motivation behind this change is to allow KWin to render some
internal QtQuick scenes at HiDPI. Since kwin is the compositor, it does
not have any windows that can be returned from the renderWindowFor()
function.
Change-Id: Iefa7046385e750e15ca0e53b398b51a8e0aabad2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
We want one instance of the function's static variable, so the function
must not be static itself.
This still can lead to having multiple copies in the case where multiple
shared libraries are used. But this is a) not the case currently and b)
having one copy pare library is not problematic: The variable is
stateless, and only static to ease lifetime management of the pointer.
Change-Id: Iad3ea1ec74125446d926bc6a462866aeae936811
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Instead of std::exit() use the early return mechanism we already have so
that any existing objects are gracefully destroyed.
Change-Id: Icb197879cc33ab22f07fc1486da44f9ff5b177bc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Don't start a new selection if the user does a press'n'hold on top
of a handle. We should allow this if the press is done on top
of the TableView. Otherwise the user will typically do a press'n'hold
on top of handle while preparing to drag it somewhere, only
to instead clear the current selection.
This patch will check the position of the press'n'hold before
starting a new selection.
Pick-to: 6.2
Fixes: QTBUG-95629
Change-Id: Ic8711250075c85ee564ae115c60cff629710b570
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Since our wasm implementation doesn't have access to time-zone data by
default, but its QDateTime implementation does manage to get offsets
right for local time, use it as fall-back for V4's Date
implementation's DaylightSavingTA() and getLocalTZA().
This implementation might also be viable for other cases without
timezone support (and a way to reset it when the system zone has
changed), but we'll need to experiment to find out. For now, since we
have nothing better for wasm, use it there.
In passing, update a comment about a bug report against the ECMA spec
to say it's been fixed (and we're compatible with the result).
Fixes: QTBUG-95314
Pick-to: 6.2 5.15
Change-Id: I40c1537815ada950dc0b5cebd4d641f7bfc45bd9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This reverts commit 6b8a967311.
The follow-up commit a063cd0be5
causes QTBUG-94764, so we don't need this enabling change for now.
Task-number: QTBUG-83630
Task-number: QTBUG-94764
Pick-to: 5.15 6.1 6.2
Change-Id: I1aec8571dcdcc2103d0e56c3d0bbfc4a4872d8db
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
In QtQuick3D, quaternion is the canonical form of rotation. This provides
a way to compose arbitrary transform matrix by using Node.rotation value.
Change-Id: I63bf1350875e8ea6f53a1451a7f602d73c673d31
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
If a QQmlProperyBinding tries to capture a QProperty, there is nothing
to do as the dependency tracking happens in C++ anyway. Thus we can
avoid calling captureProperty.
Pick-to: 6.2
Change-Id: I96b2876d4b2ba10b00af8342be9beae660a95ef3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This mirrors the approach done for QQmlBinding, except that instance of
virtual functions we use function pointers. This allows for more
efficient code than the runtime metatype switching, at the expense of
slightly more generated code.
The refactoring coincidentally also fixes compilation with clang-cl.
Pick-to: 6.2
Fixes: QTBUG-95575
Change-Id: I9ced2c37a1a2523a2864394a0dbe762ebacbb8ce
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QQmlIRBuilder skips storing binding scripts as a string to save memory.
However, for QQmlScriptString, we need the string to be available. This
is solved by running QQmlScriptStringScanner in the type compiler at
runtime, which sets the correct stringIndex for script string bindings.
However, that one does not run when we already have a compilation unit
from cachegen (and if we would run it unconditionally, we still would
miss the source code to recover the string).
We work around this issue by noting that QQmlScriptString only cares
about a very limited set of strings: Namely the various literals and
undefined. The literals are already correctly handled, as IRBuilder has
specific optimizations for them anyway. We now check in the generic case
whether the bindings string equals "undefined", and if so, ensure that
the string is registered.
Fixes: QTBUG-91165
Pick-to: 6.2
Change-Id: I4c4696952a082d1e69e0c9e5a0b9bf2470d59187
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>