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]>
Ulf Hermann and others added 29 commits October 8, 2024 22:01
We can resolve the attached properties function without querying the
type registry. The attached properties function can be resolved with
pure C++, given it's surrounding type, name, and signature. We already
have functionality to do so in qqmlprivate.h

This is not only faster, but also avoids the problem of having to
register dependent types before being able to use their attachments.

Pick-to: 6.8 6.5
Fixes: QTBUG-128895
Change-Id: I5c1df81a43195eb4dd97a4abfaa79f3cfe39355e
Reviewed-by: Olivier De Cannière <[email protected]>
Amends commit 573b6a5

Change-Id: I4fe93712303adcb32db5760694ae96c1516569d8
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
We'll need it in more places.

Change-Id: I8dc23a4b8ee873c0b8e84b3aed9872d48959a021
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
We want to avoid synthesizing the type. Instead the scope should be
specified.

Task-number: QTBUG-124670
Change-Id: If9f6a6c4dad1ec4ff2ad84d1b83a0bc720a8f589
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
The example code snippet in the documentation https://doc.qt.io/qt-5/qml-qtquick-controls2-menu.html caused a warning:
Parameter 'mouse' is not declared. Injection of parameters
into signal handlers is deprecated.
Changed the code snippet in the documentation to use lambda functions.
Now users can use the code snippet without triggering any warnings.

Fixes: QTBUG-128520
Change-Id: Id787af63521a46c82302176c8da8fca4d49bb1b3
Reviewed-by: Axel Spoerl <[email protected]>
Add a check in the lexer and fail in the parser if the file to be parsed
is too big for qsizetype and quint32.

QQmlJS::SourceLocation uses quint32 to save the offset, and code using
QQmlJS::SourceLocation's offset usually do their computation on
qsizetype.

Therefore, limit the QML file size to
std::numerical_limits<quint32>::max() on 64 bits machine when qsizetype
has a representation for std::numerical_limits<quint32>::max(), and to
std::numerical_limits<qsizetype>::max() otherwise.

Thats 2Gb on 32 bits machine and 4Gb on 64 bits machine.

Currently, using qml tooling on files bigger than the limits mentioned
above already leads to UB without this patch.

Add a helper to construct SourceLocation from qsizetype indexes.

Task-number: QTBUG-127833
Change-Id: Ic255964e13ebae08488ed160e59d504638f1b9ad
Reviewed-by: Olivier De Cannière <[email protected]>
Change begin() and end() to return a qsizetype, as now we only process
QML files where quint32 can safely be casted to qsizetype.

This allows to change all users of begin() and end() to use qsizetype,
and to silence all MSVC compile warnings about comparison of ints with
different signedness.

Fixes: QTBUG-127833
Change-Id: I251435aa598386effe0259549dbe94d17b0d806b
Reviewed-by: Olivier De Cannière <[email protected]>
Pick-to: 6.8
Change-Id: I723dc8740a37f6aa92c73cca1b5ecc364578185d
Reviewed-by: Mitch Curtis <[email protected]>
There are existing notifiers (QQuickItem::ItemChange and
QQuickItemChangeListener) for geometry (position and size), and rotation.
Scale has a public signal but no corresponding notifiers. Transform
is also affected by QQuickTransform instances attached to the item,
and when any of those change there is currently no mechanism available
to public or private API's to detect such changes. This change adds the
notifiers so the set is complete - Geometry, Rotation, Scale, and
Transform which catches all three and transform changes.

Task-number: QTBUG-10644
Change-Id: Ib57dbe23c600a493b4e08ce8edad078e10e28d09
Reviewed-by: Shawn Rutledge <[email protected]>
Reviewed-by: Tor Arne Vestbø <[email protected]>
During processing, a significant amount of intermediate ("uncooked")
vertex data is allocated for every fill and stroke node. After the
final, smaller vertex data is generated, the intermediate data was
intended to be deallocated right away. Since the QList API now
requires 2 calls to actually deallocate, that did not happen, and the
data would live on as long as the node (path) itself.

Pick-to: 6.8
Change-Id: I48efa5d0bc2b226c5eaac37dbba485b653604bfd
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Instead model the retrieval of an extension as explicit separate step.
With this in place, we don't have to synthesize the
QQmlJSRegisterContent for extensions anymore.

Task-number: QTBUG-124670
Change-Id: I20394ac8b8a30d7eb9efc91c4e99ef9255a9520b
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
This creates build issues on Windows

Amends ffd39a4

Pick-to: 6.8
Change-Id: Ia031f2ed5275683da617df90bcab62d9fe56d4d2
Reviewed-by: Semih Yavuz <[email protected]>
Make tst_qmllint_import_rel_script configure correctly on static builds,
instead on failing on tst_qmllint_import_rel_script_init if that target
was generated.

Change-Id: Iaebf3159b506d29faac69e90eaa09d0e4c317ec5
Fixes: QTBUG-129585
Reviewed-by: Olivier De Cannière <[email protected]>
This should help find raw string literals in generated code

Task-number: QTBUG-129797
Change-Id: I66e5d6302319678b494030e8cb3459eb06f0f134
Reviewed-by: Semih Yavuz <[email protected]>
Amends e7146cd

Pick-to: 6.8
Fixes: QTBUG-129797
Change-Id: I5dc48412cf29bd2de877dd681ea309a6e74d75c5
Reviewed-by: Ulf Hermann <[email protected]>
This should fix the compiler error on XCode 16, by moving the default
constuction of std::unique_ptr<BindingValue> into the cpp file, where
BindingValue is known.

Pick-to: 6.7 6.8
Fixes: QTBUG-129766
Change-Id: I58aae92c28553d0a0bff0c39a352d4f1444bd6aa
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Previously, when setting a new file address and pressing the close
button, the focus would move to the quick widget due to
QLineEdit::editingFinished() being called. This triggered an attempt
to close the old file and open the new one, causing unintended state
transitions.

To resolve this, we now reload the file content and update the quick
widget's source without transitioning to CloseState and OpenState. This
is achieved by updating the file path and emitting stateChanged() from
OpenState to OpenState in the StateController, notifying other widgets
to reload their content.

Pick-to: 6.8
Change-Id: Ic623d320fe1736e11fd538a6735632b19c507394
Reviewed-by: Jan Arve Sæther <[email protected]>
Reviewed-by: Doris Verria <[email protected]>
Fixes: QTBUG-129182
Pick-to: 6.8
Change-Id: I6b7624eb514c42587870d6c3e1c1f43fcf691eae
Reviewed-by: Axel Spoerl <[email protected]>
Add code snippet for how to supply source string templates to
Qt::qsTrId using /*% <string> */. The /begincomment and
/endcomment expand to /* and */, respectively.

Fixes: QTBUG-127794
Pick-to: 6.8 6.7 6.5 6.2
Change-Id: I84b77179892eea6dba2c8816b658916d665e718e
Reviewed-by: Joerg Bornemann <[email protected]>
Flickable/ListView/TableView would sometimes pause (or lag) for almost
a second if you dragged it in one direction, but then switched to
drag it in the opposite direction (without lifting your finger). This was
especially evident on iOS. It could be reproduced in, for example, the
Gallery app (the controls-list in the drawer), or any other app with
a Flickable.

The reason this happened, was because a "reversed" drag would cause
dx and dy to converge back to zero (compared to the starting point
of the drag), which would result in overThreshold becoming false
again. And since the deltas ended up below the threshold, the content
item stopped moving.

Rather than overThreshold becoming false when dragging back to the
starting point, this patch will change it so that it stays forever
true once dragging has started. It will also remove the
related dx/dy != 0 checks because of the same reason; Once in dragging
mode, the content item should always move, even if it was dragged back
to the starting point (dx/dy == 0).

Fixes: QTBUG-129599
Pick-to: 6.8 6.7 6.5 6.2
Change-Id: I86d4e6eba74bbb52884bac4782531ac90818323d
Reviewed-by: Jan Arve Sæther <[email protected]>
On macOS, readOnly/non-editable text controls don't accept tab
focus. This behavior is also respected in Qt since
c1d2bcf .
Since this behavior is particular to macOS and not to other
platforms, in Qt we have tabFocusBehavior() in
qGuiApp->styleHints() which represents the system setting.
For all platforms other than macOS this always returns
Qt::TabFocusAllControls, which hints that all enabled controls
should receive tab focus no matter if editable or not. On
macOS if this true, all controls will accept tab focus, and if not,
it means that only editable text inputs and lists will.

The problem was that on macOS readOnly text edits were receivng
tab focus even if tabFocusBehaviour was not
Qt::TabFocusAllControls. This was because they have an
EditableText accessible role, which took precedence over their
editable status. To fix, if tabFocusBehaviour allows,
non-editable/readOnly properties should not receive tab focus no
matter the accessible role.
While at it, move the tabFocusBehaviour check inside
QQuickItem::canAcceptTabFocus.
Remove expect_fail in test covering case.

Note that this patch assumes that if tabFocusBehaviour ==
Qt::TabFocusAllControls readOnly text inputs will receive tab
focus on macOS too, even if this is never the case on a native
application: such inputs never get tab focus on Mac. We could
introduce a new enum value for tabFocusBehaviour that more
accurately depicts the readOnly text input focus behavior.

Pick-to: 6.5 6.8
Change-Id: I098f75eb118b04f73dae3deec0c798f18870a202
Reviewed-by: Jan Arve Sæther <[email protected]>
Reviewed-by: Tor Arne Vestbø <[email protected]>
Basic needs to depend on Templates, as it reuses the Overlay attached
object from there. At runtime, this already works, but tooling needs a
hint; otherwise it will only find the uncreatable Overlay type, not the
attached one.

Fixes: QTBUG-129799
Pick-to: 6.8
Change-Id: I536482cfebfde8a5b61adcc87e3fa2a0b33814ff
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
It's a rather intricate mechanism, so it's best to have it documented
for later memory refresh.

Task-number: QTBUG-128875
Change-Id: I1d66cc1f0453abfd80330ec4318c2af25a3609e3
Reviewed-by: Shawn Rutledge <[email protected]>
With this in place, we don't have to synthesize conversion origins
anymore and get to trace values through conversions.

Task-number: QTBUG-124670
Change-Id: Ib3646d410526eca7b982f86adef9d5a387ff56ea
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
With this in place we don't have to synthesize the QQmlJSRegisterContent
for base types anymore.

Task-number: QTBUG-124670
Change-Id: Iafc1838c64e6191bf9b84163e4c1b14ea14dd2c9
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
This property was added to QFontMetricsF in Qt 5.8, but was never added
to the Qt Quick API.

[ChangeLog][QtQuick][Text] Added FontMetrics.capitalHeight property to
match the QFontMetricsF::capHeight() property.

Change-Id: I9c348b05f9f6a52b6fc4645ca7f001d7cad87c41
Reviewed-by: Mitch Curtis <[email protected]>
Remove the two CMake warnings from the CMake output when building
QtDeclarative. The warnings come from a missing optional dependency for
the wearable example.

Pick-to: 6.7 6.8
Change-Id: Id9bf2ccc4d6db2ea44618b2119c69c89e271a870
Reviewed-by: Matthias Rauter <[email protected]>
Add a new logging category, "qt.qml.gc.stateTransitions", that can be
enabled to receive some simple log lines about the GC being on the
verge of executing the current state and about the new state that it
transitioned to after the execution.

As the new logs print the current state, which is stored through the
`GCState` enum, slightly modify the code to allow for registering the
enumeration with `Q_ENUM`.

In particular, move `GCState` and `GCStateInfo`, the latter due to the
dependencies between the types, under `GCStateMachine`.
Make `GCStateMachine` a `Q_GADGET` and `GCState` a `Q_ENUM` and provide
some using statements to reduce the impact of the changes.

Finally, fix the unqualified accesses to the variants of `GCState` to
support the new structure.

Task-number: QTBUG-128357
Pick-to: 6.8
Change-Id: I9d469ddb745f70b9c4553379f6d96719b3a2bb09
Reviewed-by: Fabian Kosmale <[email protected]>
Add a new logging category, "qt.qml.gc.forcedRuns", and issue a log line
when a GC run is forced to completion or fails to do so by being in a
critical section.

Task-number: QTBUG-128357
Pick-to: 6.8
Change-Id: I83ccb60636307e9e8f2aa47fdffb50e39b3e8f17
Reviewed-by: Fabian Kosmale <[email protected]>
Ulf Hermann and others added 30 commits November 6, 2024 10:00
This allows us to create value types with invokable copy ctors from
JavaScript objects that describe their properties. That way we now have
a full replacement for the Qt.foo() methods.

As a side effect, we support retrieval of enums for certain kinds of
broken value types now, if prefixed with a namespace.

Fixes: QTBUG-124634
Change-Id: If2a3c59d647e211ef5a0cd1ddee04b409d9ea5f3
Reviewed-by: Olivier De Cannière <[email protected]>
We can use the same lookup function as for the first inline, then
memberData case, but we have to store the ICs and offsets in reverse
order.

Amends commit 72bf928.

Fixes: QTBUG-130718
Change-Id: I3062fa740faa7693625523370014cb06653a79ba
Reviewed-by: Olivier De Cannière <[email protected]>
MSVC was warning about the concatenation as QTextStream does not have
anything against const char[] in QT_NO_CAST_FROM_ASCII mode.

Change-Id: Icbdde0c847354729558a263c793f4b28450d84d4
Reviewed-by: Fabian Kosmale <[email protected]>
If the user moves the Dialog using the mouse, and then tries to resize
it (also using the mouse), they will observe two issues:
1. As soon as resizing was started, the dialog jumped to the coodrinate
   specified by the x and y properties. Depending on the OS, it could
   jump back after the resizing is finished (Windows), or stay at that
   position (macOS).
2. If the resizing is started in such a way, that topLeft coordinate is
   involved, it didn't actually change (apart from jumping as described
   in point 1), but instead the width and height were changed in an
   unintuitive way.

The first problem is caused by the fact that
QQuickPopupPositioner::reposition() method used x and y properties to
get the requested position. However, when the dialog is moved using
the mouse, only the effective position is updated.

The second problem is more involved.
When the user starts resizing from the topLeft corner, we end up in
QGuiApplicationPrivate::processGeometryChangeEvent(), which registers
that both resize and move events have happened. The code processes the
resize event first, so here's what happens:
1. The window geometry is updated (we'll use that fact later)
2. The resize event is generated and sent.
  2.1. This resize event triggers QQuickPopupWindow::resizeEvent(),
       which updates the popup item's width and height.
  2.2. Each of width and height updates calls geometryChange(), which
       ends up in QQuickPopup::geometryChange(). That, in turn, calls
       QQuickPopupPositioner::reposition().
  2.3. The reposition() call changes the position of the popupWindow
       using the current topLeft value. IIUC, this schedules another
       system geometry change event to the event loop.
3. After that we're back to QGuiApplicationPrivate, and generate the
   move event.
  3.1. This move event is handled in QQuickPopupWindow::moveEvent(),
       which simply updates the effective position (without moving
       anything).
4. After that we handle the move event from the reposition() call
   (the one that is generated at point 2.3). And here we update the
   effective position back to the old value.

To fix both issues, use the fact that the window's geometry is actually
updated at the very beginning (point 1 above), so we already know
the new topLeft when handling the resize event.
Use this value to temporary update x and y member variables (directly,
without touching the properties), before setting the width and height.
That means that the reposition() calls will use the proper top-left
position to do the positioning. Once we're done, restore the actual
x and y values, because they can differ from the effective pos.
The fix is sub-optimal, but seems to have the least possible impact
on other code (like normal Popup behavior or general geometry updates
handling).

Writing unit-tests for such case is not really possible, since the
testlib does not allow to simulate the interaction with the
non-client part of the window, so simply provide a manual test.

Fixes: QTBUG-130623
Pick-to: 6.8
Change-Id: I8209c8a648d95f3b83ae15a77b48bf04eeb1c154
Reviewed-by: Oliver Eftevaag <[email protected]>
We might hit in default case, remove the unreachable return macro.
Otherwise, it crashes.

Pick-to: 6.8
Fixes: QTBUG-130880
Change-Id: I6cf568790e757ec5e65d3c380635cbd70191a227
Reviewed-by: Marcus Tillmanns <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
We want find_package(Qt COMPONENTS QuickEffects) to do something useful.
Otherwise people will have a hard time using the QuickEffects types with
qmltc.

[ChangeLog][Build System] QuickEffects is now an actual Qt module that
you can findPackage() without further gymnastics.

Fixes: QTBUG-130588
Change-Id: Ie0616a83124c3f1ee5145128acd95e8e4ebf3cd2
Reviewed-by: Kaj Grönholm <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Vladimir Belyavsky <[email protected]>
Change-Id: I65fe010323475b61fc71f20820c3e30c2ab93801
Reviewed-by: Olivier De Cannière <[email protected]>
For some reason the Java-based examples have one extra leading
whitespace character in the QtBuild task block in build.gradle(.kts).

Remove those because they don't look nice and parsing them requires a
bit more work.

Pick-to: 6.8
Change-Id: Ifbe5cd2e911612f83563a0cc3ec4b16138ce7e5e
Reviewed-by: Tero Koponen <[email protected]>
Reviewed-by: Assam Boudjelthia <[email protected]>
ReferenceObject is currently the backbone of the the write-back
mechanism.

Add some basic documentation on its purpose and usages to try and reduce
the complexity of approaching some of the dependent code that deals with
write-backs (e.g Sequence, QQmlValueTypeWrapper, ...) and to simplify
approaching a review or performing work related to write-backs, which
currently still require some development.

Change-Id: I56f346c29c79313ebc6181ab87b9f7369115ad83
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
TableView sections moving (QTBUG-100440) affected also TreeView so that
wrong cell index was edited.

Task-number: QTBUG-130589
Pick-to: 6.8
Change-Id: I88c7cbebc1409dcaa511b03038bf3875f0378b69
Reviewed-by: Santhosh Kumar <[email protected]>
Signal disconnection previously failed due to mixing string
based connection with function pointer based one causing
QQuickTextEdit::textChanged to be emitted multiple times

Fixes: QTBUG-130676
Pick-to: 6.8
Change-Id: I3f948aa4b37a9b3a9ddd6240e248fd96fee36175
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Coverity-Id: 469979
Coverity-Id: 469980
Change-Id: Ia26d66820b78a3ae9208c2a230bd2548fb9cbfc6
Reviewed-by: Ulf Hermann <[email protected]>
QQuickWindow's data is backed by its content item's data and QQuickItem
does not support replace() because it's not actually a list.

Amends commit 7e19885.

Fixes: QTBUG-130856
Pick-to: 6.8 6.5
Change-Id: I27dbf3666d9c40389ebf5b0259ee343868194c89
Reviewed-by: Semih Yavuz <[email protected]>
Reviewed-by: Olivier De Cannière <[email protected]>
We need to set any initial properties before we call
componentComplete() and we should assign a context to the object even if
it's loaded from a C++-based type. It can be the engine's root context
in that case.

Amends commit fa0be26.

[ChangeLog][QtQml] The QQmlParserStatus callbacks are invoked on objects
loaded using QQmlComponent::loadFromModule() at appropriate times now.
You can rely on any initial properties having been set before
componentComplete() is called and you can rely on the object having a
valid QML context.

Pick-to: 6.8 6.5
Fixes: QTBUG-130867
Change-Id: I3485a4305a583ce3cab7d83d8305503025004f44
Reviewed-by: Olivier De Cannière <[email protected]>
The bug occurred when dragging a column over a selected column cells.
The DropArea in TableView attempted to process inconsistent drag data
for all the selected cells (up to 1000), causing the application to
hang.

Fix: Enable DropArea only for dragging TableView cells; disable for
other cases.

Fixes: QTBUG-130928
Pick-to: 6.8
Change-Id: I162a57638d89b97f3f1ef553850e3be3be389f1d
Reviewed-by: Santhosh Kumar <[email protected]>
Pick-to: 6.8
Fixes: QTBUG-130900
Change-Id: I89ed8b8e75cc3401fa9b43277fce9e06c0e75549
Reviewed-by: Andreas Eliasson <[email protected]>
Coverity-Id: 469981
Change-Id: Ia69ad97306f63e0265a6b411646824fec90cc323
Reviewed-by: Olivier De Cannière <[email protected]>
macOS's Home/End bindings are explicitly disabled in QuickTextInput.
Uses setCursorPosition instead.

Fixes: QTBUG-82058
Pick-to: 6.8
Change-Id: I7b46f76ef2a28725384bd41f6f16e6b8f164b5da
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
We need to recurse into those in order to find components assigned to
properties of attached objects.

Pick-to: 6.8
Fixes: QTBUG-130839
Change-Id: Ie08e7f992a262fa338038bae41c293229d5e3606
Reviewed-by: Olivier De Cannière <[email protected]>
We can't have a '.' in the variable name. Use '_' instead. In addition,
disambiguate the names by always prepending a number to the part
extracted from QML. This is safe because QML names can't start with
numbers.

Pick-to: 6.8
Fixes: QTBUG-130838
Change-Id: I1243070a3cb901bc4c2c108ecbec0c9cbbc57a55
Reviewed-by: Olivier De Cannière <[email protected]>
Amends patch 9fd43c2

The test case added to verify the mouse propagation in the gap area
between the menu and its items doesn't work for styles (such as Universal)
as there won't be any border. Make this case conditional, so the styles
that don't support borders can skip it.

Task-number: QTBUG-130536
Pick-to: 6.8
Change-Id: I0f9657be3965e02c49578006fbe14b6eb0a7dd1f
Reviewed-by: Mitch Curtis <[email protected]>
The doc says real but the snippet uses an int - change the doc so it
also refers to int.

Change-Id: I4738c1c2978d7624028a211ea644854370675bc5
Reviewed-by: Luca Di Sera <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
When using the example code in listview-decorations.qml the result
does not look like as the attached screenshot: the gray highlight does
not extend until the end of the line, it stops at the end of the name.

Modify the snippet to match the screenshot.

Change-Id: Ib1b810381427fc37052c70082a8b1bba1d2fb4a6
Reviewed-by: Oliver Eftevaag <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
Move the logic that maps rows and columns to offsets (and backwards) to
SourceLocation static helper methods, and reuse them in qmllsutils.cpp.
This avoids the code duplication that happened in SourceLocation's
endZeroLengthLocation().

Also fix a bug where \r\n was confused with \n\r: \r\n is a windows
newline and counts as 1 instead of 2 newlines.

Fix a test that was confusing '\n\r' and `\r\n` (as the implementation
in qqmllsutils was buggy) and add two tests to avoid miscounting
newlines again.

Change textOffsetFrom() and textRowAndColumnFrom() in QQmlLSUtils to use
the implementation in SourceLocation and adapt the indexes (one starts
at 0 while the other one starts at 1).

Fix some tests in tst_qmlls_utils that were testing weird and invalid
edge cases that treats \r like a normal character and \n like a
character that can't be returned. Treat both \r and \n like characters
whose offset can be returned.

Adapt qmlls range formatting to the new behavior of testOffsetFrom()
that returns \n instead of \r when asking for the a character behind the
end of file. Add tests for files ending without newline and for
files with windows newlines. The files with windows newlines has two
expected outcomes: the formatted parts has \r\n newlines on windows and
\n newlines otherwise.

Pick-to: 6.8
Change-Id: I0ef42c1fc7073eb5fe25ceb893a5d24e976e45fc
Reviewed-by: Semih Yavuz <[email protected]>
Add SourceLocations for backticks (`), dollar braces (${), right braces
(}) and string parts in the dom representation of template literals.

Extract those tokens via post-processing during the dom construction
from the lexer sourcelocation. For example, `a${b}c${d}e` makes the
lexer generate string literal tokens for "`a${", "}c${" and "}e`".
I believe dad5d1c had good reasons to
lex them this way. We can extract all the token information we need
from that once we know if the string literal is at the beginning,
the end or in the middle of the template literal.

This is required to implement semantic highlighting of template
literals in qmlls.

Adapt qmllsutils to the change in template literals.

Pick-to: 6.8
Task-number: QTBUG-124629
Change-Id: I05469566756df3b3b0eeb993588546c1be7887fc
Reviewed-by: Semih Yavuz <[email protected]>
Currently, the Styling Qt Quick Controls docs contain a code snippet
to show how to import a style.

This fix adds a comment to the code snippet to let users know that
the style import should precede all other imports. If the user imports
something else before the style import, the style does not display
correctly, namely, some of the controls follow the style, whilst some
do not.

Fixes: QTBUG-130792
Pick-to: 6.8
Change-Id: I556fc987fe7c15193aa2657fc76b61079acd72f4
Reviewed-by: Mitch Curtis <[email protected]>
Change commandline option to -d and make it accept value.

Pick-to: 6.8
Task-number: QTCREATORBUG-31897
Change-Id: I275a4a8274034dc58528aa5b55b5b1814e23788f
Reviewed-by: Sami Shalayel <[email protected]>
This amends 74ec76d.

Task-number: QTBUG-128221
Pick-to: 6.8
Change-Id: Ia7ccf4212fdca35fb3ecaae8e97bb046765b61ba
Reviewed-by: Sami Shalayel <[email protected]>
QQuickwidget manually keeps the window contentItem size in sync with the
window whenever the window resizes. This is needed as resizeEvents are
not sent for non-platform windows which normally takes care of the sync.

The initial setGeometry call changes the window size without the
contentItem size. This leads to the wrong contentItem size until the
widget resizes later.

Fixes: QTBUG-128935
Pick-to: 6.8
Change-Id: Ib184b5d0ced7c3609705abb3ad8e3d621a39a761
Reviewed-by: Oliver Eftevaag <[email protected]>
Add a new element into QtQuick.Effects called RectangularShadow.
This is a high performance shadow/glow for (rounded)rectangle
shapes.

Differences compared to QGE RectangularGlow:
- Implemented in C++ and part of QtQuick.Effects module.
- Different API, modelled based on CSS box-shadow.
- Shader uses SDFs math for rounded rectangle. Reduced item size
  and properly rounding math (circle is a circle).
- Allows offset and spread relative to item.
- Default color is black (shadow) rather than white (glow).
- Using "layer.enabled" for cache property rather than separate
  ShaderEffectSource.
- Property "material" so shader effect can be customized. QQEM
  can contain RectangularShadow node for easier customization.

Contains an example and lancelot tests.

Task-number: QTBUG-128469
Change-Id: Ie3baa774a3294ba0c7fe11d1bee8cd7aae897505
Reviewed-by: Kaj Grönholm <[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.