Skip to content

Conversation

rjcamatos
Copy link

If there are 2 or more methods with the same name but reciving diferent arguments the QJSEngine Pickup the First One declared.

Example:
methodxyz(string)
methodxyz(objptr*)

It picks up the first one passing as argument a string and not the one that i was expecting an object as it was send.

Copy link

cla-assistant bot commented Nov 15, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 13 committers have signed the CLA.

❌ Kaj Grönholm
❌ ec1oud
❌ sapiippo
❌ torarnv
❌ Issam-b
❌ samishalayel
❌ Morten242
❌ alcroito
❌ Inkane
❌ seyainc
❌ paulolav
❌ eskilblomfeldt
❌ iCristalrope


Kaj Grönholm seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

samishalayel and others added 25 commits September 10, 2025 11:56
Populate the QML file after loading it, to avoid crashes later on.

UpdateItemInSnapshot would write the DomItem of the qml file inside the
snapshot, and then populate the lazy parts of the qml file while
checking whether the file should be added to the valid snapshot too.

This leaves the snapshot in an invalid state where the main
thread responding to requests might access and use the
only-partially-populated snapshot and crash, for example in the case of
the document symbols that expect the Qml file to not be empty.

Therefore, make sure that the qml file is populated by the qml file
loading thread before writing it inside the snapshot.

Note that addFileWatches() populates the file, so the crashes only
happened when the CMake feature is disabled. Add a test to make sure
that we don't load unpopulated files when the CMake feature is disabled.

Task-number: QTBUG-119163
Change-Id: I6e73420f750e873898b7b426fe333edaf4d6a7c0
Reviewed-by: Ulf Hermann <[email protected]>
Set the build folders possed via -b on all codemodels in
QQmlCodeModelManager.
Modify the buildPathsForUrl test to make sure that the build path
passed to -b is passed to the correct workspace codemodel.

Task-number: QTBUG-119163
Change-Id: I5696c481eb15ea111cced55718af598e3f23112a
Reviewed-by: Ulf Hermann <[email protected]>
Move the code that reads the QMLLS_BUILD_DIR environment variable to
qmllsMain, where the other environment variables like
QMLLS_NO_CMAKE_CALLS are read.

Modify a test in tst_qmlls_qqmlcodemodel that tests whether variables
from the environment variables are used in qmlls to not test environment
variables anymore, as the functionality was moved from qqmlcodemodel to
qmllsMain. We already have tests for reading build folders from environment
variables in tst_qmlls_cli, so no need to add new tests.

Change-Id: I5deb1e4dcd67fecb68bbbadfeb3e803fc33cece9
Reviewed-by: Ulf Hermann <[email protected]>
This patch
- fixes small syntax error
- adds the link to Qt Academy course
- add alternative way to initialize layout parameters

Task-number: QTBUG-139320
Pick-to: 6.10 6.10.0 6.9 6.8
Change-Id: I981f097474fdbc410df30076098b71f08c070a1f
Reviewed-by: Assam Boudjelthia <[email protected]>
- calculateJoin() is too big to continue as an internal lambda, and
  changes to customTriangulator2 (the only user) are coming later;
  so move it out to a top-level static function
- use const
- capture simple constants in the tooLong lambda
- explicit captures in remaining lambdas
- replace some single-letter variables with more meaningful ones
- turn some plain comments into internal function docs
- a couple of spelling and grammar corrections
- init TriangleData::pathElementIndex=INT_MIN by default,
  to be able to distinguish default-constructed instances.
  Of course they are usually >= 0, but customTriangulator2() uses
  small negative indices as special triangle-type indicators.

Change-Id: I7b70a02ac56522ee0c6aff26be80ac4e3e546bbd
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Lancelot at some point complained about AA changes in (among others) the
designhelpers_rectangleshape.qml baseline.  By having a closer look, it
became clear that the issue was actually overlapping triangles on arc
triangulation. It's not the only case where those occur, but it seems
like a good test case to have, because rounded rectangles are so common.

This is not the complete set of shapes from
designhelpers/designhelpers_rectangleshape.qml :
just a few that were flagged in Lancelot, plus a ControlledShape
that reproduces a similar shape and is adjustable in the usual ways.

Change-Id: Ic87f51e284157ca37b0e693e057a5ff9bdba3dcf
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
When rendering to a layered item, the actual device pixel ratio
is determined by the ratio between the width of the texture and
the width of the logical rect.

For most use cases, using the window's device pixel ratio would
be correct, since the texture size is automatically calculated
based on this. But in the cases where a manual texture size is
set it would be incorrect and this would cause artifacts in
the antialiasing for text and shapes.

This also adds the correct scale factor to shapes, since this
was even missing the device pixel ratio factor.

Fixes: QTBUG-139997
Change-Id: Ibf1392f546f5cbcedd062852cbd87c0c0c097460
Reviewed-by: Laszlo Agocs <[email protected]>
Pick-to: 6.10.0 6.10
Change-Id: I5f00ae24c3d170e5271d15e29ea4982b197171ad
Reviewed-by: Eirik Aavitsland <[email protected]>
Amends commit 1b89c1e

Fixes: QTBUG-139764
Pick-to: 6.10 6.9 6.8
Change-Id: I1488527a235d74fc0352c72b9bfb69589c2f3d93
Reviewed-by: Sami Shalayel <[email protected]>
The components used by QQmlSortFilterProxyModel (such as
QQmlSorterCompositor) require access to the
QQmlSortFilterProxyModelPrivate members, which are not possible as
of now, and thus it would be better to keep it separate and,
include it wherever required.

Pick-to: 6.10
Change-Id: I4159a0ef988dc0a67dfb2ed8443137fa91e5a5d9
Reviewed-by: Mitch Curtis <[email protected]>
The dynamic metaobject of QQmlDelegateModelAttached likes to override
them, which produces warnings.

Amends commit 9355b71.

Pick-to: 6.10 6.9 6.8
Change-Id: Iaf0d6627fe6c373177f7f28a750fa2baf5fa2a7e
Reviewed-by: Sami Shalayel <[email protected]>
It's called just "model" in other views.

Change-Id: I50ae0456d52b8751a4fb5f1fe3a18ba339ef2fd4
Reviewed-by: Sami Shalayel <[email protected]>
It's only valid in the MetaTypesStackFrame and we should use its
accessor.

Amends commit 2d016a2.

Change-Id: I6900fc01a0af2acf29324e54c0206c84f032c22d
Reviewed-by: Sami Shalayel <[email protected]>
ScopedStackFrame has no locals and we don't want to crash if we manage
to run the GC while e.g. initializing a component.

Amends commmit 2d016a2

Fixes: QTBUG-140057
Pick-to: 6.10.0 6.10 6.9 6.8
Change-Id: I7aeb39d6cb1f0ca0a661b8cfa2e7c159f968e224
Reviewed-by: Sami Shalayel <[email protected]>
Amends 9601b74

The example no longer runs with Qt 6.9 or older as it uses the new
(Horizontal|Vertical)HeaderViewDelegate types.

Change-Id: I8430f4e9a48ddc9f72b20a4e998fde21480c4032
Pick-to: 6.10.0 6.10
Reviewed-by: Mitch Curtis <[email protected]>
Use modern string literals and replace #if-defery by a check on
QOperatingSystemVersion::currentType().

Pick-to: 6.10 6.9
Change-Id: I319b6c7665a4c4cadd7d1e711d8527f79ca35261
Reviewed-by: Mitch Curtis <[email protected]>
The Qt SVG parser depends on having a QGuiApplication in order
to load e.g. fonts. We want to prefer the default plugin on
desktop platforms, since you will then be able to use SVGs that
depend on system fonts as well.

However, in a host build, where there are no GUI-enabled QPA
plugins, we fall back to offscreen, which has some font
support but which does not depend on a window manager.

Task-number: QTBUG-139976
Change-Id: Ia9a5239c3d16f1daa4ad68d66412f519109361c2
Reviewed-by: Eirik Aavitsland <[email protected]>
As part of the comment generated by svgtoqml, we would include the
entire file path as it was provided in the arguments. With the
introduction of the automatic svgtoqml build step, this argument
will now include the full absolute path.

Since the QML file is embedded in the binary, this caused internal
file paths from our build farm to leak into the binaries, triggering
an alert in the QA system.

Change-Id: Iecffb5cfcf1cee127186b2c5d2e21e2ccc47f48a
Reviewed-by: Samuli Piippo <[email protected]>
QT_NAMESPACE is a public API to access the namespace from the Qt::Core
target, replacing the private _qt_namespace property

Pick-to: 6.10
Change-Id: I013be62bbe9068e0a9eb77ea2ffb40ac2f2f1b2e
Reviewed-by: Alexandru Croitor <[email protected]>
Also ifndef QT_NO_DEBUG_STREAM around the QQuadPath debug op.
Both will be omitted from the build if QT_NO_DEBUG_STREAM is set.

Change-Id: Ie86577ba61fc4f2b118d7e0a2b1ab702b318a473
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
The section item has not been removed or added to the section cache
in all cases when the corresponding delegate item has been moved out
of the visible area, either during flick or scroll. This happens in
a case where the delegate item has been requested to be removed (as
it goes out of the visible area) from the list view, but it's not
released from the delegate model due to its caching mechanism. When
an item is outside the visible area, releaseItem() is triggered,
intended to free the item and its sections. The problem arises when
releaseItem() calls QQmlInstanceModel::release(), which caches the
item in the delegate model, but does not free the section. This
prevents the section item from being released properly.

This patch releases the section item whenever removeItem is
triggered from the list view, which happens when the delegate item
is moved out of the visible area.

Fixes: QTBUG-137172
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ib7e78309e076e76750b03f3238a7501563a3962a
Reviewed-by: Oliver Eftevaag <[email protected]>
Without this we effectively soft-leak the contents of any
SimpleArrayData whenever we truncate it. Only when the array was either
completely dropped or re-filled would the extra objects be reclaimed.

Task-number: QTBUG-139025
Pick-to: 6.10 6.9 6.8
Change-Id: I88e9dc3ea8ec57c1de71b7b5417ebcfbaa75bb61
Reviewed-by: Fabian Kosmale <[email protected]>
When writing through a delegate, the original data is already written.
We are only missing change signals.

Pick-to: 6.10
Task-number: QTBUG-139941
Change-Id: I3124a8dc5852e3858a1e9bd9b74c07608bb5e446
Reviewed-by: Fabian Kosmale <[email protected]>
Instantiator is almost entirely useless without QQmlDelegateModel. The
only thing you can do is give it a list of pre-constructed objects which
it then reflects in its own "objects" property. I don't see a reasonable
use case for such a thing.

[ChangeLog][QtQml] If you build with -no-feature-qml-delegate-model,
along with most functionality of QtQml.Models, Instantiator will also
be missing now. It makes no sense to provide an Instantiator that can't
actually instantiate anything.

Change-Id: If0c31346c43ebea21abf1aef53dc3a76f96f6fbd
Reviewed-by: Fabian Kosmale <[email protected]>
Use the common pattern for setModel() and use
QQmlDelegateModel::createForView(). In turn, remove the hacky
effectiveReset mechanism. Also remove the "initial 0" optimization.
There's barely a point to this since the default model is 1. You had to
go out of your way to trigger it.

Change-Id: I80030ef36b82b312e6b7600616eebf2615a2f3d8
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
Ulf Hermann and others added 30 commits October 13, 2025 10:18
We use the same method in QQmlPropertyValidators. It's more efficient
and it works even if you haven't imported QtQuick. Using a different
method for the property assignment risks producing an invalid result.

Amends commit a09ea6b.

Pick-to: 6.10 6.8
Change-Id: I7dda609d0b6a3f9a32c71649a524bf1101d9fd12
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Mitch Curtis <[email protected]>
Before sending the QAccessibleEvent QAccessible::ObjectShow event from
QQuickItemPrivate::setEffectiveVisibleRecur() we checked if
QQuickItemPrivate::isAccessible was set. For e.g. Button, isAccessible
wasn't set by default: This was because isAccessible was only set as a
response to that an Accessible attached property was assigned to the
item.

Therefore, when a Button was shown it could end up not sending the
QAccessible::ObjectShow event.

This problem was first found on Button, but after more investigation, we
have found that the same problem applies to:

* BusyIndicator
* Button
* ComboBox
* Dial
* Label (without a text)
* ProgressBar
* RangeSlider
* RoundButton
* Slider
* TextArea
* TextField

The fix is to explicitly enable accessibility by calling
QQuickItemPrivate::setAccessible() on *all* Qt Quick Controls, since
they are all supposed to be accessible.

Change-Id: If4fa050149a31bf2baffa208716341d21631c042
Reviewed-by: Mitch Curtis <[email protected]>
When we find an alias to a local alias, we need to first check if the
target alias is already resolved. Otherwise we can't insert the source
alias, yet.

Amends commit 9e13782.

Pick-to: 6.10
Fixes: QTBUG-141059
Change-Id: If272a746595b39cb2dbc2b8cc0c2f688277cfe59
Reviewed-by: Fabian Kosmale <[email protected]>
Otherwise the quote will end up being part of the test name.

Pick-to: 6.10
Change-Id: Id5a08f00cfc00929af94f991fc4bd375699deb81
Reviewed-by: Olli Vuolteenaho <[email protected]>
Reviewed-by: Soheil Armin <[email protected]>
Change-Id: I17d004e1aa69b6311dd202c8e8d0a03f90a2cd29
Reviewed-by: Olli Vuolteenaho <[email protected]>
Reviewed-by: Soheil Armin <[email protected]>
The ctors and prototypes need to be linked together.

Task-number: QTBUG-138545
Change-Id: I5423dfb7d04c4d496d734ab5fc8252b6feb54a11
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
QQuickAnimatedNode uses beforeRendering and this connection
can conflict with Quick3D render prep.

Updating qsgnodes will be delayed for now to prevent
the crash.

Fixes: QTBUG-126193
Pick-to: 6.10 6.8
Change-Id: I29aa09fb6a52a4446818699bebf42eabf613c43f
Reviewed-by: Mitch Curtis <[email protected]>
Reviewed-by: Laszlo Agocs <[email protected]>
Use qBound that knows how to handle Nan to clip values into the 0, 1.0
range. The other methods (hsva, hsla) also use qBound to bound their
values.

This avoids an assert later when trying to round the NaN during the
color conversion. The assert seems to have been added by
df97b6b2de6282bd6422f1e531a42475dadc980d.

Pick-to: 6.10
Task-number: QTBUG-140899
Change-Id: I4bb34b92ceac9d3ad667ae9b2714772bc800a600
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Semih Yavuz <[email protected]>
This copies the effect that Qt Creator does when hovering on an import,
and avoids invalid QtC codemodel information leaking through when
hovering on the import path.

Fixes: QTBUG-140915
Change-Id: I5e08973fb2d227c735a40d01f6404f4424897272
Reviewed-by: Semih Yavuz <[email protected]>
Reset the style to "" to use the builtins styles, instead of reusing the
last style set by a previous test. Before this change, `tst_styleimports
attachedTypesAvailable` would test Basic, Fusion, ... styles while
`tst_styleimports` would only test the `FileSystemStyle` style set by a
previous test.
This commit fixes a test failure in a later commit.

Pick-to: 6.10 6.8
Task-number: QTBUG-133755
Change-Id: I693b976e786dce4bcf45dcf31b55142aed342a70
Reviewed-by: Mitch Curtis <[email protected]>
It seems that we call registerTypes on both static and dynamic plugins,
but qmlClearEnginePlugins only unregisters dynamic plugins. This could
cause incomplete cleanups in tests like tst_customization where
qmlClearEnginePlugins should unregister plugins in both dynamic and
static builds.

Allow QmlPlugin to also contain a static plugin instance, and adapt
unloadPlugin() to also unregister types from static plugins.

Task-number: QTBUG-133755
Change-Id: Idb5a8e2754600715d8c820a73ae35cbf8991967f
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
There does not seem to be an explanation for it, and it does not seem to
break the CI. Remove the macos special casing.

Change-Id: I94b8e3ff4129247c25e87d7401897b4871c3cdf6
Reviewed-by: Semih Yavuz <[email protected]>
DEPENDENCIES is not a valid option for qt_internal_add_test(), it was
likely mistaken with the option from qt_add_qml_module.
Remove the option.

Gets rid of

CMake Error at
 qtdeclarative/tests/auto/qmlls/modules/cmake_install.cmake:51 (file):
 file INSTALL cannot find
 "qtdeclarative/tests/auto/qmlls/modules/DEPENDENCIES":
 No such file or directory.
Call Stack (most recent call first):
 qtdeclarative/tests/auto/qmlls/cmake_install.cmake:67 (include)

Amends cdd5cc9

Pick-to: 6.10
Fixes: QTBUG-141085
Change-Id: Idce92217375b753d4935be9c2441a7d439f867e4
Reviewed-by: Sami Shalayel <[email protected]>
Fix the description: qmltypes files are made out of QML, not JSON.

Pick-to: 6.10 6.8
Change-Id: I42df0adb06ffebc4e58f12db280dc496e1c69c38
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Alexei Cazacov <[email protected]>
…test

In rare cases the mouse was lingering over the exact position of the
scroll bar as a result of other tests moving the mouse, which would
make the scrollbar never leave the active state, and hence keep
reporting a non-0 opacity.

We're programmatically activating the scroll bar via increment(),
so we don't need the scroll bar to be interactive to do the test.

Pick-to: 6.10 6.8 6.5
Change-Id: Id75b22d51277c3515fd4f448360bd576b45d69d8
Reviewed-by: Richard Moe Gustavsen <[email protected]>
Change-Id: Id097b394eb38c791411730bb8624d9a1c508a785
Reviewed-by: Shawn Rutledge <[email protected]>
The wheel event was stopping at a position where the cursor is very
near the edge of one delegate; let's stop a bit sooner so that it's
obviously inside.

Change-Id: I76ce618ffe321aeb4ff125a9f4342e62221724a5
Reviewed-by: Shawn Rutledge <[email protected]>
By not testing for these extra errors they get treated as if the request itself
was a failure, rather than the server returning an error as a perfectly
valid response.

Amends 1faca90.

Pick-to: 6.10 6.8
Fixes: QTBUG-141063
Change-Id: I3c7aee696ada58de8f1c2dcf7d4c941e644c6ab1
Reviewed-by: Ulf Hermann <[email protected]>
The fact that a qmlfir file needs to be written manually when using
qmake was not really mentioned before.

Pick-to: 6.10 6.8 6.5
Change-Id: I174ade01d5e8bd28626939f7257717070c4d220f
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Leena Miettinen <[email protected]>
When we paint text with any other style than Normal, we will offset
painting by up to 1 logical pixel. To avoid clipping the style, we
need to make sure the bounding rect of the text also accounts for
this. This does overestimate the bounding rect in cases where the
dpr is not 1, but this is better than underestimating it.

Pick-to: 6.10 6.8
Fixes: QTBUG-137404
Change-Id: I670a3709fcc6ac7fd6d58a8d524f534800cafdff
Reviewed-by: Eirik Aavitsland <[email protected]>
The setup was done, but the actual test was not.

Amends commit 8f1bfc0

Change-Id: I5a1b423b6790e9136e437be6cde6f96b2d4d54bc
Reviewed-by: Fabian Kosmale <[email protected]>
Remove the redundant Highlights class and move its functionality
directly into HighlightingVisitor. The redundant class was essentially
just a wrapper around highlighted token  container, which can be handled
more directly. Adapt  the tests.

Pick-to: 6.10 6.8
Task-number: QTBUG-140645
Change-Id: I739c69ea35bb1bec4a2e4c242189dd440d5df39f
Reviewed-by: Sami Shalayel <[email protected]>
Rename Token struct to HighlightToken to better reflect its purpose and
avoid confusion with other generic token types.

Pick-to: 6.10 6.8
Task-number: QTBUG-140645
Change-Id: Ieba550aa3624eade3a3ce1c486dccdbfd2c67c22
Reviewed-by: Olivier De Cannière <[email protected]>
Introduce QmlHighlighting namespace for better organization. Move
utility functions to nested Utils namespace. Update all references
throughout the codebase accordingly.

Pick-to: 6.10 6.8
Task-number: QTBUG-140645
Change-Id: I3ad4e5fdd4abdfcb746441acf29594711af13f90
Reviewed-by: Sami Shalayel <[email protected]>
Make the highlighted token class protocol agnostic by removing protocol
specific fields, and store  custom highlighting types and modifiers
instead. Move the logic that converts token types to protocol specific
integers to encodeSemanticTokens.
This simplifies HighlightingVisitor by removing protocol mapping
dependency and makes the tests protocol agnostic too. (before we weren't
testing QtC highlights).

Pick-to: 6.10 6.8
Task-number: QTBUG-140645
Change-Id: Ia0e84b50941f84855c4a1525f97a0d21da0f3947
Reviewed-by: Olivier De Cannière <[email protected]>
Overriding the function only to then call the base implementation and
nothing else is not very productive.

Change-Id: Ib3cba0d38de652c94689b0bac5e878f629e35bd3
Reviewed-by: Fabian Kosmale <[email protected]>
All the conversion back and forth only adds noise and overhead. Use an
array of std::byte to trick the memory manager into believing that
QV4::Heap::UrlObject is still trivial.

Task-number: QTBUG-138545
Change-Id: Ic382741d441cfb8a7446d6c46ded77173325ce34
Reviewed-by: Sami Shalayel <[email protected]>
There were two different error messages that mean the same thing.

Change-Id: I656333ab089f345580e31d63cd8ce7412b223d04
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
The tree view inserts items into their parent during expansion in
QQmlTreeModelToTableModel::showModelChildItems. However, this causes
a problem when a new item is inserted and the same parent (which is
already expanded) is expanded again due to a change in its children,
resulting in a double insertion: once during the row insertion, and
other during expansion.

This patch prevents triggering
QQmlTreeModelToTableModel::showModelChildItems when the node was not
previously expanded but becomes expanded during insertion (for
example, when expand() is explicitly called due to child changes).

Fixes: QTBUG-139344
Pick-to: 6.10 6.8
Change-Id: Id88158b2628445c1aaafeff01dd5c9ff22e3c502
Reviewed-by: Richard Moe Gustavsen <[email protected]>
When the source height or width is not an integer number of pixels, the
texture size will be rounded up. This could cause the bottom/right edge
of the texture to be omitted, since the target size for the image node
was also not in whole pixels, and the pixel coverage for those edge
pixels could become <= 50%.
This patch rounds up the targetRect to match the texture size, so it
will be rendered at exactly 1:1 when the scale factor is 1. Note that
this only fixes the issue for integer scale factors, since the target
size is calculated in updatePaintNode, which is not called when the
scale changes.

Fixes: QTBUG-136783
Pick-to: 6.10 6.8
Change-Id: I0d04e4efa65d4a77f842fc3093a143ceb6666608
Reviewed-by: Eirik Aavitsland <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.