-
Notifications
You must be signed in to change notification settings - Fork 191
Calls order of q_invokable method #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.2
Are you sure you want to change the base?
Conversation
Qt Submodule Update Bot 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. |
Remove the unused arguments and run clang-format on it. Task-number: QTBUG-134669 Change-Id: I1aff620feb26a160f4330807a56a5985c7c5fc12 Reviewed-by: Ulf Hermann <[email protected]>
Prepare for the splitting of tst_qmlformat into tst_qmlformat_cli by extracting common functionality into a base class. Task-number: QTBUG-134669 Change-Id: I66a72b128802a51b0289320e6022bd69c6cfe4ff Reviewed-by: Ulf Hermann <[email protected]>
Prepare for the splitting of tst_qmlformat into tst_qmlformat_cli by moving the base into a header. Task-number: QTBUG-134669 Change-Id: I76fbdf2f9d31a2e160d6ae0389a409c2214d36da Reviewed-by: Ulf Hermann <[email protected]>
Move the tests that require spawning a qmlformat process into tst_qmlformat_cli. Fixes: QTBUG-134669 Change-Id: I38f2e624bcd6152074604663bc4a626783097bda Reviewed-by: Ulf Hermann <[email protected]>
Make qmllint complain about bad qmldirs: don't ignore warnings emitted by qqmldirparser, and adapt a test where a missing trailing `/` in a prefer directive leads to a test failure because of a qqmldirparser warning that now gets emitted by qmllint. Pick-to: 6.8 6.9 Change-Id: I85f0dd53ba887d1f01ce9ef9a9475d58e3f97208 Reviewed-by: Ulf Hermann <[email protected]>
Add dummy .ini files in the tests to stop tooling (qmllint, qmlls and qmlformat) from loading global settings. This avoids false positives where tests fail because the global configuration of these tools differ from the default one. Also copy the settings files in tests that copies the qml files into temporary folders. Change-Id: Ia904c6d4eda265e2080c1080c6b51849ab568d25 Reviewed-by: Ulf Hermann <[email protected]>
Add a private helper method emitWarningWithOptionalFix to emit warnings with optional fix suggestions. Task-number: QTBUG-129307 Change-Id: Ifdcb3ccac8c857f06d3ccb658042b8376283fb26 Reviewed-by: Ulf Hermann <[email protected]>
Implement the ErrInvalidColor warning in qmllint via the quick plugin, where literal strings assigned to colors are checked for correct color names. Add an assert in the constructor to make sure that the colors are sorted. We use a QStringList instead of a constexpr std::array to store the const list of color names because we need a QStringList for the "Did you mean" suggestions anyway. Task-number: QTBUG-129307 Change-Id: Ifbe0ce7f5158be7dae524889944f351184cc8559 Reviewed-by: Fabian Kosmale <[email protected]>
Complain about ids in qmllint that start with an upper case letter. Task-number: QTBUG-129307 Change-Id: I4cee3201d369692ead60cfcdebacf587b6d73491 Reviewed-by: Ulf Hermann <[email protected]>
Add a missing newline in the template of cleanJsSnippet() to make debugging easier: warnings that shouldn't be there have the same column number as in the snippet. This helps during debugging of broken tests to try to find out which location triggered the warning. Change-Id: Idbfdf4df49c346219dae5f4119af3f58004941e6 Reviewed-by: Ulf Hermann <[email protected]>
So far, QLastCursorPosition's default constructor is using a large number to indicate that the mouse position is unknown (presumed offscreen until we know better); but using its overridden operator== should be more stable than comparison with some other big number that we hope is a little smaller. This reverts commit 7b6622f. Task-number: QTBUG-134878 Task-number: QTBUG-134718 Task-number: QTBUG-125906 Change-Id: If4f41517ac7e631421128c251e34e5efc002c394 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
Change-Id: I0b84b70c9a02f57b81a602b756b0737859765c93 Reviewed-by: Qt Submodule Update Bot <[email protected]>
If someone touches this code they should know about the considerations outlined in the bug report. Task-number: QTBUG-131478 Change-Id: I5004182ec745fd3a9f1ad201439cf509de69660d Reviewed-by: Oliver Eftevaag <[email protected]>
…opes If a type with required properties is accessed via a grouped scope, we can't know whether the object already exists, or whether it would need to be created. Avoid false positives and don't emit a warning when we encounter a grouped property scope, or any non-QML scope. Non-grouped, non-QML scopes should not trigger the issue, but don't need to be checked either, avoiding some needless work. As a drive-by change, don't put spaces into a data test tag (which does not play nice with running the test separately). Amends daf57e2 Pick-to: 6.8 6.9 6.5 Fixes: QTBUG-134887 Change-Id: I747239c5d72993cf9a1563c875cefaf89c8e52a2 Reviewed-by: Olivier De Cannière <[email protected]>
The QML module does nothing fancy in its plugin, so there's no reason to claim that the plugin is mandatory. Pick-to: 6.9 Change-Id: I850c6d74c2c5254df748897cb2987df8a5fccfce Reviewed-by: Ulf Hermann <[email protected]>
It's not clear at this point where qt.png was supposed to come from, but the modern Qt logo seems to work well enough. In the case of Item with two transforms, perhaps this was not tested before; that's the trouble with inline qml code. It's a little easier to visualize the effect with an Image of which you can see more than one edge (although parts of it remain hidden now too). Pick-to: 6.9 6.8 Change-Id: I64c685d4dc9568080b0ddb4921d987b07eb17c41 Reviewed-by: Paul Wicking <[email protected]>
Add the actual types involved in the attempted conversion, rather than just saying that it couldn't be done. Before: "Could not convert argument 0 at" "expression for onCompleted@qrc:/qt/qml/quick2/Main.qml:34" qrc:/qt/qml/quick2/Main.qml:34: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed. After: "Could not convert argument 0 from QQmlComponent(0x5b72731bd710) to QQuickItem*" "expression for onCompleted@qrc:/qt/qml/quick2/Main.qml:34" qrc:/qt/qml/quick2/Main.qml:34: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed. Pick-to: 6.8 6.9 Change-Id: Ia4144ad61332e53c662a280dd8b68dc99aa09cf8 Reviewed-by: Ulf Hermann <[email protected]>
If the root object of the Qml document is unknown to QQuickWidget, it produces a segmentation fault, since obj is deleted once in the setRootObject method, and once when its unique_ptr goes out of scope. Fixes: QTBUG-133832 Change-Id: I828616b390348762b144f81ed43e1883ecf38584 Reviewed-by: Mitch Curtis <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
Since we need to do this when destroying other context objects, we probably need to do it for QQmlDelegateModelItem as context object, too. Amends commit 27ba69a. Pick-to: 6.9 6.8 Change-Id: I2f331829f8af5e591ce392686c3a36401a0ba856 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Dominik Holland <[email protected]>
Commit 48cb120 broke focus transfer within an edit delegate, since we would always close the editor upon receiving a focus out event. A typical use case is an edit delegate that contains an editable ComboBox. In that case, focus will be transferred within the delegate if the combo's textfield gains focus. This patch will make sure that we only close the editor if the edit item as a whole loses focus. Task-number: QTBUG-134247 Pick-to: 6.9 6.8 Change-Id: If092ca91a96667eb2ee8ba271a2239086f5a2998 Reviewed-by: Shawn Rutledge <[email protected]>
Change-Id: I832d803d0db7c588235d26aa70426ef2073d2dae Reviewed-by: Qt Submodule Update Bot <[email protected]>
The QQuickBasicStyle class is no longer necessary since the Basic style now supports palettes. This class was retained temporarily to allow users who had customized the `.qml` files sufficient time to migrate their changes. Enough time has now passed for migration, making it appropriate to deprecate and remove this class. See also this commit 57f0da5 Task-number: QTBUG-135207 Task-number: QTBUG-63369 Change-Id: Ida7cd3d7bc63d307a1b99d667fdf3ad14f156132 Reviewed-by: Mitch Curtis <[email protected]>
Since StandardKey.HelpContents has two key bindings (at least on ubuntu) then setting `sequences` removes the warning. Change-Id: If4fb733fe562f1fc56af0d53ae029fa3bd32c0e0 Reviewed-by: Santhosh Kumar <[email protected]>
In SVG, two subsequent identical gradient stops means a hard transition to the color of the second at that position. However, this is not the case in Qt and because of the way we sort the gradient stops, the order of the two identical stops will be wrong. This is addressed by adding an epsilon to identical stops in Qt Svg, but the epsilon is FLT_EPSILON, which is around 1e-7. The default output precision for doubles in Qt is 6, so when storing the numbers to file, the epsilon would be lost, the two positions would be considered identical and the reordering would happen. This caused a visual error when running svgtoqml on the paint-grad-16-t.svg test. Pick-to: 6.8 6.9 Change-Id: I857958512c3de7dc843a705893b4c2d7d2a36fd4 Reviewed-by: Eirik Aavitsland <[email protected]>
The miterLimit in Qt Quick Shapes is an int, so if we generate fractional numbers in the QML file, that will lead to a parser error. This was reproducible by running svgtoqml on paint-stroke-07-t.svg. Pick-to: 6.8 6.9 Change-Id: Ia03cbba7f70f687dc93ac20b86314dae1fbc30d3 Reviewed-by: Eirik Aavitsland <[email protected]>
We need a generalized way of doing animations to simplify adding animations for other properties. In order to be as expressive as possible we need to just pass the animation info on to the generator and let it handle it. If there are multiple animations affecting the same property at the same time, we just instantiate them in Qt Quick and let its engine handle the conflict. This means that the only way to implement special SMIL conflict behavior such as add/replace is to create specialized animation classes in Qt Quick. We can do this at a later stage if it becomes a priority. The main use case of having multiple animations affecting a property at different times should be covered by this implementation, it should be easy to expand to new types, and it should be easy to add stuff like easing curves to it. Change-Id: I927ea2cef214a300ae8fae3f76ee87fb5d505b3d Reviewed-by: Hatem ElKharashy <[email protected]>
The tst_customization suffers from severe performance issues in static builds. Memory is not properly released between test cases, causing the number of composite singletons to grow continuously and leading to dramatically increased execution times. Task-number: QTBUG-133755 Change-Id: I5bb23d69602ade942adf2c6c2a029b8612ad2e9a Reviewed-by: Fabian Kosmale <[email protected]>
This commit should make implementing small PropertyPasses easier: instead of having to create a new class and registering the PropertyPass into the PassManager, create a Builder that creates a PropertyPass from lambdas and registers it into the pass manager. This avoids having to create a new class inheriting from PropertyPass for each check that will be added with QTBUG-129307. Also add a method to PassManagerPrivate to be able to register propertypasses on builtin objects. This is needed to warn about usages of 'eval()' in a later commit. Task-number: QTBUG-129307 Change-Id: If3ea8d092acae4733aacd62ca7769011f0a7633c Reviewed-by: Fabian Kosmale <[email protected]>
Previously, prepareEnterTransition would reparent the popupItem before saving window->activeFocusItem(), which could shift focus into the popup and cause the saved focus to fall back to the window contentItem. In particular, during reparenting focus may be set if user code calls forceActiveFocus, for example, in the onVisibleChanged handler. The activeFocusItem is now captured before reparenting and stored in lastActiveFocusItem. Pick-to: 6.9 Change-Id: I6f4691e871661b6ba66b43ed720dc771a65ae3ed Reviewed-by: Tor Arne Vestbø <[email protected]>
Non-modal popups were saving lastActiveFocusItem but only clearing it if *they* had focus when closing. If focus moved away while open, the stale focus stuck around and got restored on the next close. Introduce a savedLastActiveFocusItem flag in QQuickPopupPrivate. Set it when we record lastActiveFocusItem in prepareEnterTransition(), and in finalizeExitTransition() only clear the overlay's saved focus if this popup actually set it. For stackingOrderPopups, add an additional check which avoids setting active focus to a popup which has already gained it during open. This allows lastActiveFocusItem logic to take place instead. This scenario happens with menu popups using exit transition (e.g. Material style). Pick-to: 6.9 Change-Id: I81caf1b5e647b3794ac8d03888534501c771ae07 Reviewed-by: Tor Arne Vestbø <[email protected]>
Add a nullptr check in finalizeExitTransition to prevent potential dereferencing of a null pointer when destroying a window. Pick-to: 6.9 Change-Id: I05b8e266df93df873af96c6f5692b2fd519d3bbf Reviewed-by: Santhosh Kumar <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
Pict-to: 6.9 Change-Id: I4a3147a11d36ed6db94b454581ee4dee0a8730e4 Reviewed-by: Santhosh Kumar <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
Task-number: QTBUG-136447 Change-Id: I8abecb89bf844dd0e98b6f947b63107fce4db15d Reviewed-by: Axel Spoerl <[email protected]>
QTest::createTouchDevice() passes ownership of the device to the caller, so make sure it gets deleted. Pick-to: 6.8 6.9 Change-Id: I1289def6b40bf688a7334b9997f7e4319516d018 Reviewed-by: Axel Spoerl <[email protected]>
Change arch build type of qmltestrunner to match the target and not host. This amends 3e2a853. Task-number: COIN-1211 Change-Id: I4cac9d0d664ea14bd95cea10936d790ab1d33d4a Reviewed-by: Alexandru Croitor <[email protected]>
Enter transitions may want to animate the Menu's height based on its implicitHeight. The Menu's implicitHeight is typically based on the ListView's contentHeight, among other things. The docs for ListView's forceLayout function say: "Responding to changes in the model is usually batched to happen only once per frame." As e.g. NumberAnimation's from and to values are set before any polishes happen, any re-evaluation of their bindings happen too late, and the starting height can be out-dated when menu items are added after component completion (QQuickItemView::componentComplete does a layout, so items declared as children aren't affected by this). To account for this, this patch forces a layout before the transition starts, if necessary. Fixes: QTBUG-136256 Pick-to: 6.5 6.8 6.9 Change-Id: I1cc912347b774369b3542f0d32c654ae5615b97a Reviewed-by: Richard Moe Gustavsen <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
Change-Id: If8d5e4187c1c5e361e8160b8f472ffda74c0f149 Reviewed-by: Qt Submodule Update Bot <[email protected]>
Change-Id: I8364e33cb2bffd528e73c1fd1e46fa8b3663e951 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
We shouldn't store property indices in the compilation units. That makes the system brittle and vulnerable to changes in unrelated code. Rather, we should always resolve aliases from names at run time. We can store the alias target property indices in the property caches. That's where they belong. This means we need to add the alias properties to the property cache right when we resolve the aliases since we can't communicate the property indices back anymore. Task-number: QTBUG-135286 Change-Id: I1d25f66ee06cff3fdf958f766c62cb99a30f6720 Reviewed-by: Fabian Kosmale <[email protected]>
When we introduced value type lists, we didn't adjust the QQmlProperty code which assumed that any list property could be represented as QQmlListProperty. This was of course no longer the case, and attempting to use it with such a property would result in UB, and most likely in crashes. Fix this by detecting what kind of list we are dealing with. Pick-to: 6.9 6.8 6.5 Fixes: QTBUG-136735 Change-Id: I1e4531da3e5f26994809f02d630820541849691c Reviewed-by: Ulf Hermann <[email protected]>
The CMakeLists.txt errors out if the plugins aren't available => expect the test to pass only if the needed features for building the plugins are set. Amends: 0170258 Task-number: QTBUG-136101 Change-Id: I440c45f6b1f7345c1ae963b7f3756675dafc72b7 Reviewed-by: Alexandru Croitor <[email protected]>
As it won't pass without it. Task-number: QTBUG-136101 Change-Id: I4a3454244fec97e624ed14e61138516c304f33d7 Reviewed-by: Fabian Kosmale <[email protected]>
Since we don't store any property indices in the compilation units anymore, we don't need to hash the dependencies anymore. Task-number: QTBUG-135286 Change-Id: I2ea05c920475749f2a2d6cf309d0956a74d6c688 Reviewed-by: Fabian Kosmale <[email protected]>
When the thread is not running yet, we indeed have to set the window pointer. And we can do that without mutex/atomic because starting the thread is a synchronization point. When the thread is already running, however, writing into 'window' races with reads of that variable in the thread. But it's useful to do that, after the thread handled a WM_Obscure event which set the window pointer to nullptr (testcase: tst_qquickwindow destroyShowWithoutHide). We need to set it again if the window is exposed again: use an event to do this in a thread-safe way. WARNING: ThreadSanitizer: data race (pid=427588) Read of size 8 at 0x723400006048 by thread T11: #0 QSGRenderThread::syncAndRender() qsgthreadedrenderloop.cpp:802 Previous write of size 8 at 0x723400006048 by main thread: #0 QSGThreadedRenderLoop::handleExposure(QQuickWindow*) qsgthreadedrenderloop.cpp:1294 Pick-to: 6.9 6.8 6.5 Change-Id: I145bb499628fc0c95c4362a32aecdc7c3d688677 Reviewed-by: Laszlo Agocs <[email protected]>
Add semicolon option to qmlformat. While --Always always appends semicolons to the JS statements, --essential removes the semicolons unless it is not safe to rely on ASI once semicolons are removed. Change the way EmptyStatements are handled. Prior to this commit, semicolons following if, for, foreach, while statements without bodies were added to the new line with some indentation. Make the semicolon following no-body items stick to the right paranthesis. If there is a chain of empty statements, write out a single one. [ChangeLog][qmlformat] New option semicolon-rule is added and EmptyStatement formatting behavior has changed. * Added --semicolon-rule option with modes: - --semicolon-rule=always: Always appends semicolons to JS statements. - --semicolon-rule=essential: Removes semicolons unless ASI makes it unsafe. * Changed handling of EmptyStatements: - Semicolons after control structures without a body (e.g., if, for, while) now appear directly after the closing parenthesis, instead of on a new line. - Consecutive empty statements are collapsed into a single semicolon. Fixes: QTBUG-107152 Change-Id: Ic95047a1f0077937d4c1f01328d77a3e6a4f22d6 Reviewed-by: Olivier De Cannière <[email protected]>
Task-number: QTBUG-107152 Change-Id: Ib858cfa67041f8dc54afbc00ae9527cf1939a6db Reviewed-by: Sami Shalayel <[email protected]>
Having a valid scope is not guaranteed. Check pointer validity before dereferencing it. Fixes: QTBUG-136552 Pick-to: 6.8 6.9 6.9.1 Change-Id: I401a5f96c96b3a7a880145151a1f7cb55b196df0 Reviewed-by: Olivier De Cannière <[email protected]>
Pick-to: 6.8 6.9 6.9.1 Fixes: QTBUG-136192 Change-Id: I3a5a53c5c127f63d79656b8c13c677ee2779f28b Reviewed-by: Fabian Kosmale <[email protected]>
Amends f86d1a5 Pick-to: 6.9 Change-Id: I153228bb7bab2f853b35d7d0bbfc76bd64088497 Reviewed-by: Alexandru Croitor <[email protected]>
Test the case when `qt_target_sources` is run only in a subdirectory Change-Id: I27546c484ff52357a376ec9fadc7e9212b01a034 Reviewed-by: Joerg Bornemann <[email protected]>
This should already be called only once per module definition. This ensures that all definitions were done in the context of the qt_qml_add_module call. This fixes the dependency cycle with subdirectory qml target. Change-Id: I8e25c889245787fec4dfe27fe60c8ecf3ba4cbf7 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>
Effectively undo eeb320b and 3df5ad9. None of this is relevant to Qt 6 since 331e2ef because the basic render loop also uses dedicated GL contexts per window now. Important in particular because 3df5ad9 causes regressions in certain cases, when there are multiple windows with one becoming dirty and hidden, preventing deleting the QSGTextures. The patch must not be applied to Qt 5. There the basic loop uses one context for all windows, and so the original fix is important to have. The problem of not releasing textures should be solved in another way for Qt 5. Change-Id: I440836605121d50c6d059d383975249cc070ac25 Reviewed-by: Andy Nichols <[email protected]>
Pick-to: 6.9 6.8 6.5 Fixes: QTBUG-128864 Change-Id: I18b228579d871e4db259c2eeecf56ef4218fb92a Reviewed-by: Andy Nichols <[email protected]>
… too The expectation with setDefaultAlphaBuffer(true) is that alphaBufferSize becomes > 0 in the window's format. Follow this with the software backend too. (because it may matter for the backingstore) Pick-to: 6.9 6.8 Task-number: QTBUG-136755 Change-Id: I07ff34056ea51182c2542a259084dcd746d0450e Reviewed-by: Andy Nichols <[email protected]>
This seems to be a left-over from the 'Qt Quick Calendar' extension that is not supported anymore since Qt 6.3 (?). While at it, rewrite the whole paragraph for brevity. Pick-to: 6.9 Change-Id: Id1bef92d2e745fc4cbf761555d8aba0271edfc10 Reviewed-by: Mitch Curtis <[email protected]>
A lot of animations will just be a single time line that you is intended to be controlled from the outside (and formats like Lottie does not support anything beyond this), so we need some API to match the general Animation API so that you can restart, pause/resume and change the number of times an animation loops. We do this by adding a group of properties called "animations" that can be used to control all the animations in the document at once. We generate this both in the QML file from *toqml and also in VectorImage itself. [ChangeLog][QtQuickVectorImage] Added some API to the VectorImage for looping, stopping, pausing and resuming animations. Fixes: QTBUG-135265 Change-Id: Id372c00110d165d02db357ce77eb1dec504cffb8 Reviewed-by: Eirik Aavitsland <[email protected]>
The old property is noop anymore. Change-Id: I517f7c3a189d6d67efb04ce286bb2b96e0124e72 Reviewed-by: Alexandru Croitor <[email protected]>
In certain use cases, setting a ListModel that's created by a Loader can cause a heap-use-after-free. Account for this by storing a QPointer to the model if it's QObject*, and checking the validity of that before casting. I wasn't able to reproduce this in an auto test. Rename some local variables while we're at it, to improve the readability of the code. Fixes: QTBUG-136672 Pick-to: 6.8 6.9 Change-Id: I84bbf21b37fb5675c931600ef8ea47365cceb09a Reviewed-by: Christopher Adams <[email protected]> Reviewed-by: Oliver Eftevaag <[email protected]>
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.