aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* shift highlights: adapt lsp highlighting request to shiftingSemih Yavuz9 hours14-24/+362
| | | | | | | | | | | Implement Utils::shiftHighlights to apply diffs to cached highlights. Fallback to shifted highlights when DOM is invalid to avoid recompute. Refactor handlers to use shifted tokens and update result IDs and cache. Add unit tests and invalid fixtures covering deletions and partial edits. Task-number: QTBUG-140645 Change-Id: Ic230af0e3d995e85959beee3dfa37a987843c119 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* qmlls: qInfo() when receiving EOFSami Shalayel9 hours2-0/+13
| | | | | | | | | | | | | | | Add a test to avoid QTBUG-142025 from regressing, and log a message with qInfo() when receiving EOF to simplify debugging qmlls in the future. This should help to tell if qmlls stopped on start because of QTBUG-142025 or other reasons (invalid signature, or the qmlls client trying to spawn qmlls from a filepath that does not exist for example). The actual fix of QTBUG-142025 is in qtbase and tracked via QTBUG-142041. Fixes: QTBUG-142025 Pick-to: 6.10 Change-Id: I9cd215ac02e23a1d833755eda058d72622de7318 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Don't read out of bounds when analyzing splice()Ulf Hermann22 hours3-0/+19
| | | | | | | | | | You can call splice with only one argument, after all. Pick-to: 6.10 6.8 6.5 Fixes: QTBUG-142253 Change-Id: I3dec244325fd4d57a045ec024968e26e4f6372db Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_QQuickLoader: avoid unnecessary QString -> QUrl conversionAhmad Samir3 days1-1/+1
| | | | | Change-Id: I3dbd469b26914b0380bb781c1c2993a43657bd4e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* DOM: remove wrapFieldSami Shalayel3 days1-1/+1
| | | | | | | | | | It only calls wrap(). Replace all usages, and change the first argument to use PathEls::Field(). This helps unclutter the DomItem interface. Task-number: QTBUG-142187 Change-Id: I3aeda82b95948dde7bb7b07ab573585ac11958a6 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* Android: Bump Gradle and APG versions in QtQ4A examplesOlli Vuolteenaho4 days2-2/+2
| | | | | | | | | This will match them with Q4A. Task-number: QTBUG-138877 Pick-to: 6.10 Change-Id: Ia5cb1954b361f7f0abb788c326045f71da202607 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Qml language: add virtual and override property attributesDmitrii Akshintsev4 days2-6/+187
| | | | | | | | | | | | | | | This patch introduces 'virtual' and 'override' keywords. From the grammar perspective they are qml contextual keywords, first of all to preserve backwards compatibility (do not break the users code if they had object attributes named "virtual" or "override") "final" is made qml contextual keyword for the sake of consistency (to treat all "virt specifiers" equally) Change-Id: Ice13a77c8b54ce8219cd45cc7085fb3f10a5e908 Task-number: QTBUG-98320 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Compiler: Stop std::move-ing the changed register in certain casesOlivier De Cannière4 days3-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes an optimization where we std::move the changed register into its target. A copy is performed instead. This resolves the more urgent issue of miscompilations. QTBUG-141920 has popped up and was either exposed or introduced by b303e0624d2ea2ab1c124961e7510a64d0ca1412. That change performs optimizations that avoid intermediary copies of values between registers. It was found that, in the process, the mapping from RegisterContent to variable name stored in m_resiterVariables was changed. One RegisterContent no longer uniquely maps to a variable name because of the direct moving of values to their destination. The registers alias the same value. This could cause issues and might need to be addressed. The original std::move was only added after 6.5 by 3193911b02424dd0365e03526a4c12ed7888b7ca. Cherry-pick to the later versions. Fixes: QTBUG-141920 Pick-to: 6.10 6.8 Change-Id: Ie6dad1a809ac5ee08de70971ec92d3c97fc50080 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* tst_qqmldebugjs: Increase some timeoutsUlf Hermann4 days1-2/+2
| | | | | | | | I've caught it timing out on these. Change-Id: I0fd7d575823fab857d4e24d5841e8d6708f00a93 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Qml Profiling: Handle the case of profiling without any featuresUlf Hermann4 days1-8/+36
| | | | | | | | | | | | | | We cannot encode the "running" state of a profiling adapter into the features it's recording. It may be started with no actual features enabled and then we still need to stop it eventually. In order for the QmlProfiler test to work without the DebugMessages feature we still need to create the DebugMessages client, but ignore its output. Otherwise the logic that checks "unrelated" clients gets confused. Change-Id: I52a3c2bc55ea36454ab9c8c7f25fe833c7f14a43 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* tst_qqmlprofilerservice: Increase timeout for multiEngine() testUlf Hermann4 days1-1/+1
| | | | | | | | I've caught it timing out by just a few ms several times. Change-Id: I0f9d80421a5845dc0582fd028c7c3d33d9f6bc54 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qmllint/quick: Don't complain about short hex codesFabian Kosmale4 days1-0/+2
| | | | | | | | | | | 3 or 4 hex digit color names are fine, too: #abc is equivalent to #aabbcc and #abcd is equivalent to #aabbccdd Pick-to: 6.10 Change-Id: I2c6ed5926b921cb1a357bdaefbe456f845990b21 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QmlPreview: Support limited mkdir and rmdir from previewed directoriesUlf Hermann5 days3-5/+50
| | | | | | | | | | | If the directory to be created or removed is at an absolute path, we can just as well use the root path to carry out the operation. The result will be as unrelated to the preview as any other mkdir/rmdir operation elsewhere. Task-number: QTBUG-141569 Change-Id: I156f230a7bbbd07215334649026319a977ff063e Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Flickable: add positionViewAtChild, flickToChild, flickTo(position)Xavier BESSON5 days2-0/+155
| | | | | | Fixes: QTBUG-141747 Change-Id: Icc194fb35da84f580b3bdfcb64944f5834b766dc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qmllint: enhance duplicate property messageSami Shalayel5 days1-2/+4
| | | | | | | | | Add some information what the original attribute is (a signal, method or property). Task-number: QTBUG-141854 Change-Id: Ia4c6ea889b99658df2a6f5ee80e7b5628e398c8c Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* qmllint: enhance getScopeName for shadow warningSami Shalayel5 days1-3/+18
| | | | | | | | | Print the qml name of root file name components instead of its base type when using getScopeName. Task-number: QTBUG-141854 Change-Id: I53f830a03edeaf0a23251583d4fa20da9ee8f5d0 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* qmllint: warn on shadowed properties/signals/methodsSami Shalayel5 days3-4/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warn when shadowing properties/signals/methods in qmllint. Move the already existing duplicate property check into its own static method warnForDuplicates, and extend it to check whether base types also have a property of the same name. Use it when analysing definitions of methods, signals and properties in qmljsimportvisitor to warn about shadowed properties. As a drive-by change, fix the sourcelocation of the duplicated property warning to point to the name of the property/signal/method instead of the "property" or "function" keyword. To avoid adding more testcases to the already big tst_qmllint::dirtyQmlSnippets_data(), create a new tst_qmllint::shadow_data() method for the shadow related tests, and make tst_qmllint::shadow() call dirtyQmlSnippet(). This allows to reuse the test code from dirtyQmlSnippet without making dirtyQmlSnippets_data grow even more. Adapt some existing test-cases by adding qmllint disable directives where shadowing was wanted, and disable the shadow category on tst_qqmljsscope (which does not make use of the qmllint code that reads qmllint disable directives), as it seems that tst_qqmljsscope tests that shadowing works as expected (shadowing is a feature, after all...). I guess this patch might need to be updated in the future once we have override and virtual properties in QML via QTBUG-98320. Make the qmlShadow warning non-critical for qmltc, as qmltc supports shadowing, to avoid breaking the qmltc tests. Task-number: QTBUG-141854 Change-Id: I74c1b413e2c19a0db34215b34a9b65d43fbef6ce Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* qqmljsscope: add methodFromOwner methodSami Shalayel5 days2-4/+15
| | | | | | | | | | Add a method to grab the owner of a method of a qqmljsscope, in the same way as ownerOfProperty() does. A later patch will use it to warn about shadowed methods. Task-number: QTBUG-141854 Change-Id: I21247151ee3d7d298329d0bdfb2f5e0e1dd51b33 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* shift highlights: add a test containing deletes and insertsSemih Yavuz5 days1-0/+25
| | | | | | Task-number: QTBUG-140645 Change-Id: I72d3dbbe88f1902dc6f520cdefbc2577dea531ce Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* shift highlights: modify highlights on delete diffsSemih Yavuz5 days1-0/+47
| | | | | | | | | | | | | | | | | | | Implement deletion handling for semantic highlight tokens so that tokens remain consistent after text removals. Classify tokens relative to the deleted range and apply one of: - keep tokens before the deletion - shift tokens after the deletion (adjust offset, line, column) - trim or move overlapping tokens (left/right fragment or drop) Add helpers for overlap detection, column/line adjustment, and an updateHighlightsOnDelete routine. Call it from Utils::applyDiffs. Add unit tests covering single-line and multi-line deletions. Task-number: QTBUG-140645 Change-Id: I55c1c41dc1bb58435d001a8960089b8b605ab1e9 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* shift highlights: modify highlights on insert diffsSemih Yavuz5 days2-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add logic that shifts existing highlight tokens when the document is modified and becomes invalid. Introduce the applyDiffs helper, which takes a list of diffs between the current document and the last valid one. High-level strategy: Represent highlights as a map from offset to HighlightToken. Maintain a cursor into the old document that marks the current insertion point. For Diff::Equal, advance the cursor by the length of the equal text and leave all highlights unchanged. For Diff::Insert, compute insertion metadata and classify each existing token relative to the cursor. Tokens before the insertion remain unchanged. Tokens after the insertion are shifted forward by the inserted length. If the insertion is on the same line, adjust startColumn. If it contains newlines, update startLine and recompute startColumn. Tokens overlapping the insertion are expanded. If the insertion is in the middle of the token, extend the token until the first whitespace to avoid merging separate words. If the insertion begins before the token start, move the token start to the insertion point and adjust length and line or column values. After processing all diffs, build the shifted highlight set and swap it in. Task-number: QTBUG-140645 Change-Id: Ib0431c702100517e2658a48c8ae7f2ae141dbc8c Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* qqmldiffer: adapt the differ from QtCSemih Yavuz5 days3-0/+138
| | | | | | | | | | | | | | | QtC has a well-tested diff calculator which works in the core of DiffEditor plugin. Adapt it in qtdeclarative to be used as qmlls utility by modernizing a little and removing the unnecessary api that won't be needed. The first use case will be shifting highlights based on the calculated differences. Also, regexp-based highlighting would perform only on the diffed context rather than the entire source code. Task-number: QTBUG-140645 Change-Id: I5e88e4c6d77c1432b25eb226f9f5444928b9b156 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix CalendarModel month count calculationJoni Poikelin5 days1-0/+9
| | | | | | | | | | CalendarModel used previously set from and to values to calculate the range and thus the count wasn't ever up to date. Fixes: QTBUG-141883 Pick-to: 6.10 6.8 Change-Id: Id3ef60810d2e8ebfcc060307e6d17cfca379cd78 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QmlPreview: Allow setting animation speedUlf Hermann5 days4-48/+74
| | | | | | | | | | | | | | | | | | | This is the same functionality we already have in the inspector service. However, we need it in the preview, too. For such a simple thing you shouldn't need to instantiate an extra debug service. The animation speed method in the preview service also doesn't invert the speed modifier. So, for double animation speed you need to pass 2, not 0.5. Fix the test to a, check the animation speed only on new output, rather than everything the application has printed before and b, actually check whether the number is in the intended range. Task-number: QTBUG-141569 Change-Id: Ie7f7b043fb295e7c5da333ab4501059f07f2e3cd Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* Android: update manual test for software keyboardKonsta Alajärvi5 days1-49/+53
| | | | | | | | | | | | | | | | Small update for the Android software keyboard test application. Replace previous many checkboxes for InputMethodHints related TextFields with just one, as we can confirm the inputhints working with just one check. Add GBoard checkbox for default behavior TextField, as this was missing. This creates less repetition when running the test. Task-number: QTBUG-140933 Change-Id: I4eaf340d3240d03225df56e15e37c25082866991 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix flaky tst_QQuickMenuBar::subMenuFlipsPositionWhenOutOfBoundsFrédéric Lefebvre5 days1-1/+1
| | | | | | | | | | | tst_QQuickMenuBar::subMenuFlipsPositionWhenOutOfBounds is failing on ubuntu where a keyboard event is sent before the window became active. Check that the window is active instead of checking if it is exposed, ensuring the window can properly receive keyboard events. Change-Id: If4dd3533fc5788f44d6011f89683f4b74ecd77c0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* CMake: Allow qmlls.build.ini generation to be skippedUlf Hermann5 days1-0/+1
| | | | | | | | | We don't want a qmlls.build.ini to be generated on a module that's intentionally hidden from the outside world. That won't work anyway. Change-Id: I4231361ab4d786d661db19f80b5cf0de84cc0b35 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* qmllint: don't mixup 'import' and 'import-file-selector' categoriesSami Shalayel5 days8-7/+58
| | | | | | | | | | | | | | | | | | Don't log warnings of the import-file-selector category using the import category, and only use the import-file-selector category for that. It seems the mixup happened when multiple import and import-file-selector warnings were emitted for the same file, so extend the current test by introducing another qmllint warning with Broken.qml, and make sure the import-file-selector warning is emitted via the correct category-warning-level. The import category has warning level 'warning' while import-file-selector has 'info'. Amends 3ab60f40d5e0b612c6a1eedba656f4f26d66c927. Pick-to: 6.10 Change-Id: I35acdef46284067a9f23288128108569faa9d90b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add iOS style for SearchFieldDilek Akcay5 days1-4/+26
| | | | | | | Task-number: QTBUG-137318 Pick-to: 6.10 Change-Id: Iead7b9ad0bf22c96d94ab70795fed854f613f6d7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* qmlformat: Add GroupAttributesTogether optionXavier BESSON6 days4-0/+130
| | | | | | | | | | | | Equivalent to NormalizeOrder but reorder QML categories without sorting attributes (property definitions, property bindings, methods, signals, enums) Fixes: QTBUG-132060 Change-Id: Ib46ce4bb58ce46e3293d14954b0e363837b64b76 Original-patch-by: Oliver Kuss <oliver.kuss@okapp.de> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Blacklist Switch mouse/touch tests on macOS 26Tor Arne Vestbø6 days1-0/+18
| | | | | | Task-number: QTBUG-142189 Change-Id: I863b5773f89528d3582dd83c84cff78d159990c4 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* tst_HoverHandler::window: Place window away from menu bar on macOSTor Arne Vestbø6 days1-1/+1
| | | | | | Pick-to: 6.10 6.8 6.5 Change-Id: I783d368dc9dffd20dad4b238e55d26da57d11d7b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QtQml: Fill in the const iterator functions in the empty sequenceUlf Hermann7 days1-0/+39
| | | | | | | | | | Without these you may get an infinite sequence when trying to iterate using const iterators. Pick-to: 6.10 6.8 Task-number: QTBUG-142097 Change-Id: Iae93063b240ebe9426804197533ed7efd8e007bc Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QtQml: Don't mark QJSValues on the AOT stackUlf Hermann7 days3-0/+38
| | | | | | | | | | | | QJSValue and QJSManagedValue hold persistent values which are marked elsewhere. QJSPrimitiveValue doesn't need to be marked at all. Amends commit 2d016a2653c59f10a57dc1903b817f71d16d0622. Pick-to: 6.10 6.8 Fixes: QTBUG-142097 Change-Id: I50d6405a684726a81ceee506b2d4f8b90330fcaf Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* testbench: add transparent icon to relevant controlsMitch Curtis8 days13-10/+48
| | | | | | | | This allows us to test icons with their original colors. Pick-to: 6.8 6.10 Change-Id: I794be82b286d71d3b037209624169bf18c57e62b Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* testbench: add icons to more controlsMitch Curtis8 days6-0/+35
| | | | | | | | | Not all styles display icons for all controls, but it's good to have complete coverage in testbench anyway. Pick-to: 6.8 6.10 Change-Id: Ic347c408ababca4c8deb9acea83c26fa36c7ea75 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* tst_qmllanguage: Remove outdated check for .qrc on AndroidOlivier De Cannière10 days1-4/+2
| | | | | Change-Id: I84f50a3ffeac31f586bddb6cd3fc2ccdde25a4fc Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* tst_qqmllanguage: Don't pollute the source directoryOlivier De Cannière10 days9-26/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The i18n tests that QML files are always UTF-8. To do this is creates a QML file with a name that only makes sense if it is UTF-8 encoded and tries to load it from another file. This file is generated next to the other test files for the i18n tests in the source directory. The files is removed at the end of the test by some cleanup code but if the execution is interupted during the test, like during a compile-debug loop, the file is left behind and pollutes the source directory. Rework the test to utilize a temporary directory. This way any files left behind do not pollute the source. The check was initially introduced by 176698a91d3b2256a093785967c6706328981af4 Later 1ec1a863471445132c1d29500d6ac720663887ae adapted it to fix it on Android. The .qrc and .pro files it introduced or edited were later removed by 338e892a18b73c912881e6e7f93ade0dbaa1eb8b and 78ab4b8d8b75fed240cded1a3f182048e56a8823 respectively. Amends 176698a91d3b2256a093785967c6706328981af4 Change-Id: I8175e1e335a06d1389f00c4fd5905ba69be87f31 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Fix several flaky tst_QQuickStyle on different platformsFrédéric Lefebvre10 days1-1/+3
| | | | | | | | | | | | | | | | | Fix the flaky tests tst_QQuickStyle::commandLineArgument, configurationFile, environmentVariables. The tests were picking up the previously selected style, causing them to be unable to change and to fail the next tests. When re-running a test no style is selected yet, meaning the desired test can be selected succesfully. Change the order to have lookup as the last time as it will make other tests fail the first time. The lookup test is still failing the first time it is run due to the wrong font size. Reset the style inside of cleanup() Change-Id: Ic974316c856affbc5f3fe805aabd27588b021c4c Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* VectorImage: Add support for offset path animationsEskil Abrahamsen Blomfeldt10 days4-0/+229
| | | | | | | | | This implements the offset path animation in SVG by mapping it to the PathInterpolator in Qt Quick. Task-number: QTBUG-140751 Change-Id: Ib05e32b8e5190213744c38cc2fc1ca85ef1feaac Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
* qmllint: fix typo in warningSami Shalayel10 days1-1/+1
| | | | | | | | Add a missing i in "initalizer". Pick-to: 6.10 Change-Id: I3904fa88fcc499a0f7b2b8eb8884adecee10757b Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* Tooling: Add test for integrating event replay with qmlpreviewUlf Hermann10 days2-10/+90
| | | | | | | | | | | | This makes sure that the relevant debug services can coexist. In order for this to actually be true, we need to initialize the type loader before we initialize the various services. Otherwise the profiler service will initialize the type loader which will query the preview service for some directories, leading to a deadlock. Task-number: QTBUG-141569 Change-Id: Ia0873802b94b885654c693bdb9a96100cad492bf Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Dialog(ButtonBox): Prioritize popupItem subFocusItem over buttonBoxOliver Eftevaag11 days1-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a followup to e323e508b61ce0a2615c9c8e8fbf897e27965173. In cases where a Dialog has an item with explicit focus, e.g: ``` Dialog { Button { focus: true text: "Foo" } footer: DialogButtonBox { standardButtons: DialogButtonBox.Ok } } ``` Then the "Foo" button should get focus, since it's explicitly set in QML. 4d1753b95f0343a68f80a1b482b8ab9a0397fecb changed this behavior to instead always give the buttonbox focus. If focus isn't explicitly set elsewhere, it should be fine to give it to the buttonbox. However, doing so unconditionally would be a significant behavior change that would break lots of user projects. Add a precondition to verify that the popupItem doesn't have a subFocusItem, before considering whether or not to give focus to the buttonbox. As a drive-by, also just call setFocus() instead of forceActiveFocus(). Both functions work for our purposes, so might as well use the less extreme option. Amends e323e508b61ce0a2615c9c8e8fbf897e27965173 Change-Id: Iea72f162669159082386966a1d9419c64abb7302 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Window: specify correct property typeFabian Kosmale11 days1-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Given that the property was documented to only take a screen from Application's screen list, we can arguably do this change, especially that any usage with a non-QQuickScreenInfo would just end up setting a null-pointer, indicating some bug. Any code reading the property is fine anyway, as a QQuickScreenInfo is still a QObject. This also uncovers that the screengrabber base line test did not handle this correctly (it passed a QScreen to setScreen, which doesn't work). This would now fail to compile. Fix it by passing the actually expected object along. Amends d6dfbe8fd5d09388fc624d85c4aefa0269c20db9 [ChangeLog][Important Behavior Change][QtQuick][Window] Window and ApplicationWindow now enforce that the type of the property passed to the screen property is ScreenInfo. It used to accept any QObject, but would silently convert it to null if the type was not correct. Change-Id: I512c24c761ef5e6e9b7f241d222c98a34c6fafa4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qmllint: fix required property detection on shadowed propertiesSami Shalayel11 days1-0/+5
| | | | | | | | | | | | | | | When a derived type shadows a property from its base type, qmllint used to confuse the base property's `required` status with the derived property's `required` status. This used to lead to bogus warnings even when the shadowing property was correctly bound. The check now ensures that the property owner matches before treating a property as required, fixing false positives in such cases. Pick-to: 6.10 Fixes: QTBUG-141086 Change-Id: Ic2cf6558a1ebf78af1022911827c398164de5e31 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* tst_reformatter: Make use of createLineWriterDmitrii Akshintsev11 days1-27/+2
| | | | | | | | Adjust test to use newly introduced createLineWriter instead of the old test version Change-Id: I7c384dc28f0ec99016983ebcc27635ff4f964d9c Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* CMake: Fix non-QtQuick build with testsJoerg Bornemann11 days1-0/+2
| | | | | | | | | | | | | | | If qtdeclarative is configured without having qtshadertools, QtQuick won't be available. Configuring with tests, like a developer build will do, fails, because qmltests can't find qmltestrunner. The qmltests - despite their name - depend on QtQuick, and more importantly on qmltestrunner, which also has a QtQuick dependency. Fixes: QTBUG-142082 Pick-to: 6.10 Change-Id: Ia6a3039227367b366faad4d7b05f9580f9636d33 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QmlProfiler: Allow querying the event receiver for the number of eventsUlf Hermann11 days2-14/+16
| | | | | | | | In turn inline the isEmpty() method and make the clear() method purely virtual. Also, use qsizetype for the number of events and event types. Change-Id: I701aa27441489af28407cbae9123557a48a3a34e Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* Fix QQuickItemPrivate::eventHandlingBounds()Shawn Rutledge12 days2-1/+5
| | | | | | | | | | The second two arguments are width and height, not bottom-right coordinates. So after shifting the rectangle left and upwards, we need to add twice the margin to width and height, to have the same margin all the way around. Amends 8115731466b579f33295d5c8a71506475750284e Change-Id: I83797ffd460ee47599170090aefcda544c3e4483 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QtQml: Reset JS libraries and ES modules on clearComponentCache()Ulf Hermann13 days1-0/+14
| | | | | | | | | | | | | We can't drop the respective compilation units without re-opening QTBUG-128638 and QTBUG-128782. However, we can empty them out and force them to be re-evaluated. Since you can store arbitrary data in those libraries, this is important for a proper clearing of the component cache. You may hold on to a QObject that in turn holds on to other compilation units. Change-Id: Ie6bd3878c0d45086a7efade76ad5696bf8428acb Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>