-
Notifications
You must be signed in to change notification settings - Fork 180
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
rjcamatos
wants to merge
10,000
commits into
6.2
Choose a base branch
from
dev
base: 6.2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
Remove the broken qt_import_plugins() call that was not doing anything, and add a dependency to QmlCompiler to add qmllint plugins to static qmlls builds. The plugins are automatically collected and linked into static builds using CMake-magic if the correspondings libraries are used for qmlls. Therefore add QmlCompiler for the qmllint plugins as LIBRARIES to qmlls. Technically, QmlCompiler is an indirect dependency as its actually needed by QmlLSPrivate library. Fixes: QTBUG-129603 Change-Id: Icfecebac8790d6e238531ae9bf4083e145d57f11 Reviewed-by: Alexey Edelev <[email protected]>
Added a delay to the "closed" signal with Qt::QueuedConnection so that "triggered" signal could be handled before close. Fixes: QTBUG-128158 Change-Id: Ia4185198fa523a9c87bf56b61a63e9461412d478 Reviewed-by: Mitch Curtis <[email protected]>
There actually is a code path that returns it as-is and that saves a copy this way. Coverity-Id: 469518 Coverity-Id: 469514 Change-Id: I50bcfe6c30648baba192233003d4a77fb8a4d048 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
Use QPointF instead of QPoint for accurate mapping of coordinates. Amends 317ae95 [ChangeLog][QQuickItem] The function mapToItem(item, real x, real y) now returns a point with real values instead of rounding to an integer. Fixes: QTBUG-119034 Pick-to: 6.8 6.5 Change-Id: I2c11ec03bdc925c55f48f309f22083b754023cf0 Reviewed-by: Shawn Rutledge <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
Split the test up in multiple tests, and move the test files in separate folders (as the data folder is already way too big). Change-Id: Id6c22e4e0c60fb8115c15c1a19ad10b454fbd3fc Reviewed-by: Semih Yavuz <[email protected]> Reviewed-by: Olivier De Cannière <[email protected]>
This broke after 477c15d. countChanged would have normally been emitted in the call to applyModelChanges that we skipped after adding the q->size().isNull() check. We can check hasPendingChanges() to know if a count change is pending (which is also the first thing applyModelChanges checks before doing its work), and if so, emit countChanged so that any bindings that are relying on it can function as expected. Fixes: QTBUG-129165 Pick-to: 6.8 6.7 6.5 Change-Id: Ic045f1870b39d192f6880e23daab03fd73a16d58 Reviewed-by: Fabian Kosmale <[email protected]> (cherry picked from commit 0a1d8fb)
Pick-to: 6.8 Change-Id: I40c103020432540c038932a4fe0516cac3b1ad3b Reviewed-by: Volker Hilsheimer <[email protected]>
This is the first step in chaining up the values in a graph. We can only derive the next node of the graph if we have a full previous node. QQmlJSRegisterContent will ultimately just be a container for a node. Prepare for this by requiring QQmlJSRegisterContent as input when creating a new register content. In some cases we can't actually nest contents, yet. Therefore we chicken out by creating synthetic QQmlJSRegisterContents. Task-number: QTBUG-124670 Change-Id: Idad793692ca78d71ba17107d396e508bc1392b67 Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
Also skip the first paragraph if it starts with <p><b>. The actual documentation usually starts in the second paragraph if the first paragraph contains the <b>. This will remove the warnings contained in any accompanying (\note or \warnings) text box. Also, this post processing only happens in HtmlExtractor::Simplified mode. Pick-to: 6.8 Task-number: QTBUG-120016 Change-Id: I367f8aded68972d34f31ed380ed3317865c289f3 Reviewed-by: Sami Shalayel <[email protected]>
There are two ways to obtain the help through help plugin. The first is querying the keyword which will probably give a hell of a lot resulting results to be processed. Better way is to search the keyword by id which will give the precise documentation for the given name. id's are kept in the form of DocumentName::keyword form in the relavant .qhp file. So, to get the correct documentation for an identifier, one should find the defining scope for that identifier and try to get the relavant link by searching DefiningScopeName::identifierName. Documentation for most of the qml properties are found in the Qml named namespace in the .qhp file. For example, x,y,width,height of an Item are defined in QQuickItem scope but documentation doesn't exist for QQuickItem::x, but for Item::x. To get the proper mapping, utilise typeResolver->importedNames() method and introduce the m_cppTypesToQmlTypes hash map. Pick-to: 6.8 Task-number: QTBUG-127051 Task-number: QTBUG-120016 Change-Id: I27d4c60b11cd2aff4b4cb8a19ab9817519799e06 Reviewed-by: Sami Shalayel <[email protected]>
Pick-to: 6.8 Fixes: QTBUG-128797 Change-Id: I53ac0af6f98c6ad291762d4ea8d195529b84c51a Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
This is necessary after 0b7ee7a. If QQuickPointHandler::wantsEventPoint() ever returns false, QQuickPointerHandler::handlePointerEvent() calls setActive(false). If AA_SynthesizeMouseForUnhandledTabletEvents is enabled, and PointHandler is the only handler trying to handle tablet events, it does not accept the events; so QGuiApplicationPrivate::processTabletEvent() sends a synth-mouse press for each tablet press. If the position doesn't match the last-known mouse position, QGuiAppPriv::processMouseEvent() sends a synth-mouse move, too. PointHandler doesn't care about either of these synth-mouse events, but it has to say that it "wants" them to avoid getting deactivated. But in spite of that, we don't want QQuickSinglePointHandler::handlePointerEventImpl() to call QQuickHandlerPoint::reset() with those synth-mouse events, because then the tablet-specific data from the previous QTabletEvent would get overwritten. In general, pointer handlers handle original device-specific events only, and we just have to avoid letting these synth-mouse events interfere. There were a couple of places that were assuming that if an event is not a QTouchEvent, then it's safe to cast it to QSinglePointEvent; that's usually true, but isSinglePointEvent() exists since qtbase 9a1a15b42fb526ad4f80944afb7761bfff1b5c9d so we might as well use it. Previously, we'd set acceptedButtons: Qt.LeftButton | Qt.RightButton to indicate that the PointHandler should respond to either one; but now it's better to set Qt.NoButton to indicate that it doesn't care. The synth-mouse move has no buttons set; if PointHandler only "wants" events with specific buttons, that buttonless move will deactivate it temporarily, and then the synth-mouse move would re-activate it, causing extra activeChanged and pointChanged signals. But so far, its default for acceptedButtons is still Qt.LeftButton. Perhaps we should change it. The special meaning in QQPointerDeviceHandler::wantsPointerEvent() for Qt.NoButton started already with HoverHandler in 1982d1b and then fc636af for PinchHandler. Those handlers fundamentally don't need to care about buttons, so they declare it by setting acceptedButtons = Qt::NoButton in their ctors, and the user should not set it differently; whereas with PointHandler, we do expect the user to set acceptedButtons. tst_PointHandler::tabletStylus now has code to test both with and without AA_SynthesizeMouseForUnhandledTabletEvents. But in the "true" case (the default), it won't pass until we also change QGuiApplicationPrivate::processMouseEvent() to send synth-mouse-moves from the same device that sends the mouse press, which itself is synthesized from the tablet press. [ChangeLog][QtQuick][PointHandler] If PointHandler is declared with acceptedButtons: Qt.NoButton it now means that the PointHandler does not care which buttons are pressed or not pressed: but it ignores synth-mouse events and responds only to events that come from the appropriate kind of device. If specific acceptedButtons are set, synthetic mouse-moves can deactivate it temporarily. Pick-to: 6.8 Fixes: QTBUG-111336 Change-Id: Ic48565f74d247803e338d2e368a5ef9d249296c2 Reviewed-by: Doris Verria <[email protected]>
Amazingly, all it takes is to import the QtQuick.tooling module into a namespace. As a drive-by, also fix the public/private #define'ery in tst_toolsupport.cpp. That's quite wrong. Fixes: QTBUG-129196 Change-Id: I29785f068b88820926356fe5facd871187a56ea1 Reviewed-by: Olivier De Cannière <[email protected]>
There is only one JS global object. We should not re-create the value whenever we use it. This removes some syntheticType(). Task-number: QTBUG-124670 Change-Id: If0ea6dee9a46a7b9f9442834cd6f44a5713c6b0a Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Olivier De Cannière <[email protected]>
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]>
Fixes: QTBUG-128577 Pick-to: 6.5 6.8 Change-Id: Ib6d97450e8aa6e55531ff5a20d86105e4f2db565 Reviewed-by: Oliver Eftevaag <[email protected]>
Task-number: QTBUG-124453 Task-number: QTBUG-125211 Pick-to: 6.8 Change-Id: Ib9b6b615359e8044e8ef9703984c14cc53411e42 Reviewed-by: Ulf Hermann <[email protected]>
After QTBUG-128866 it seems that all times we use `LineWriterOptions::Update::None` meaning that not any of the if-s or flags checks on the LineWriterOptions are applicable. At least for the current production usages (QmlLS, qmlformat) This opens a great possibility of removing it completely along with other aux entities (see patches in the chain) Thoughts: Probably in the beginning it was intended to have a capability of changing items / expressions etc. in order not to reparse / rebuild DOM again after reformatting. AFIK atm we do not support any incremental parsing or changes in the DOM / QmlLS, but also this functionality was hard to deal with, therefore it's arguably a better option to remove it. Change-Id: I00725f012f1860eafd5609e4352bce4880f3ccb3 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Semih Yavuz <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
After the previous patch reformattedScriptExpressions are not modified (it seems that they have never been modified even before), therefore there is no need in storing them and handling, esp. taking into account how complicated they are. Change-Id: I243ceeac8073de110cdf4300b33a5bc577a8de58 Reviewed-by: Ulf Hermann <[email protected]>
Removing now redundant DomType Change-Id: I06836dcc6e076bb29fddbb3f7251b5d9f4cbc786 Reviewed-by: Ulf Hermann <[email protected]>
Previously it was taking care of updatedScriptExpressions, which in reality was not changing because of the in production paths we are using LineWriterOptions::updateOption::None. Change-Id: I6ed070f020bd50723f2186c28ba4dd2a2d7d36b2 Reviewed-by: Sami Shalayel <[email protected]>
This condition was confusing because of the flags and bitwise operators, leading to some misunderstanding and temptation to remove this completely. Simplifying this condition. Change-Id: Ic34091321fd870905fd07c862aa888f0136d85b3 Reviewed-by: Sami Shalayel <[email protected]>
Removing currently unused WriteOutChecks. Even though some of these could be helpful at later stage during the testing, this should be then located in the testing utils and not in the production code. Change-Id: Ibe66eba9822188bc072c65b2f7ecb2a8dd3c2d1e Reviewed-by: Sami Shalayel <[email protected]>
The function now accepts two arguments, but not one. The second argument is the main plugin target that the object library belongs to. It's used to keep the set of flag-controlling properties consistent between object library and plugin. Change-Id: I6e1aea2734f4155c6687b1867243d019a66b1106 Reviewed-by: Alexandru Croitor <[email protected]>
There is potential memory leak on updating a list of QQuickScreenInfo objects in QQuickApplication::updateScreens(). When updating the list we try to reuse existent screen info objects by simply resizing the list and creating new objects when needed. But we forgot to delete unused objects when the list shrinks. To fix this we just wrap QQuickScreenInfo pointers to std::unique_ptr in order to enable automatic memory management. Change-Id: Ib07afe66f269863f728824903c0b50b6206a05e8 Reviewed-by: Shawn Rutledge <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
This change is similar to the one made to tst_qmlcppcodegen. Hopefully, after this change, we will no longer let ASCII_CAST mistakes through in any of our generated code. Enabling this has already uncovered additional non-QStringLiteral'ed strings in the code qmltc generates. They have been extracted to the previous commit for easier CI integration. Task-number: QTBUG-130081 Pick-to: 6.8 Change-Id: I90c76405ba15ac23ffc76c5a37137e4bb60bf42e Reviewed-by: Sami Shalayel <[email protected]>
Change-Id: I7285055d42520b339f95e23e618f3e3b8461ebb8 Reviewed-by: Qt Submodule Update Bot <[email protected]>
Those are simply QList<qreal>. No need to wrap and unwrap those. Change-Id: I624a0df34ee7c72920e02d9d81f61318fc95b6e4 Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
Make all the wrappers derive from the actual value types so that our casts become defined behavior, and add constructors that take the actual value types, so that you can construct them from object literals. Task-number: QTBUG-124634 Change-Id: If04402b60ece9f54997e00aacab8ea9186e7887a Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
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]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.