aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Move manual test for material stylewip/material3Paul Wicking2022-12-078-0/+0
| | | | | | | | After the renaming, tests/manual/quickcontrols2 is now tests/manual/quickcontrols. Change-Id: I95b34c68b6e684052e98a4bf0561beb9c9750efe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/material3Paul Wicking2022-12-051204-389/+3456
|\ | | | | | | Change-Id: I55ec34220c5b9001893fc924ab6be7fd64e63a02
| * Fix a few CMake warningsUlf Hermann2022-12-022-0/+3
| | | | | | | | | | | | | | | | Use AUTO_RESOURCE_PREFIX and move QML modules into suitable output directories. Change-Id: If39218450cf8dda41547c45a9b5deaa8673915bf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * qv4qobjectwrapper: return false on failed argument conversionSami Shalayel2022-12-023-0/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was possible to call c++-methods (either invokable or as slot) with wrong arguments, which caused a crash. The reason was that CallMethod(...) converted something to a QObject without checking if it was an actual QObject. The wrongly typed argument would end up reinterpret_cast'ed into another type for the call, which leads to segmentation fault when accessing the argument in the function. Added a test where an int tried to be reinterpret-cast'ed into a QFont. Pick-to: 6.4 6.2 Fixes: QTBUG-108994 Change-Id: I8c45c9124411ad3fd100faed0b03390843f7d034 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Introduce QQmlApplicationEngine::loadFromModuleFabian Kosmale2022-12-021-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allow instantiating QML types via their module and typename. It simply exposes the underlying functionality of QQmlComponent::loadFromModule. Also add the corresponding convenience constructor. This commit also does some minor refactoring so that functionality can be shared between load and loadFromModule. [ChangeLog][QtQml][QQmlApplicationEngine] It is now possible to load QML types via their module and type name. Fixes: QTBUG-97156 Change-Id: Iee812db269d27e4db4b10117ed2570272a7cc40c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * CMake: Add iOS build auto test for Qt Quick projectAlexandru Croitor2022-12-023-36/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we can't run iOS tests in the CI, but we can at least build them. Reuse the CMake deployment auto test as a regular build test (no deployment) when targeting iOS. This ensures we don't regress in building iOS projects that use qml modules. Move the deployment test to be added earlier in the CMakeLists.txt file and return early when both IOS and QT_BUILD_MINIMAL_STATIC_TESTS are true, so that we build only that test in the CI for iOS. Pick-to: 6.4 Fixes: QTBUG-96056 Change-Id: I68002c5b70bb3f182cf55ec4a2d4888ea9e2b81e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
| * QmlCompiler: Fix various kinds of enum lookupUlf Hermann2022-12-024-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * If we got an object type exposed as namespace, we still need to add the "*" to get its augmentedInternalName(). Otherwise we cannot get its metaobject, needed to look up enums. * Enums cannot be shadowed. The shadow check will produce garbage if we try to check because an enum lookup also does not use the accumulator, which then contains some artifact from a previous operation. * If we find a property lookup on a plain QMetaObject* we have to immediately return in order to not confuse it with attached properties. Pick-to: 6.4 6.2 Fixes: QTBUG-109048 Change-Id: If9e3b4806e4d773de9cf48f1b3750b684a8c8f69 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QQmlMetaObjectWrapper: A metaobject is not equal to a non-metaobjectUlf Hermann2022-12-021-0/+1
| | | | | | | | | | | | | | | | In particular, the Qt object's prototype is not equal to anything. Change-Id: I208d0bd914b0890e842775d273f2d3b5c63c1d36 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * qmltc: error out when encoutering invalid filenamesSami Shalayel2022-12-022-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dashes and other special characters in qml filenames makes life quite complicated, the generated cpp file will contain everywhere and be uncompilable. Instead, directly print an error message explaoining which names are allowed for type compilation and return. Reasoning: The name of the qml file is also the name of the qml object. For example, using a dash in the filename makes the corresponding qml type have a dash in its name and renders the type mostly unsuable in qml. Therefore, only allow characters, digits and underscores. Pick-to: 6.4 Fixes: QTBUG-107079 Change-Id: I4bff12e4a644b479213e7cc578207c8a443fc517 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * QQuickTableView: implement TableView.editDelegateRichard Moe Gustavsen2022-12-015-45/+881
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will implement support for editing cells in TableView. It enables you to attach an edit delegate to the tableview delegate, using the attached property TableView.editDelegate. The application can initiate editing by calling TableView.edit() (and TableView.closeEditor()) explicitly, or implicitly by using edit triggers. The EditTriggers enum in TableView mirrors the EditTriggers in QTableView (Widgets). [ChangeLog][Quick][TableView] Added support for editing cells Fixes: QTBUG-108838 Change-Id: I25df93a7eeabf9d8a4c4c6248e020d8eba6d5bd7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickItem: Fix effective visibility for items without parentVolker Hilsheimer2022-12-012-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Items are visible if they are children of a visible parent, and not explicitly hidden. The effectiveVisible member stores the state and is updated when conditions that impact the item visibility changes. The old code returned true for items outside a visual hierarchy, which broke signal emission when items were removed from a parent, e.g. because the parent got destroyed. With this change, items removed from a visual hierarchy will emit the visibleChanged signal. Note: QQuickItem initializes the effectiveVisible member to true, even if the item was created without parent item. Visual items are required to be added to a visual hierarchy via setParentItem. For this reason, newly created items never emit visibleChanged when they are added to a parent. Adjust the QQuickItem::visible test - it creates an item hierarchy without window. Such items are never visible, so add a window and parent the test item hierarchy to the window's content item. This fixes the expected failures in the tests. It does introduce an incompatibility with QGraphicsView and QGraphicsItem, which continue to return true from QGraphicsItem::isVisible for items that are not in an item hierarchy. [ChangeLog][Qt Quick][QQuickItem] The visible property of Items without a parent now always returns false, and the visibleChanged signal gets emitted when the parent item of a visible item becomes null. Fixes: QTBUG-108213 Change-Id: If4b2947cefd1407853f0f29e6c3fdbd49fc9af65 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Doc: remove "2" from Qt Quick Controls filesMitch Curtis2022-12-0140-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | Work on this was already started for the documentation in 1abdfe5d5a052f2298b7bf657513dfa7e0c66a56. The CMake target (docs_QuickControls2) probably can't be renamed until we rename the library, which won't happen until Qt 7. Task-number: QTBUG-95413 Change-Id: Ied20805a91286436606577c3de39671a447f27dd Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Remove "2" from Qt Quick Controls directoriesMitch Curtis2022-12-011102-44/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quick Controls 2 was named that way because it was a follow-up to Qt Quick Controls 1.x. Now that Qt Quick Controls 1 is no longer supported, we don't need to have "2" in the name. Work on this was already started for the documentation in 1abdfe5d5a052f2298b7bf657513dfa7e0c66a56. By doing this renaming a few weeks before feature freeze, it won't affect the release but still results in as little time possible spent manually fixing conflicts in cherry-picks from non-LTS releases as a result of the renaming. This patch does the following: - Renames directories. - Adapts CMakeLists.txt and other files to account for the new paths. A follow-up patch will handle documentation. It does not touch library names or other user-facing stuff, as that will have to be done in Qt 7. Task-number: QTBUG-95413 Change-Id: I170d8db19033ee71e495ff0c5c1a517a41ed7634 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix build error in top level buildsFabian Kosmale2022-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | We need to set up autogen tools not onlyfor the main library but also for the plugin. Fixes: QTBUG-109010 Pick-to: 6.4 6.2 Change-Id: I72b64c3803eb1de5f07e8dde05b87d95bc5dc7f2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * qmltyperegistrar: Generate accessSemantics="none" for foreign namespacesUlf Hermann2022-11-294-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | If the local type is a namespace, the resulting type can only be a namespace, too, no matter what kind of tag the foreign one has. Furthermore, we can re-use types with other QML_* tags this way. Task-number: QTBUG-108883 Change-Id: Ib2ae08d5b081b8faa35124314f97d406d7b4f76f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Introduce type based overload of Qt.createComponentFabian Kosmale2022-11-282-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add type based createComponent overloads based on QQmlComponent::loadFromModule. They provide a way to instantiate a component by its type, specified by a URI and typename pair. This enables creating Components for inline component types and C++ only types. Support for directly passing the type is deferred to a later commit, as it needs some care to work together with the compiler. As the string based overload matches a mistaken call to the URL based createComponent with parent and mode swapped (due to anything being convertible to string), we add a check to detect this specific error case and give a helpful error message. [ChangeLog][QtQml] Qt.createComponent now supports creating a Component from its module and type name (passed as strings). Task-number: QTBUG-97156 Fixes: QTBUG-26278 Change-Id: I89e7430fe02d52f57230bfa1b0bfbcbfd0ead4b7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Connections: Don't crash when target is deletedFabian Kosmale2022-11-282-0/+51
| | | | | | | | | | | | | | | | Pick-to: 6.4 6.2 Fixes: QTBUG-108697 Change-Id: I019edf3a0a702ad1dca340473265933e4d131e99 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Key required properties by object and property dataUlf Hermann2022-11-282-0/+25
| | | | | | | | | | | | | | | | | | | | Property data alone is not enough as the same property can be required in multiple objects. Fixes: QTBUG-108291 Change-Id: I3b1c899e24bb2967d05372701f9b5d0927b3c711 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Loader: Create bound components into their creation contextUlf Hermann2022-11-282-0/+22
| | | | | | | | | | | | | | | | | | | | | | It's unclear why we need a separate context for the created objects in the first place. Fixes: QTBUG-108684 Change-Id: Id6213a8cc61f54064162e7caa26ec7a6b38ddc2b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
| * QtQml: Restructure the moduleMaximilian Goldstein2022-11-2818-93/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new module QtQml.Base which contains the actual QtQml types and a new module QtQml that just imports QtQml.Base, WorkerScript and Models. This is so we don't have circular dependencies within QtQml anymore where QtQml imports QtQml.Models but Models can't depend on QtQml for type information. [ChangeLog][QtQml][Important Behavior Changes] If you import QtQml you now need to make sure that QtQml is actually in the import path. Usually this is the case, but by manipulating the import path you can hide QtQml. In previous versions of Qt you could then still import QtQml because its types are present in the QtQml library. However, it would ignore its dependencies: QtQml.Models and QtQml.WorkerScript. If you really want to import only the builtins, you can always "import QML". Fixes: QTBUG-105240 Change-Id: Icdcdcc926757a8e9e8d639301b5b6d110de59613 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Fail on warnings for simple "default" controls testsMitch Curtis2022-11-2853-0/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch: - Adds a simple, "default-constructed" (i.e. little or no properties set) test function for each control where one was missing. - Causes those tests to fail on any warning. It would be simpler to just call failOnWarnings(/.?/) in the initTestCase() of each test, but there are too marning warnings to fix right now. Task-number: QTBUG-98718 Change-Id: Ia3aa901feab5db534925824528caf25297e02760 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Add qCDebug to tst_QQuickPinchHandler::scaleThreeFingersShawn Rutledge2022-11-261-0/+1
| | | | | | | | | | | | | | When it fails locally, I want to see the actual scale value. Change-Id: Iecdf1dc2bb9660d3f6d11dea57fb2ca5aafd0068 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QML: Fix casting between builtin types when constructing value typesUlf Hermann2022-11-264-1/+52
| | | | | | | | | | | | | | | | | | | | Amends commit 3195b44e1c9678584c05ed823aab2eb32518d868. Task-number: QTBUG-108789 Change-Id: Ie11c48d64e7984ee0e1982cb9e8241b815d8c49c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
| * Debugger: Initialize scoped context correctlySemih Yavuz2022-11-254-2/+95
| | | | | | | | | | | | | | | | | | | | | | Initialize scopedContext with valid qmlContext. Otherwise debugger crashes on attempt to lookup an object that includes a v4Function property Pick-to: 6.2 6.4 Fixes: QTBUG-107607 Change-Id: Iea59bdf9d379a5415abe1767f76f851978b1be3f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * QQuickTableView: respect activeFocusOnTabRichard Moe Gustavsen2022-11-251-0/+46
| | | | | | | | | | | | | | | | | | | | | | QQuickItem has a activeFocusOnTab property which should also be respected by TableView. When disabled, TableView should not transfer focus between the cells when the user hits the tab key. Change-Id: I234286926b58753fa50923321302d4fa108a4515 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
| * QmlCompiler: Store imported types in a QListUlf Hermann2022-11-254-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same type can be exported multiple times with different attributes, even in the same module. This requires us to fix directory imports as qmllint otherwise complains about SegFault.bad.qml and SegFault.qml being the same type (which they obviously aren't). Task-number: QTCREATORBUG-27590 Change-Id: I295d927b9a07acbb715055a6883ac44b50129c2d Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * qmlformat: add 'ensure new line between functions' optionXavier BESSON2022-11-245-0/+100
| | | | | | | | | | | | Fixes: QTBUG-108659 Change-Id: I3e21727bd946089d89ce9c42f640f05230de8c8e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Register enum correctly in QQuickMessageDialogSami Shalayel2022-11-232-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Remove the broken Q_FLAG(QPlatformDialogHelper::StandardButtons) and replace it with QML_EXTENDED_NAMESPACE(QPlatformDialogHelper) such that the StandardButtons enum can be accessed from the qml MessageDialog type. Fixes: QTBUG-108630 Change-Id: Ia77d7d775491db90d3e5694f784bdc811d4f6bbd Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
| * QQmlJSImportVisitor: warn when uncreatables are createdSami Shalayel2022-11-235-6/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | isCreatable in qqmljsscope just returns the value of the flag as it was read from the qmltypes, which is slightly confusing as isCreatable is an opt-out option. Instead, isCreatable should reflect whether the type is creatable or not. A type is uncreatable if and only if it is a singleton, an attached type, a c++ type with QML_UNCREATABLE and types without default constructor. This uncreatibility can also be inherited to composite types. Types without default constructor require QML_UNCREATABLE or QML_ANONYMOUS, and will be handled in another commit. Now that uncreatable types can be detected, emit a warning when a singleton or an uncreatable type is created: up to now no such warning was emitted. This warning can be seen when using qmllint or qmltc. By the way, also fix qmltc to not assert when something goes wrong (e.g. because an uncreatable or singleton type was created). Change-Id: I9a82106a801d14063407eb4e54858b1ca9fd578b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * QmlCompiler: Implement console logging methodsUlf Hermann2022-11-234-0/+71
| | | | | | | | | | | | | | | | | | | | | | We provide semi-private functions in the AOT context for this. Since we cannot know the complete run time type of the potential logging category at compile time, we have to check any first argument that might be one separately. Fixes: QTBUG-107175 Change-Id: I46a8922b1c5c16d2b450b8728d650d31dfd867e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QmlCompiler: Fix comparison of null and undefinedUlf Hermann2022-11-233-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | Those are not stored. If we compare null to null or undefined to undefined, we do not have to generate a comparison at all. the result is statically known. Pick-to: 6.4 Fixes: QTBUG-108634 Change-Id: I6a5323c2e0c023838609aec90d7ecc15b885dc08 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * qqmljsscope: resolve enums using their aliasesSami Shalayel2022-11-233-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some enums happen to have an alias, e.g. when an enum is used as a flag, the enum will exist in two versions, once as enum (e.g. Qt::MouseButton) and once as a flag (e.g. Qt::MouseButtons). In this case, normally only the flag is exposed to the qt metatype system and tools like qmltc will have troubles when encountering the enum in signal parameters etc. To solve this problem, QQmlJSScope::resolveEnums() will create a QQmlJSMetaEnum copy for the alias in case the 'self'-scope already does not have an enum called like the alias. For the greater picture: this allows qmltc to compile signal handlers for signals that take enums as argument without asserting, and also is a step forward to compile the quick/text example with qmltc. Task-number: QTBUG-107609 Change-Id: I8fcb48a15a2066fb2d2dc89fc26b8441a1a0f489 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * qmltc: add singleton supportSami Shalayel2022-11-237-15/+142
| | | | | | | | | | | | | | | | | | | | | | | | Add singleton support to qmltc. Add the QML_SINGLETON annotation to the class, generate a static T* create(QQmlEngine*, QJSEngine*) method for the engine and also add test this new functionality. Fixes: QTBUG-106828 Change-Id: I7b6b39ab0c8a427b3166562c3f04cf4a7eaa20e2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * QQmlComponent/QQmlIncubator: Support C++ based typesFabian Kosmale2022-11-231-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlComponent has a create overload which takes an Incubator. While there is not really any work that could be done in an asynchronous with a C++ based types (there are no sub-QML components, and there are no bindings to set up), we still have to accommodate them in that overload (otherwise we'd crash due to the missing compilation unit). Add support in QQmlIncubator for this case, and call the newly introduce function in QQmlComponent::create. Task-number: QTBUG-97156 Change-Id: I64e3c6958117920dca214eee633424de94b492db Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * QQuickItemView: Fix max(X/Y)Extent()David Redondo2022-11-225-25/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickFlickable maxXExtent() and maxYExtent() return the amount of space that is not shown when inside a ScrollView. QQuickItemView however just returned width() if vertical and height() if horizontal. In these cases just defer to the QQuickFlickable base implementation like minXExtent() and minYExtent() already do. Fixes: QTBUG-83890 Pick-to: 6.2 6.4 Change-Id: I7f4060c2f46ae07611bedceca0d322c5f7f6affb Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QtQml: Clean up VME and interceptor metaobjects on destructionVolker Hilsheimer2022-11-222-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | The dynamically created meta object is stored in the QObject private until the very end of the object's destruction. It takes precedence in the moc-generated QObject::metaObject implementation, essentially side-tracking virtual dispatch during object destruction. If we don't clean it up this allows qobject_cast'ing down the class tree when the object is already partially destroyed, even though it shouldn't. Done-with: Ulf Hermann <ulf.hermann@qt.io> Change-Id: I64f6533747bb99b977702c050e5dc78a7c6428a5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Don't crash on QQmlGadgetPtrWrapper instances in debug serviceUlf Hermann2022-11-222-0/+31
| | | | | | | | | | | | | | | | | | | | They have the confusing property of being a QObject but having a QMetaObject that says it's a Q_GADGET. Pick-to: 6.4 Fixes: QTBUG-108646 Change-Id: I6df34c2004918cd89691f4b5eb4b6267dabcd7ff Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * XmlListModel: Clean up includesUlf Hermann2022-11-221-9/+11
| | | | | | | | | | | | | | | | | | Include only what we need, and normalize the include forms. Change-Id: I77013b8abf5132ca40aa5979619b5a37c472ac46 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QML: Try QMetaType conversion in VariantObject's valueOf()Ulf Hermann2022-11-221-0/+9
| | | | | | | | | | | | | | | | | | Since we're explicitly dealing with a QVariant here, the metatype conversion is adequate. We do the same already for toString(). Change-Id: I38c17b40da73ff0f0274e7d65b462eda1af2235a Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QtQml: Recognize JavaScript null as equivalent to nullptr QObject*Ulf Hermann2022-11-222-0/+40
| | | | | | | | | | | | | | | | | | | | Otherwise we can go into infinite recursion there. Pick-to: 6.2 6.4 Fixes: QTBUG-108651 Change-Id: I73a7c524b28d0eacb151f2090e3dce6afbc029d1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Clean up tst_qqmlengiendebugservice.cppUlf Hermann2022-11-221-54/+58
| | | | | | | | | | | | | | | | | | | | Make sure it doesn't leak memory and use ranged for rather than foreach. Also, make sure the individual test functions don't depend on each other and leave all global resources in a clean state. Change-Id: Ibce1910f26f8b3b341463bb3a758602c4c402c1a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QmlCompiler: Don't crash on CallWithSpreadUlf Hermann2022-11-223-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | When preparing for such a call, the byte code loads an "empty" constant. This has to be represented in the type system so that we don't hit the assert at the end of the instruction. Pick-to: 6.4 6.2 Task-number: QTBUG-108441 Change-Id: I66220bfae3d3a4b8e9600d84d4cfc43ac858b77e Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QML: Do not crash on CallWithSpreadUlf Hermann2022-11-221-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to check for subscripts also when creating CallWithSpread and TailCall instructions. Furthermore, the == operator of Reference needs to take into account whether the subscript has been loaded or not. Amends commit 872e91612fd83de6dd1193014b5e2a0f5e8c30af. Fixes: QTBUG-108441 Change-Id: I2d1a7a11f9cdcb4320a87df979d9ca4457620d3f Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Visible signal is not emitted when item is removed or added to parentVolker Hilsheimer2022-11-222-6/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests that document this bug. When the visual parent of an item is destroyed, then the item's parent becomes nullptr. Then the item is no longer part of any visual hierarchy, and should no longer be visible on screen. However, the visibleChanged signal does not get emitted, or gets emitted twice (and the visible property ends up set to true in the end). Note: the current behavior is the only reason why the "visible" test in tst_qquickitem passes: the root item is created without a window, and yet it, and its children, are expected to be visible. Task-number: QTBUG-108213 Task-number: QTBUG-107850 Change-Id: I8dba24e7e0cf1899bf815d897b4466baaa86d31b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * qmlformat: fix 'new line after ids properties' with normalize optionXavier BESSON2022-11-186-1/+52
| | | | | | | | | | | | Fixes: QTBUG-105479 Change-Id: I12ef7c2ffddb9127c1a0844c92d1050134863922 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Test deployment of purely redirecting QML modulesUlf Hermann2022-11-183-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | We want those to be supported. We cannot drop the plugins from such modules, though, since the plugin has to carry the qmldir for the resource file system. Task-number: QTBUG-108217 Change-Id: I84ab5236b7f0e12ab1acef2978df4f96f1cb8364 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
| * Don't clearPassiveGrabbers() after MouseEventSynthesizedBySystemShawn Rutledge2022-11-181-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows sends synth mouse events after touch events. We avoid delivery of them in QQuickDeliveryAgentPrivate::handleMouseEvent(), but we need to avoid reacting to them here too. If the touchpoint already had a passive grabber, and the mouse event comes from the same device, then clearing the mouse passive grabbers is identical to clearing the touchpoint's passive grabbers, which we don't want to do. Amends 48b1c59b65332b773eb51d25c422b53dbd3d6762 Pick-to: 6.4 6.2 Fixes: QTBUG-104890 Change-Id: I4c3e18fc834c7bfcba7037548c7e42627e319bda Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | material manual test: store theme etc. in settingsMitch Curtis2022-11-282-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch stores the following data in settings: - window geometry - theme - variant - last selected control This makes it much more convenient to use. Task-number: QTBUG-97993 Change-Id: I0a0dfa2bc4dfac8b05193e0dab2abf9f83851945 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | material manual test: add dense switchMitch Curtis2022-11-241-0/+8
| | | | | | | | | | | | | | Task-number: QTBUG-97993 Change-Id: I75dc3e09cd592890e87dc40efd6cb52342116dcc Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | material manual test: add dark theme switchMitch Curtis2022-11-241-0/+13
| | | | | | | | | | | | Task-number: QTBUG-97993 Change-Id: I0b298702790195548c11373d0d899ce499b0dc7b Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>