Skip to content
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

Calls order of q_invokable method #10

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.

qtprojectorg pushed a commit that referenced this pull request Dec 8, 2023
Using std::binary_search has the requirement that the passed
range fulfils ordering requirements, which was not the case
for the cppKeywords array here.

As the QString doc says [1]:

> QStrings can be compared using overloaded operators such as operator<(),
> operator<=(), operator==(), operator>=(), and so on. Note that
> the comparison is based exclusively on the numeric Unicode
> values of the characters. It is very fast, but is not what a
> human would expect; (...)

Therefore, sort the array accordingly and add an assert to
ensure it will remain sorted.

Fixes an crash/assert when building qtdeclarative with
CXXFLAGS='-D_GLIBCXX_DEBUG':

    /usr/include/c++/13/bits/stl_algo.h:2243:
    In function:
        bool std::binary_search(_FIter, _FIter, const _Tp&) [with _FIter = const
        QString*; _Tp = QStringView]

    Error: elements in iterator range [first, last) are not partitioned by the
    value __val.

    Objects involved in the operation:
        iterator "first" @ 0x7ffc4a2c4f18 {
          type = QString const* (constant iterator);
        }
        iterator "last" @ 0x7ffc4a2c4f10 {
          type = QString const* (constant iterator);
        }
    Aborted (core dumped)
    ninja: build stopped: subcommand failed.

GDB backtrace:

    Program terminated with signal SIGABRT, Aborted.
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    44      ./nptl/pthread_kill.c: No such file or directory.
    (gdb) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007f307e0a815f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
    #2  0x00007f307e05a472 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f307e0444b2 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007f307e2a300d in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
    #5  0x00005639ff90471d in std::binary_search<QString const*, QStringView> (__first=0x5639ffa1a9c0 <QmltcVisitor::checkForNamingCollisionsWithCpp(QDeferredSharedPointer<QQmlJSScope const> const&)::cppKeywords>,
        __last=0x5639ffa1b2c0 <guard variable for QmltcVisitor::checkForNamingCollisionsWithCpp(QDeferredSharedPointer<QQmlJSScope const> const&)::cppKeywords>, __val=...) at /usr/include/c++/13/bits/stl_algo.h:2243
    #6  0x00005639ff8fb837 in operator() (__closure=0x7ffc4a2c52bf, word=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:764
    #7  0x00005639ff8fb89e in operator() (__closure=0x7ffc4a2c52a0, name=..., errorPrefix=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:768
    #8  0x00005639ff8fc99b in QmltcVisitor::checkForNamingCollisionsWithCpp (this=0x7ffc4a2c6070, type=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:787
    #9  0x00005639ff8f9dea in QmltcVisitor::endVisit (this=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:341
    #10 0x00007f307f6636fa in QQmlJS::AST::UiProgram::accept0 (this=0x563a002e0628, visitor=0x7ffc4a2c6070) at /home/michi/development/git/qt5/qtdeclarative/src/qml/parser/qqmljsast.cpp:1193
    #11 0x00007f3080159b8f in QQmlJS::AST::Node::accept (this=0x563a002e0628, visitor=0x7ffc4a2c6070)
        at /home/michi/development/git/qt5/qtbase/include/QtQml/6.7.0/QtQml/private/../../../../../../qtdeclarative/src/qml/parser/qqmljsast_p.h:272
    #12 0x00007f3080212f4b in QQmlJSTypeResolver::init (this=0x7ffc4a2c5b50, visitor=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/src/qmlcompiler/qqmljstyperesolver.cpp:173
    #13 0x00005639ff8f0bd3 in QmltcTypeResolver::init (this=0x7ffc4a2c5b50, visitor=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltctyperesolver.cpp:19
    #14 0x00005639ff8c02d4 in main (argc=23, argv=0x7ffc4a2c7a68) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/main.cpp:269

[1] https://doc.qt.io/qt-6/qstring.html#comparing-strings

Change-Id: I82ebbcdca4ab90155b935f9af24b3a3821134563
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
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 16 committers have signed the CLA.

❌ Magdalena Stojek
❌ a12e
❌ samishalayel
❌ dfaure-kdab
❌ mitchcurtis
❌ ec1oud
❌ alpqr
❌ thiagomacieira
❌ eskilblomfeldt
❌ marcmutz
❌ dorisverria1
❌ qtrampe
❌ Inkane
❌ KSkau
❌ aavit
❌ semlanik


Magdalena Stojek 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.

Inkane and others added 28 commits February 19, 2025 12:52
Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-123341
Change-Id: I6f6f84edcbbf79b257566dfafcb69fe17d9cd016
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
Generally, QML modules should not require private API. It might have
been the case that generated code (by e.g. qmlcachegen) included private
headers, but this is no longer the case.

This might break code using the commercial only qmslc in direct mode
(which might need private Qt headers), but the general advise has been
to explicitly link against the private module when doing so (and it is
already necessary for other Qt modules, like Quick).

[ChangeLog][Important Behavior Change][QtQml] QML modules created by
qt_add_qml_module no longer link against the Qt6::QmlPrivate target by
default. Modules that intentionally use private API must now explicitly
link against it.

Original-patch-by: Alexandru Croitor <[email protected]>
Task-number: QTBUG-87776
Change-Id: I8c4c32673d88bb4d976d65ab10a0dc39f5e49596
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Alexandru Croitor <[email protected]>
We recently introduced an optimization to reduce the amount of reads
that we perform when dealing with QObject-provening properties.

As part of the optimization, we need to connect to the destroyed signal
of the original QObject, to ensure that we do perform a read to
invalidate our view of the data after the object is destroyed.

The receiver of the connection needs to modify the state of a
ReferenceObject that refers to the original QObject.

It is possible for the ReferenceObject to be destroyed before the
QObject is destroyed, so that we want to ensure that the connection we
created is dropped to avoid having the destroyed signal trigger a
callback that tries to mutate the state of memory that was freed.

To do so we need to hold an handle to the connection we introduce from
the ReferenceObject.

Due to the ReferenceObject object living in V4's managed memory, we need
it to be trivial.
As a `QMetaObject::Connection` handle is not trivial, we thus need to
add one layer of indirection by storing a pointer to it.
This means, in turn, that we are forced to perform an allocation for a
`QMetaObject::Connection` that will then copy from the original handle
we obtain.

To avoid the allocation, we instead store the connection in block
memory.

Thus, the handling of the connection that is introduced on an instance
of `ReferenceObject` was modified to store the handle in block memory.

The `onDelete` member, which stores the handle to the connection, of the
heap part of a `ReferenceObject` was modified a correctly aligned,
correctly sized byte array.

The code that takes care of producing the connection was modified to
avoid the allocation, instead directly allocating in the byte array by
placement new.

The code that takes care of disconnecting as necessary, in
`ReferenceObject::destroy`, was adapted to disconnect and destroy the
connection stored in the byte array.

Change-Id: I5472096cb163000545d7f632302df0182511f291
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
QQuickWidget can use RHI these days, so remove the "Qt 6 changes" note
that said that applications need to force an OpenGL backend.

Pick-to: 6.9 6.8
Change-Id: I8a7bd22e98b895dc4a12ae052c7f53f930bb3db2
Reviewed-by: Laszlo Agocs <[email protected]>
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
Change-Id: I31c7518e148ced0bc5d80afd29f8db87d0380513
Reviewed-by: Qt Submodule Update Bot <[email protected]>
They are not, in fact, value types. Rather they are special properties
of other types and stored as the underlying type. Also, link the
documentation about both, defining enumerations in QML and defining
enumerations in C++ from that page.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-89432
Change-Id: Ic73d7cea352a11c1d7699e655100aad078a77950
Reviewed-by: Olivier De Cannière <[email protected]>
The `QtQmlIntegration` module provides the `qqmlintegration.h` header
that expose a series of macros that simplify the integration and
registration of C++ types to QML.

In the documentation, those macros are currently documented as being
provided by the `QQmlEngine` type in the `QtQml` module.

While it is true that one can access the macros by including
`QQmlEngine`, due to the header file for the type transitively including
the required header, it is only by indirection.

Furthermore, there is no real connection between a `QQmlEngine` and the
integration macros. Indeed you can use a `QQmlEngine` without
integrating any type and you can integrate types without even linking to
the `QtQml` module that provides `QtQmlEngine`.

Thus, slitghly re-organize the QML documentation to move the macros
documentation outside of the `QQmlEngine` reference documentation.

A new file, "macros.qdoc", was created under the general folder that
collects documentation related to the integration of C++ types in QML.
This new file provides a dummy documentation for the `qqmlintegration.h`
header file.

The documentation for the macros that are provided by
`qqmlintegration.h` were moved from "src/qml/doc/src/qmlfunction.qdoc"
to this new file.
Furthermore, the documentation body for each macro was modified to
"relate" to the newly documented header file, allowing them to be
positioned in under the correct element in the output documentation.

Certain links in the qmllint documentation were modified to be adapted
to the new documentation structure, as they were linking to some of the
macros by specifying their position to be under the `QQmlEngine`
documentation specifically.

A small note in the cmake documentation that mentioned the now
documented header file was modified to link to the header file
documentation itself.
In the same note, a non-linking mention to the `QML_ELEMENT`
macro was modified to link to the available documentation for the macro.

The documentation related to the definition of QML types from C++
mentioned `qqmlregistration.h` as the required header to access the
registration macros.
While this is potentially true, as the header will include
`qqmlregistration.h`, it requires linking to the fatter `QtQml` module.

As there might be cases where it is not required to link to `QtQml`
itself, mention that the macros resides in the `qqmlintegration.h`
header.

Pick-to: 6.9 6.8
Task-number: QTBUG-132409
Change-Id: I2ff9c1aa40b6d3cd6f451a4d2a7c2c10a9566f35
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Paul Wicking <[email protected]>
The registration functions that are generally provided by the `qqml.h`
header file, were currently registered under the `QQmlEngine` class
reference documentation.

While it is true that one can access those functions by including
`QQmlEngine`, due to the header file for the type transitively including
the required header, it is only by indirection.

Reorganize the QML documentation to be more precise, by providing a page
for the `qqml.h` header file and by moving the relevant functions there.

A simple documentation block for the "qqml.h" header file was added to
the existing "qqml.cpp" implementation file.

The documentation for the relevant element was moved from
"src/qml/doc/src/qmlfunctions.qdoc", directly to the implementation file
for "qqml.h".

The moved documentation blocks were positioned at the bottom of the
file.
The blocks that referred to an element whose definition resided in the
implementation file were interleaved with the code itself and allowed to
auto-tie instead of being explicitly tied by an "\fn" command.

The documentation for `qmlExtendedObject` and the implementation
conflicted on the sole parameter name.
While this is allowed when passing by an "\fn" command, it is not doable
when the documentation block is auto-tied.
As the documentation block for `qmlExtendedObject` is now auto tied, the
conflict would produce a new documentation warning.
There is no directly apparent reason for the name to be different, thus
one of the two was changed in accordance with the other.
In particular, the name of the parameter in the code itself was modified
as the one used in the documentation block is possibly, superficially,
more precise.

The documentation for some of the elements had code-blocks that use some
Qt macros such as Q_OBJECT or Q_NAMESPACE.
MOC doesn't respect comment blocks and will produce an error on seeing
those macro usages.
Work around the issue by obfuscating their usages through the text
substitution infrastructure for the "\code" command.

All moved documentation was modified to relate to the "qqml.h" header
file to ensure their correct positioning in the output documentation.

The original file containing the elements was removed as it is now
empty.

Certain links that specifically linked to some of the moved elements as
being under `QQmlEngine` were modified to work with the new positioning.

Pick-to: 6.9 6.8
Fixes: QTBUG-132409
Change-Id: I10392174ed635e61947bb6aa729e6786dee8018c
Reviewed-by: Ulf Hermann <[email protected]>
Resolves QDoc warnings of type
Macro '\tab' invoked with too few arguments (expected 4, got 3)

Pick-to: 6.9
Change-Id: I1e0dc56daa9eb3a8565e4d691a4504bfa3d0747c
Reviewed-by: Nicholas Bennett <[email protected]>
Added the missing \l

Fixes: QTBUG-133745
Pick-to: 6.8 6.9
Change-Id: I4357e15ea54230a86501c338a26d6ffc7ce403cf
Reviewed-by: Assam Boudjelthia <[email protected]>
Reviewed-by: Rami Potinkara <[email protected]>
QML methods have to also be annotated with the \qmlmethod, which this newly
added one did not.

Pick-to: 6.8 6.9
Change-Id: I01f7241130c4f098bc94978e71c83891da4103a4
Reviewed-by: <[email protected]>
Reviewed-by: Aleix Pol Gonzalez <[email protected]>
Creating library qtbase\lib\Qt6Quick.lib and object qtbase\lib\Qt6Quick.exp
mocs_compilation.cpp.obj : error LNK2001: unresolved external symbol
"public: __cdecl QExplicitlySharedDataPointer<class
QFontVariableAxisPrivate>::~QExplicitlySharedDataPointer<class
QFontVariableAxisPrivate>(void)"
(??1?$QExplicitlySharedDataPointer@VQFontVariableAxisPrivate@@@@qeaa@XZ)
qtbase\bin\Qt6Quick.dll : fatal error LNK1120: 1 unresolved externals

Since qtbase ac5ab8ce32c6bd4122ecc690d30eade5c4f4bf2a
~QESDP<QFontVariableAxisPrivate> is not exported, but it should not need
to be.  This error is believed to be due to an MSVC bug.

Fixes: QTBUG-133494
Pick-to: 6.9
Change-Id: Ia5fdbf7153251c60f23470d38ad19dde778ebf83
Reviewed-by: Shawn Rutledge <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Zhao Yuhang <[email protected]>
The sidebar is intended to be an implementation detail, and thus not
intended to be used by users directly. However, it makes sense for it to
have its properties flagged as FINAL for the performance gain. In
addition, a new signal didn't have a revision.

Found in API review.

Pick-to: 6.9
Change-Id: I82b4314a3cf7f8336efe728a6c8da5d22a52a800
Reviewed-by: Ulf Hermann <[email protected]>
Replace the use of -1 to indicate unset corner radii with explicit
bitfield flags to track whether each corner radius is set.
The default value for unset radii remains 0.0.

Fixes: QTBUG-120188
Change-Id: If51a0165386a0c474ecd57ef23310d1c28f0f60b
Reviewed-by: Shawn Rutledge <[email protected]>
Pick-to: 6.9
Change-Id: I39312a020939f4de5b80e9a0bf4b39294e9fa7f5
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: MohammadHossein Qanbari <[email protected]>
While those properties may be of type Component, they don't have to. We
can in fact not resolve anything resembling an ID while inside one of
those objects because we cannot determine the component boundaries.

Amends commit dea8e38

Pick-to: 6.9 6.8
Fixes: QTBUG-133460
Change-Id: Iac7294166d38ce591c45c0d31b139a52eda70fc1
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
It contained quite a few inaccuracies. Also, move the docs for
operator== up, into the same block as the other docs for
QQmlListReference.

Add a link to QQmlListReference to the docs of QQmlListProperty.

Pick-to: 6.9 6.8
Task-number: QTBUG-130705
Change-Id: I4cb2aa1a78215719a4a409c75c0a97aef404ef18
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Alexei Cazacov <[email protected]>
If you use QQmlApplicationEngine to auto-load translations you need to
make them visible by placing them inside the relevant QML module.

Pick-to: 6.9 6.8
Fixes: QTBUG-116588
Change-Id: I4b768c6ad6ef763a5d6c43aaa794860f7751398a
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Change the compiler/platform detection macros to check whether a macro
is defined, before testing its value. See also the discussion at

https://bugs.webkit.org/show_bug.cgi?id=167643
https://codereview.qt-project.org/c/qt/qtbase/+/618094

Task-number: QTBUG-132900
Change-Id: Ic3cc02b23e034cc7622e899b4acc381166a9ec95
Reviewed-by: Ulf Hermann <[email protected]>
[ChangeLog][CMake] The FILENAME_VARIABLE option of
qt6_generate_deploy_qml_app_script, which was deprecated in 6.6.0, has
been removed.

Change-Id: Idb73337c8fab5fe009d500e371855e9fec677c37
Reviewed-by: Alexey Edelev <[email protected]>
QQuickMenuPositioner positions child menus to the right of the menu item
that opened it. In additon, the overlap and rightPadding properties
are used to offset the x position, which styles can use to fine tune how
exactly submenus should be positioned relative to the parent menu item.
The parent menu's padding is used, because the submenu's position is
initially set to be relative to the menu item that opened it. When the
position is offset by the padding, it will position itself to the parent
menu, and not just the parent menu item.

7add186 introduced the flipping
behavior for menus that have their popupType set to Popup.Window.
Causing menus that don't have enough space to open to the right side, to
instead open on the left side.
The aformentioned patch used the overlap, but forgot to also add the
leftPadding, when flipping submenus.

Also fix the test tst_QQuickMenu::subMenuFlipsPositionWhenOutOfBounds,
which was previously broken on all styles that modified the rightPadding
property of Menu. 6e327f2 introduced a
temporary fix, in order to unblock CI, and this patch should fix it
properly.

Pick-to: 6.9 6.8
Change-Id: I62c58617dbcf27c097009859213cb78eb59a8008
Reviewed-by: Richard Moe Gustavsen <[email protected]>
Amends commit 7da85b0.

Pick-to: 6.9 6.8 6.5
Task-number: QTBUG-89432
Change-Id: I67017c6fe26830aad227c97e1e9d65de09215729
Reviewed-by: Alexei Cazacov <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
So that ContextMenu can open when e.g. a Drawer is in the scene.

[ChangeLog][Important Behavior Changes][Controls][Overlay] The pressed
and released signals are no longer emitted for right clicks. This is to
allow ContextMenu to work when controls like Drawer are used.

Fixes: QTBUG-132765
Pick-to: 6.9
Change-Id: If329a2ddaaf76e498e7ae2cd48a899fc23dba6b9
Reviewed-by: Shawn Rutledge <[email protected]>
It was initially failing in CI. There might be a better way though, so
this patch is separate for easy reverting.

Change-Id: I4ec72bb71927ca10871c8e3c5863141b13fe5472
Reviewed-by: Shawn Rutledge <[email protected]>
This includes:
- turning VERIFY_SOURCE_SBOM ON
- adding rules to the licenseRule.json files
- correcting the licensing given via REUSE.toml files
- renaming license files not located in LICENSES folder.
Their name needs to be prefixed with `LICENSE.` to be ignored
by reuse and excluded from the source SBOM. The names are
updated in the corresponding qt_attribution.json

A lot of files are skipped during the license test,
but all are present in the source SBOM.
This is why corrections are needed before turning the
source SBOM check on.

[ChangeLog][Third-Party Code] Renaming the license files with prefix
LICENSE. to have them ignored by reuse tool.

Task-number: QTBUG-131434
Pick-to: 6.9 6.8
Change-Id: I2b3e4750405f13a97b350ee65def30f1330526a3
Reviewed-by: Joerg Bornemann <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
Running clazy on the qt multimedia codebase found a few missing emit
statements in qtdeclarative.

Pick-to: 6.8 6.9
Change-Id: If34411774cda45e2142763c910df04f91b5ad1da
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
Re-declaring metatypes is not supported. It worked for built-in types
(it was actually a no-op), but it's not a good idea.

Pick-to: 6.9
Change-Id: I536f590e06906b394066fffd78e7f8fe6fda49ae
Reviewed-by: Fabian Kosmale <[email protected]>
Adds useful information to diagnose the cause of active focus failures.

The failure message will now look like this:

FAIL!  : tst_QQuickMenu::FluentWinUI3::contextMenuKeyboard(Popup.Window) 'firstItem->hasVisualFocus()' returned FALSE. (control: MenuItem_QMLTYPE_1545(0x5db854767310, name="firstMenuItem", parent=0x5db8549a28d0, geometry=0,0 190x30, z=1) activeFocus: true focusReason: Qt::OtherFocusReason activeFocusItem: "MenuItem_QMLTYPE_1545(0x5db854767310, name=\"firstMenuItem\", parent=0x5db8549a28d0, geometry=0,0 190x30, z=1)")

We add both a function and a macro, as this allows the helper to
be stepped into while debugging.

Task-number: QTBUG-133858
Pick-to: 6.8 6.9
Change-Id: I26014ee93f5f053df1ac19ac6e673876abce1258
Reviewed-by: Doris Verria <[email protected]>
samishalayel and others added 30 commits March 19, 2025 12:00
This is a preparation task for QTBUG-119890 that should make writing
tests easier for the new warnings to come.

Task-number: QTBUG-119890
Change-Id: I87b353ae623ad42ae2ea3f0439636ae752f64783
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Add a warning about variable redeclaration for 'let' and 'const'
variables: they are not allowed in JS.

Fixes: QTBUG-127107
Pick-to: 6.8 6.9
Change-Id: I44ba50e436b0b396a089bc8aedcef31d5455e48a
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
Newer CMake versions no longer allow reading the LOCATION property, as
it doesn’t work with multi-configuration generators. Instead, the
$<TARGET_FILE> generator expression should be used to correctly resolve
the target file.

Ref: https://cmake.org/cmake/help/latest/release/3.0.html#deprecated-and-removed-features

Amends: b1134ac.

Pick-to: 6.9 6.8
Change-Id: I69b5625ca4ff641049c4b819e12651829d64b44f
Reviewed-by: Alexey Edelev <[email protected]>
Reviewed-by: Alexandru Croitor <[email protected]>
Pressing one Button and then another, on a touchscreen, should not cause
either Button to emit pressed() twice.

tst_button.qml's test_multiTouch() now counts the pressedChanged and
pressed signals separately.

Pick-to: 6.5 6.8 6.9
Fixes: QTBUG-122043
Change-Id: I2f353ebc29900f9cfba5e71425022473d3a32a26
Reviewed-by: Bartlomiej Moskal <[email protected]>
Reviewed-by: Mitch Curtis <[email protected]>
It's effectively the same.

This invokes the deterministic (and slower) hashing of strings inside
the QShader hasher. One hopes that the cost of the slower string hashing
is amortized by the number of calls to QSGRhiShaderMaterialTypeCache's
own qHash() function.

Change-Id: I6d257bb646c5b17a48dffffdb3977b5abca79ca1
Reviewed-by: Laszlo Agocs <[email protected]>
QQuickIconImagePrivate::updateDevicePixelRatio is called for named
_theme icons_, which ensures that the DPR is respected for icons coming
from a theme defined by an index.theme file. However, since a named
icon created through a _platform icon engine_ is loaded through
QQuickImagePrivate::setImage, it bypasses QQuickImageBase::loadPixmap
which would call updateDevicePixelRatio.

Fix this by setting the image's devicePixelRatio member before calling
setImage.

Fixes: QTBUG-133424
Pick-to: 6.8 6.9
Change-Id: Ibaf3d96ebcad6d0b99cd5802801bbf40d2c13e25
Reviewed-by: Shawn Rutledge <[email protected]>
Reviewed-by: Christian Ehrlicher <[email protected]>
This patch updates qtdeclarative examples to use
SDK 35 as a target and compile version SDK.

Task-number: QTBUG-130285
Task-number: QTBUG-129461
Pick-to: 6.9 6.8
Change-Id: Ie11f8bebff7dfeb4c1a87c07826f9e9ef0f78d4b
Reviewed-by: Rami Potinkara <[email protected]>
Reviewed-by: Assam Boudjelthia <[email protected]>
After bumping the Android compile and target versions to 35,
disable edge-to-edge feature that arrives with Android 15, because it
will be easier for users to work with this for now.

Later we'll add support for edge-to-edge feature.

Task-number: QTBUG-134880
Pick-to: 6.9 6.8
Change-Id: I8d703c6c6b925a39da9ac8ea6a3d23eaa9b3c3a0
Reviewed-by: Assam Boudjelthia <[email protected]>
This reverts commit 85f8076.

Reason for revert: The change is wrong, Clang is producing False Positives:
- llvm/llvm-project#126041

See https://eel.is/c++draft/except.spec#6, which clearly states that a
defaulted SMF is "noexcept(auto)".

Pick-to: 6.9 6.8 6.5
Change-Id: Icca3a4be990215ef80e5595d7b84e25ec3051f53
Reviewed-by: Fabian Kosmale <[email protected]>
As it stood, the background delegate of a Menu would draw its
drop shadow on the outside of the delegate, and therefore also
on the outside of the Menu as a whole. This works fine for
Popup.Item, since an Item is allowed to draw out-of-bounds. But
for Popup.Window, this would fail.

Instead, the correct solution in this case is to draw the shadow
_inside_ the delegate, and instead make the whole menu bigger by
adjusting the insets instead, to take the shadow into account.

In order to be able to do this, we also need to teach StyleImage
to optionally draw the shadow inside the bounds.

Pick-to: 6.9 6.8
Change-Id: I306e511abca44f4f86ee18a16740f679cf987ac1
Reviewed-by: Doris Verria <[email protected]>
The style declares many dynamic properties that are meant to be
private and not available eg: from code completion. Use __ to hide them.

Pick-to: 6.9 6.8
Change-Id: Idf132a71cacad6ddff951bc378101f1d094112f5
Reviewed-by: Richard Moe Gustavsen <[email protected]>
The style declares several QML dynamic properties which are meant to be
private. Hide them using __ convention.

Pick-to: 6.9 6.8
Change-Id: I4317d2ee7072a72fda1736fc8c9165a980889d95
Reviewed-by: Richard Moe Gustavsen <[email protected]>
After the previous optimization of the animation handling, the scene
grabber used a fixed timeout period without afterRendering() signal
before grabbing to test for stabilization. However, certain scenes can
be continuously rendering even though the content does not change, and
so the grabber would never get to grab for a second time, and so never
judge them stabilized.

Fix by forcing a grab after approx timeout period.

Change-Id: Ia3a05c3020e2f4df1e9bb87f6a0409a0ad68bbbd
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Change-Id: Ib83c8d3452d5a0521295750f068f429b414da6ff
Reviewed-by: Fabian Kosmale <[email protected]>
Implement the ErrInvalidEnumValue complaining about enum keys being
lowercased or duplicated. Change the warning message as the Qt Creator
code has a comment indicating that the message should be changed.

Task-number: QTBUG-129307
Change-Id: If0b72eab38124453f90eb9a52e126bf9f24c83b7
Reviewed-by: Olivier De Cannière <[email protected]>
Ensure that they're auto-tested, which would prevent issues like
QTBUG-128520 when combined with failOnWarning, which will be done in a
follow-up patch.

Pick-to: 6.8 6.9
Change-Id: Ib773dd2780e8ffe0a554852bd20ef20a4ab65c1a
Reviewed-by: Santhosh Kumar <[email protected]>
Task-number: QTBUG-98718
Pick-to: 6.8 6.9
Change-Id: I24e641952ca4570f85928c53fb9752a595d50122
Reviewed-by: Santhosh Kumar <[email protected]>
Allows specifying a subsection of the defined path to be displayed.
This mirrors the recently added trimmed() method of QPainterPath.

[ChangeLog][QtQuick][Shapes] Add path trimming functionality

Change-Id: I76371832df07cbab9d81a557b25a6fd53150630e
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
There are many places in QmlFormat (DOM in general) relying a lot on the obscure side-effects. toUpdate member of PendingSourceLocation is one of these.

Typically the data behind it gets re-assigned under not so clear conditions in the `LineWriter::commitLine`.
This commit removes this member and simplifies all the upstream usages of it.

Unfortunately because the details are somewhat fuzzy and requires more research, this change is mildly risky, relying mostly on the existing tests, which seem to be passing fine.
Therefore it's open to the discussion whether it's OK to take this risk or better not.

Change-Id: Ia3ea68cd0afc44f1e8dbb35163ad29211c884b5b
Reviewed-by: Sami Shalayel <[email protected]>
We don't explicitly link against both, which avoids C++ level UB. But
if the class name is exactly the same, the metatype system is unable to
discern them. That in turn means that the meta-type based valiadion code
in QML breaks.

Fixes: QTBUG-135039
Pick-to: 6.9 6.8 6.5
Change-Id: Ib9c92511fd8eb7de9dcbef2c997b45cf76572a08
Reviewed-by: Ulf Hermann <[email protected]>
Part of the HDR story is loading images that contain pixel values in
bigger ranges than between 0 and 1. QQuickDefaultTextureFactory and
QSGPlainTexture automatically converts QImages to RGB(A) 32-bit and
textures to RGB(A/X) 8-bit, which are non-floating point based. This
change adds support for the additional formats required, which are 16
and 32 bit floating point. It will fall back to 16 bit fp textures if
RHI does not support fp 32, and down to the default 8 bits if fp 16 is
not supported either.

Task-number: QTBUG-126035
Change-Id: I6366f04af26126978e087301108af020749bae54
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Laszlo Agocs <[email protected]>
tst_Animators::testTransitionsWithImplicitFrom was flaky on Opensuse.
Change QTRY_VERIFY for QTest::qWaitFor so that events are not processed
while we are waiting for the controller->m_runningAnimators.isEmpty()
to return false.

Unblacklist tst_Animators::testTransitionsWithImplicitFrom on Opensuse
as this patch fixes its flakiness.

Pick-to: 6.9 6.8 6.5
Change-Id: I9b83b243f06e03ef485949c5450b4acc404efba8
Reviewed-by: Axel Spoerl <[email protected]>
Add the missing intermediate CMakeLists.txt

Ammends 8009825

Fixes: QTBUG-135091
Change-Id: Idde1c8c08d18ef678e1c5a7acf544f5c451f35a5
Reviewed-by: Alexandru Croitor <[email protected]>
Initial tests cover the current behavior:
- duplicate in QML_FILES are XFAIL at build-time
- duplicate in RESOURCES are not failures right now

Task-number: QTBUG-116597
Change-Id: Ibde9f12c94b31fc5afbf552d93a98df08b50e1b6
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Alexandru Croitor <[email protected]>
Having duplicated `QML_FILES` leads to a build error as reported in
QTBUG-116597. This provides an early check at configure time for such
duplicates.

The duplication check is done based on the absolute source path.

Summary of changes:
- the check for valid `QML_FILES` is moved earlier on
- tests are adjusted to check for file duplications

Fixes: QTBUG-116597
Change-Id: Ib078c495c747f732842b81ae0566c2a644dd31a4
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Alexey Edelev <[email protected]>
Pick-to: 6.8 6.9
Change-Id: I87cd9d04a436616096590c7ed193cee3fba55924
Reviewed-by: Alexandru Croitor <[email protected]>
The QQuickAccessibleAttached was connecting valueChanged() and
cursorPositionChanged() signals without checking if the corresponding
accessible value/text interface were implemented. This caused:

1. False QAccessibleEvent emissions for properties without backing
accessibility interfaces
2. Warnings about missing interfaces when accessibility tools tried to
access unimplemented features

The fix adds interface checks before connecting signals. This prevents
event generation for properties without proper accessibility support.

Added test case (tst_QQuickAccessible::quickAttachedProperties) verifies
no signal emissions when interfaces are missing.

Fixes: QTBUG-133564
Change-Id: I01f62926322aa52dccffe6255a3a4b653d311b31
Reviewed-by: Morten Johan Sørvig <[email protected]>
Forwarding the bindability of aliases is a complicated affair because a
single alias can encompass two properties (the "core" and the "value
type" property). This change adds another flag to discern between "can
use the bindable for notifications" and "can install a QBinding on this
property". Those are different aspects. Deep aliases can still notify
via the bindable of the core property, but they cannot accept a
QBinding.

Accordingly, when querying the metaobject for a bindable of a value type
alias, return the bindable of the core property. This is the one you at
least meaningfully install an observer on. The bindable of the value
type property would be entirely useless.

Amends commit 1f40e12.

Pick-to: 6.9 6.8 6.5
Task-number: QTBUG-134688
Change-Id: Ib219657bcbd2e263285d54f8736cada74ac594f5
Reviewed-by: Fabian Kosmale <[email protected]>
Mention the delegateModelAccess property and describe what it does.
Include an extra snippet to show how DelegateModel.ReadWrite works.

Task-number: QTBUG-132420
Change-Id: I6e9de274af8f65d234737461fd0b9737160f6df3
Reviewed-by: Leena Miettinen <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Use the qdoc \value command.

Amends commit 4bd5b31

Change-Id: Ice342b1c0cb04312e214556b28a21a07a08f89d1
Reviewed-by: Fabian Kosmale <[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.