8000 Calls order of q_invokable method by rjcamatos · Pull Request #10 · qt/qtdeclarative · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Calls order of q_invokable method #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10,000 commits into
base: 6.2
Choose a base branch
from
Open

Calls order of q_invokable method #10

wants to merge 10,000 commits into from

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 15 committers have signed the CLA.

❌ Ulf Hermann
❌ timblechmann
❌ zzag
❌ qtrampe
❌ samishalayel
❌ jarkkokoivikko-code-q
❌ matthias-rauter
❌ vohi
❌ Inkane
❌ torarnv
❌ SafiM5
❌ Petrivirkkunen
❌ kkoehne
❌ VladimirBelyavsky
❌ andreaseliasson


Ulf Hermann 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 28 commits April 11, 2025 15:50
Modify QQmlJSLinterCodeGen to be able to run BasicBlock analysis. This
is a preparation step to add the unreachable code analysis to
QQmlJSLinterCodeGen.

Task-number: QTBUG-129307
Change-Id: I94ae21759b6b863d9b9c2a632d9c3648ae3eb404
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
The passes currently don't modify BasicBlocksAndAnnotations, but I think
its nice to not ignore their return value, in case they start modifying
annotations or basic blocks in the future.

Change-Id: I4edcf6958a9a3cf65c91c5389fb42a1dd72d35db
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We don't want to export those symbols from QtQml. Move the code that's
exclusive to the debug service into the debug service and the code
exclusive to qmltc into qmltc. The remaining code can be inline.

Change-Id: Icf146af8d4e5931b7ac7bac61a5ba94449ca9402
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
We have QQmlJSUtils::toLiteral() for that. Extend it to handle byte
arrays in addition to strings and use it.

Fixes: QTBUG-134726
Change-Id: Ibde1f56b25794fc8c49b796303c4f39933aedb42
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Amends 52141b3

Change-Id: I59b4228a3ccbb38ae9fc3defaea12dbda04026a8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The batch renderer assumed nodes having different line widths to be
batchable if their drawing mode was anything else than DrawLines. That
meant nodes with DrawLineStrip mode could be batched although they
differed in line width, leading to wrong rendering.

Fixes: QTBUG-135815
Pick-to: 6.9 6.8
Change-Id: Ic0c6cd83ff9e7394f84602c453adee79c6e22641
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit adds an explanation that you can set multiple binding
targets in a single Binding element.

Fixes: QTBUG-134782
Pick-to: 6.9 6.8
Change-Id: I43332238a4ad98d538829b4405785bf514ce8c6b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This is still wrong (not all of them should be available), but at least
it avoids warnings about types being defined multiple times (as
QML/plugins.qmltypes will be loaded by anything using Qml), whereas
builtins.qmltypes is not considered by anything else.

A proper fix is still needed.

Task-number: QTBUG-135918
Change-Id: I4775e887f39f25df93159131d67338dab2c31759
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This test does not use widgets.

Change-Id: If5d446275354531364b942a8856070e444501651
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
QPair is just an alias of std::pair anyway.

Task-number: QTBUG-115841
Change-Id: I26fc90adcc775aac9955ad57304af914dc4ed48f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
These headers don't use std::pair at all.

Change-Id: I1c5c5974949ada2e05151e238884ce4f12156b5f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Also make clang-format happy with the comment.

Change-Id: Ia38a103dcfe01bace097ea6290bdf65494fc9282
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
- Simplify code snippet.
- Simplify note about desktop platforms.

Task-number: QTBUG-134903
Pick-to: 6.9
Change-Id: Ibc0db63fd3f0692c42d0b2e6685d4437850cb5a8
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Amends patch: b4ed50f

Pick-to: 6.9 6.8
Change-Id: I1a9f05031251fc5221e175f064e6c962f713c797
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
We already do this for return types, but it's fatal on any type.

Pick-to: 6.9
Fixes: QTBUG-135342
Change-Id: I7aee2a19ffcd39d2707eceb34b5073057d8b5ebb
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
The revision in question should actually be registered, and we don't
to add another inner object.

Task-number: QTBUG-134269
Change-Id: I99110ce460f29c87c2dcb219ad44c3dcbf32b9f5
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
_PC_CASE_PRESERVING is defined in unistd.h, so we need to include it.
Amends: 11deb42

Pick-to: 6.9
Change-Id: I08535096f0adc608ad93efc6563c29fc056b9156
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-set button and other text sizes back
-add thumb and track back to switch
-Change main relative layout gravity from center_vertical to center_horizontal
to make the topMargin take effect
-add previous topMargins back
-remove layout_margins dimension as there were already dimensions for all the places
it was used in
-change naming of some dimensions
-remove unused dimensions
-Adjust text sizes in qtquickview_kotlin and java, they were little
too small on high dpi devices
-Adjust text sizes, margins and other dimensions in Main and Second.qml files

Fixes: QTBUG-134405
Pick-to: 6.9
Change-Id: I35bc7892abe2435bd63b40bca9a21061ae9f0fa8
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
This fixes a qmllint warning about unqualified access in the wrong place
in the following unconventional but valid case:

Warning: .../Main.qml:5:9: Unqualified access [unqualified]
        console.log(a = 1)
        ^^^^^^^

Warning: .../Main.qml:5:21: Unqualified access [unqualified]
        console.log(a = 1)
                    ^

Pick-to: 6.9 6.8 6.5
Change-Id: I8eaa43f520c394b094917fe37dc6115ec2f7af74
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
If engine is nullptr, calling QQmlEnginePrivate::get(engine)
will cause the program to crash trying to access an
uninitialized object.

The only useful thing this function can do if the engine is null
is to find and return a cached image, if any.

However, in 0290e0f it was possible
to test QQuickDragAttached without an engine; now there needs to be
one associated via a QQmlContext for this test to continue to pass.

Pick-to: 6.8 6.9
Change-Id: I28596c2063f0474fc97b2e9a3907f8bb38c78cb1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Change-Id: I397e9249f63b6c618fe79e5ed99c9baad057fd42
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
We need to include fcntl on QNX, as we use O_RDONLY.

Pick-to: 6.9 6.8
Fixes: QTBUG-135980
Change-Id: Ic1b6da04b72e3b02b3509f883a45172dc7a79f54
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Different instances of QSGRenderThread call into different instances
of QSGDistanceFieldGlyphNode concurrently, this static counter needs
to be made thread-safe.

Pick-to: 6.9 6.8 6.5
Change-Id: Ie8299824e799a9b15bae354314d1fa5c371cf5dc
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The compiler can't see that we only access m_string if it has
previously been initialized. However, we can just zero the storage on
construction.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-135367
Change-Id: I1b04d81e18063650501bdc24474c9672e999189d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Never use module-wide inclusions. They blow up build times. For QtTest
this is usually just a typo (QTest was meant instead). Add missing
includes as needed.
In the diffs I've spotted other huge inclusions (QtQuick, QtQml), but
those need more attention.

Task-number: QTQAINFRA-7110
Pick-to: 6.9 6.8
Change-Id: I74bf3fe212f50a7a3a6af2b1c80bbcaabc2516d7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The debug message service can get confused by the presence of other
message handlers. Try again to restore the original one in the
destructor if it couldn't be restored on state change.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-134772
Change-Id: I59f36f92a4e0fad54aa617937612d2f9f20e577c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Process all properties of custom parsed types and generate errors if the
custom parsed properties are actually used. Then print an extra error
stating that qmltc does not support custom parsers.

Pick-to: 6.9 6.8
Fixes: QTBUG-134206
Change-Id: I37e4f3f8d0ee4e0926c0d64c99a4a521b093a1ab
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We simply cannot do anything sensible with them. Clarify the warning to
say that only object types can be marked uncreatable.

Also fix Qt.labs.folderlistmodel. It had such a type.

Pick-to: 6.9 6.8
Task-number: QTBUG-135032
Change-Id: Id062908c66c4c4ab15e0deb5c92d0ca7ca447899
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
andreaseliasson and others added 30 commits May 22, 2025 09:27
The class documentation for QSGRenderNode::RenderState is
missing, which results in failed links to its functions.

Fixes: QTBUG-96580
Pick-to: 6.9 6.8 6.5
Change-Id: I546c3f499a07096e00714296a1c0c0ffd2f6ea98
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Add a new diagnoseImpl() implementation that accepts an extra
"force"-bool that skips the checks used to avoid linting the same file
content multiple times. This allows to re-lint a file, for example when
new context properties became available.

Task-number: QTBUG-128232
Change-Id: Ic9d4f0d4d0ee7db1bd335e494598eef308aefa76
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Change-Id: I702ddfa549a7fadee423628f576dfff4083448a7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Pick-to: 6.9 6.8
Change-Id: I7643b66b76160e74f67def28fd7ce07eb31c7746
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
A compilation unit can be created from a script, in which case there is
no property cache. We shouldn't crash then.

Amends commit c1bd8ee

Pick-to: 6.9 6.8
Fixes: QTBUG-137072
Change-Id: Ic10dfd7a640067639894f885496dfa13719b4bf5
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Waqar Ahmed <waqar.ahmed@kdab.com>
Warn about ExpressionStatements that has no obvious effect in qmllint,
for example "x * 3;" is an expression statement that is either useless
or that potentially triggers user code with potential side-effects
during the custom coercion of "x". Warn that the expression statement
has no obvious effect.

Don't warn about expression statements inside of bindings: "y: x * 3" is
completely fine, for example.

Task-number: QTBUG-129307
Change-Id: I065ddce7394276296062545c1516ab9b4ad9f24d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Add a test using runCMake to make sure that .qmlls.ini is updated when
the build folder changes.

The test is automatic and can be run locally via:
ctest -V -R RunCMake.generate_qmlls_ini

Pick-to: 6.8 6.9
Fixes: QTBUG-133793
Change-Id: Icde34425e8755e04dff454c3875e567ff29fcd6e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Change-Id: If57e387bfb0eec73dc2d3305fa0312aa808f632d
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
When the system appearance changes, it will be reflected through
NSApp.effectiveAppearance, but NSAppearance.currentAppearance
and NSAppearance.currentDrawingAppearance will remain as is for
some reason (perhaps as a compatibility for apps that were not
ready to handle dark mode).

The original way to deal with this was to explicitly set the
NSAppearance.currentAppearance to the new effective appearance,
which would take effect for the thread from that point on. But
this API has been deprecated, most likely because overriding it
globally could mess up views or logic that was not prepared for
dark mode).

The replacement API, NSAppearance performAsCurrentDrawingAppearance
is given a block, and will only override NSAppearance.currentAppearance
during the block, which isolates it from other fragile components.

We now use a helper from QtGui that takes care of wrapping our
style drawing in performAsCurrentDrawingAppearance.

Task-number: QTBUG-135789
Change-Id: I0eb5dfc05734cf75181e6a3ed8cf2d23185f425f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The repopulate() implementation has an early return. Use a scope guard
to make sure that we always balance being and end calls.

Pick-to: 6.9 6.8
Fixes: QTBUG-136947
Change-Id: I8d817ad7bdcae8645afe15479a510c6fd070c88b
Reviewed-by: Dilek Akcay <dilek.akcay@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The example generates warnings on stderr when shutting down, presumably
because (some) delegate items no longer have a parent. Instead of
referencing parent, give the ListView an ID and reference it explicitly.

Pick-to: 6.9 6.8
Change-Id: If968e9f95e31226e9c3fb2f63eb92cff5afd3cba
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Introduce QQuickItemPrivate::effectiveDevicePixelRatio() helper method
and unify its usage in Qt Quick code.

Change-Id: I1978683d76e23c5bfe523a96ee07688eb0aef96b
Reviewed-by: Tor Arne Vestbø 
8000
<tor.arne.vestbo@qt.io>
This crashes. It can happen if you have broken type references.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-137086
Change-Id: I48febe2d88335cafe4d5e0671d30bd92c461dc95
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
A compilation unit can be created from a script, in which case there is
no property cache. We shouldn't crash then.

Amends commit c1bd8ee

Pick-to: 6.9 6.8
Fixes: QTBUG-137072
Change-Id: Ic10dfd7a640067639894f885496dfa13719b4bf5
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Waqar Ahmed <waqar.ahmed@kdab.com>
We need to make them known by their new names.

Amends commit 0cbe6e6

Pick-to: 6.9 6.8
Change-Id: I652fdc13c012bb8377f8210363e45f3676c64018
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Builds on the feature in QInputControl to provide the current selection
as QMimeData for IM consumers that support it, as well as accepting
IM insertion as QMimeData, for inserting rich text.

Change-Id: Id9e75a6520ee16855c8303387f112a8b921925c4
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The code handling accesse to members of the math object asserted that
there's exactly one method of a given name. However, that is only true
if a valid function is called. If there's a typo (or some other mistake,
or someone tried to extend the math object), we will find 0 matches.

Detect this case, and print a warning.

Pick-to: 6.9
Change-Id: Iaf3f445662660940d8b3d77e3a1d40fc39c6f2a4
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Pick-to: 6.9 6.8 6.5
Task-number: QTBUG-87708
Change-Id: I2ec6fd196b160e6e99b7601ba730348dc7958664
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The QColor(QRgb) constructor ignores the alpha channel. To include the
alpha channel fromRgba() static function should be used to create the
QColor instance

Change-Id: I98734084cdcd5df82e8103ddbdb487c4f64c65b4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Accept QStringView instead of QChat* and size.
This will be handy in later patches to compare keywords
through strings and not by characters

Change-Id: Ie6750feb643614ceb37cad508e3bb0b33ea13952
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Add QtQuickView tests that verify the functionality of signaling
between Java and QML.

Task-number: QTBUG-130768
Change-Id: I5c220712ff24e51b3509dbf9cd9f7c00de62d5d7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This test adds basic loading status tests for QtQuickView on Android.
The test uses a primary QtQuickView which has the TestCases, and a
Communicator QML_ELEMENT C++ class to load other QML files into a
secondary QtQuickView contained in the hosting layout. The hosting
activity listens to QtQuickView status changed signals, and sends those
directly to the Communicator object, which emits a signal with the
status information to the TestCases.

Task-number: QTBUG-133439
Change-Id: I01a3a1dc3124036d8290a248b9b2d1bb4010033d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Wayland surfaces don't know where they are on the screen, which means
that we can't rely on QWindow::mapToGlobal({0,0}) to get their position.

It looks like we're supposed to use the wayland api to position popups.
More specifically a xdg_positioner.

Disable the part that doesn't work, until we figure out a proper
solution. QTBUG-99618 tracks necessary changes that neeeds to be made to
qtbase and the wayland platform window, before we can fix it in
qtdeclarative.

Fixes: QTBUG-135158
Pick-to: 6.9 6.9.1 6.8
Change-Id: I9af0250f77bddc0c4f09bb028cd5105d4548a061
Reviewed-by: Liang Qi <liang.qi@qt.io>
We really don't want to add cyclic references, even if the URLs contain
a fragment.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-136439
Change-Id: Ia7086e1393134ac06c07285274f9b0ef2738219f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We need to first shut it down, then hide it, then discard the messages.
Otherwise we risk crashes. For symmetry, also externalize startup(). The
thread() and threadObject() methods can be protected, though. Those give
interesting results if the the thread is actually only a stub.

Amends commit 4858dc1.

Change-Id: If7f10910450b6ecae7cea69600d3780f86577ce2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We don't want this to crash.

Pick-to: 6.9
Fixes: QTBUG-137110
Change-Id: I231d52aa5defb9b868364c7840bfc7cb2a6f0e92
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We should not trust anything from the failed CU anymore. In particular,
the string indices may be different in the new document created from
source, and that will result in problems further down the line.

Checksum mismatches shouldn't happen too often, and the previous code is
clearly fragile.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-136810
Change-Id: I029e95cc4a52e8b1a528ca93ce594426b76be9d1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Currently there are two images that serve no purpose in the docs,
as they do not provide any useful information.

This patch removes the following images:
- qml-i18n-example.png
- extending-qml-advanced-word-cloud.png

Fixes: QTBUG-137124
Change-Id: I224fc18eca8a59373fa1b48973816ad826a94625
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
This is needed when building forms where one text-ish item describes a
control. This allows screenreaders to read the label when focussing the
item. With widgets this can be done using QLabel::setBuddy, but there
is no way to do it in QML

This adds two new properties, labelledBy and labelFor, for both ends
of the relations. Setting either of them automatically fills in the
other direction.

The internal data storage is somewhat generic so that it can be later
extended to also cover other relations like controller, description,
and flows.

Change-Id: Iff0dd387fd03434839038eaeb25967f4b14636a1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Support for topLeftRadius, topRightRadius etc were added to the software
renderer recently but they were not considered when checking whether
the rectangle is opaque or not. This resulted in background not being
correctly drawn around individually rounded corners.

Fixes: QTBUG-133314
Fixes: QTBUG-136738
Pick-to: 6.8 6.9
Change-Id: Id020550d40e800d188a27b943cf9fb1df10f5229
Reviewed-by: Magdalena Stojek <magdalena.stojek@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
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.

0