aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.4.0' in qt/qtdeclarativev6.4.0-rc1Qt Submodule Update Bot2022-09-131-5/+5
| | | | | Change-Id: Ideb64d5c0ca50382a570d31a662584dd884b2f8c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Controls: add todolist example for showcasing the iOS StyleJenny Lofthus2022-09-1238-0/+1023
| | | | | | | | Task-number: QTBUG-80261 Change-Id: Ie6d86b0a49bd0684373816d709c7e010aff7e7a5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 6b5cf5969889a88d5f506692c859d1bd4f59d5dd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.4.0' in qt/qtdeclarativeQt Submodule Update Bot2022-09-121-5/+5
| | | | | Change-Id: I43844f70609c2823191215e6a11ac6e160958f7b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Use --bare option in CMake-generated calls to QML toolsUlf Hermann2022-09-121-0/+3
| | | | | | | | | | We pass the system import path(s) explicitly. We don't want the tools to guess them. Pick-to: 6.4 dev Task-number: QTBUG-106365 Change-Id: I529d5e79fa0331e6994be0d8a659d4a4556be1dd Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Avoid dangling pointers in handler for QQuickPixmapReply::finishedShawn Rutledge2022-09-111-2/+1
| | | | | | | | Fixes: QTBUG-106357 Change-Id: I78156b403618c88da26d381be7a6e777a6d22f87 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 88aff6f851a70e5bb5082b04943a5c8ddf026d44) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add --bare option to qmltc and qmlcachegenUlf Hermann2022-09-112-2/+14
| | | | | | | | | | | We need those to prevent usage of the host Qt's import path when building QML files for the target. Task-number: QTBUG-106365 Change-Id: I34499af850fb759603206cb429ff97633c76054d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 2f583eeab254edbb0e1b42213e9d48ce6ad3f04e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Partially unify tooling import path handlingAlexandru Croitor2022-09-101-29/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a function that returns all Qt import paths. It's intended to be used to pass the import paths to the various tooling invocations like qmlsc, qmltc, qmlimportscanner, qmllint, qmlcachegen. The order of the Qt prefixes returned is: - The build dir of the currently built qt repo (e.g qtdeclarative/qml) - Additional paths specified via _qt_additional_packages_prefix_paths - The main Qt installation prefix QT6_INSTALL_PREFIX Use this function for the various tooling invocations. Make sure the paths are only added if they exist on the file system, otherwise some of the tools might complain about non-existent paths, for example qmlimportscanner. This is only a partial unification, because we should still figure out how unify all the various target specific properties like QT_QML_IMPORT_PATH and QT_QML_MODULE_OUTPUT_DIRECTORY as well as the differences where in certain places the paths are specified via genexes like $<TARGET_PROPERTY:${target},BINARY_DIR> and _qt_internal_genex_getjoinedproperty and qmlcachegen custom import path computation done in qt6_target_qml_sources. Task-number: QTBUG-106365 Change-Id: Ia1297ebd57764068a4b8fbcb5ac70df6b380d3f6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 3a35b57269519bfed2418e27ed9daf69f27576a0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Correctly process root paths for qmlimportscannerAlexandru Croitor2022-09-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The values in _qt_additional_packages_prefix_paths end in /lib/cmake, because they are prefix paths, not root paths. Adding ./qml to the end of those paths would never result in valid qml import path locations on disk. Use __qt_internal_prefix_paths_to_roots from the Qt6 package to strip away that suffix, before adding ./qml. This should fix the Conan multiple root paths case, as well as builds of ExternalProject examples during a prefix build of qtdeclarative. Note that the examples will still not run without setting the QML_IMPORT_PATH env variable to point to the qtdeclarative/qml build directory, or creating a qt.conf file in the example build dir that sets the qml import path to the qtdeclarative build dir. Amends 8bf916bfcbd5a05ec7370179317cd6d3a7dbd905 Fixes: QTBUG-106431 Task-number: QTBUG-96232 Task-number: QTBUG-102339 Change-Id: I6d3dd2b82634efc0faf756d884816dfb8a6ff4b6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 727151e0e03b0b91e1dc83c205a8608d5d5c236b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Harden construction of QML import paths for qmlimportscannerAlexandru Croitor2022-09-101-10/+12
| | | | | | | | | | | | | | | | | | In certain cases where QT6_INSTALL_PREFIX/qml might not exist, we wouldn't add the -importPath argument itself, but would still try to add import paths, which would then confuse qmlimportscanner and trigger an error. qmlimportscanner: Invalid argument: ... Make sure to prepend -importPath for each passed import path. Task-number: QTBUG-96232 Task-number: QTBUG-106431 Change-Id: Iae2b02a0b50e75a297df8fbaf0427df2b6b30c93 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 300074edaacdad3f2ffacb87c3e718db620c564a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickPopup: Close popup on "Back" keypress on AndroidOliver Eftevaag2022-09-091-1/+6
| | | | | | | | | | | | | | | The Android Navigation Bar has a "Back button", which is processed in qt as a key press event. Apparently, it's supposed to act as a swiss army knife of escaping contexts in application, which includes closing of popups. Fixes: QTBUG-104535 Change-Id: I4a359946f93c8dc04da734c5f54264e4dbdd3211 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit fd01ad1e99879f9cf5b30fde79ad0bca3230c7c1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.4.0' in qt/qtdeclarativeQt Submodule Update Bot2022-09-091-5/+5
| | | | | Change-Id: Ied4f87ad74fcb844afb2423aa922c5d5efa1fecd Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Don't assert that a passive grabber is a pointer handlerShawn Rutledge2022-09-081-2/+2
| | | | | | | | | | | | Since 375e4003902e56e1cfd4192cee47566161b7b32d a passive grabber can sometimes be an Item (so far, only Drawer does it). Fixes: QTBUG-106391 Change-Id: I52cd70fda9257acecfc4919ff54179006ff9843b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit 1902912c2a8a0b4080048116403a0bdc70f8772f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.4.0' in qt/qtdeclarativeQt Submodule Update Bot2022-09-081-5/+5
| | | | | Change-Id: Ie23ebcc002ef4a327a4b12bc60a4d47d58a78525 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.4' in qt/qtdeclarativeQt Submodule Update Bot2022-09-051-5/+5
| | | | | Change-Id: Ie2a61007e2add3d100921ccfd25ff71c812b46ad Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* doc: Add missing since 6.4 tag to QQRT::fromPaintDeviceLaszlo Agocs2022-09-041-0/+2
| | | | | | | | | Amends 43f705c3c01a7b78b94ea1db655c715ab2a54939 Change-Id: I9439ac9c3b45e5bd501c40ff4b7efcd18fdec01d Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 8961469341ac120756d6c2764dab9429a24b668d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickColorDialog: Implement ColorInputs in C++Oliver Eftevaag2022-09-0317-446/+1055
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous version of the ColorInputs.qml contained a good number of signal handlers that executed js code. We prefer to write business logic in C++ since it's faster, and we have more control. Which is the main focus of this patch. Additionally, it works around an issue where the binding on the visibility property for the alpha text fields would cause them to be omitted from the RowLayout's implicitWidth calculation, that would then be used by the StackLayout to calculate its own implicitWidth in a bottom-up direction. This made the size of the dialog become larger when a different selection was chosen in the combobox, and had a negative impact on the user experience. (The initial selection is the hexcode text field, which isn't inside a RowLayout, like the other children of the StackLayout). The only workaround that I managed to find, was to call setVisibility form C++, which is why this patch serves a dual purpose. Some other minor QoL changes are also included. (Like the footer having a separator for eating left over space). The most significalt part, user experience wise, is that the ColorInputs component will now have a "minimum" width, which will impact the size of the rest of the dialog. The reason I did it like that, was because I wanted all of the text fields to be able to fit 4 characters inside of them, without causing any scrolling/eliding/clipping. The text fields would simply be too small to fix 4 characters for some of the styles. This means that this patch affects the size of the dialog for some styles. Fixes: QTBUG-103900 Change-Id: Ic88156c0ab1e692ee38eda29d103c9d2adea7b47 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 261f527b5a5be24a38c5cb60aa0fcaf76633392d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Engine: Fix handling of attached objects in function callsFabian Kosmale2022-09-024-4/+43
| | | | | | | | | | | | | | | | | When we use an attached object as an argument to a function call, we need to properly extract it from the QmlTypeWrapper. Before this change, we simpley left the argument pointer as null, which lead to subsequent crashes when it got dereferenced. Moreover, treat passing namespaces to functions expecting a QObject as a TypeError, by returning false from CallArgument::fromValue (used to crash for the same reason as with the attached object case). Fixes: QTBUG-106119 Change-Id: Ifa6a32e20a29935aff1f265eb0edd3e35ea1c11b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 84483bff4f4d49e5f87abf564021647f2fb2a8d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Material: add TreeViewDelegate.qmlRichard Moe Gustavsen2022-09-024-2/+65
| | | | | | | | | | | | | | | | Add a version of TreeViewDelegate.qml to the Material style, that looks more at home for that style (rather than using the one in the Basic style). This version is using the arrow-indicator from the Material style as expand/collapse indicator, and makes the height of each row match the height of a normal Material button. Change-Id: I084532ca6e527593e5711d66aa53f240f0356d99 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 55fab9a73e720a84d0f0a86cc4175f34a4573188) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS style: draw TreeViewDelegate as highlightedRichard Moe Gustavsen2022-09-021-1/+6
| | | | | | | | | | | When TreeView has a selection, or a cell that is otherwise highlighted, the delegate items that are affected should draw themselves as highlighted.. Change-Id: Iefa226bb774c94f22582fae481a0649a3fcf069e Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit 9b4179a98a5cd4ed366717156c090ea99ede7002) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Imagine: fix ComboBox's implicit size bindingsOliver Eftevaag2022-09-021-2/+2
| | | | | | | | | | | | | | | | | | The parentheses were misplaced, causing e.g. contentItem.implicitWidth to be ignored. Without any parentheses, the same issue is present due to evaluation order, so we do still need them, just in the correct place. While we're at it, we replace contentItem.implicitWidth with implicitContentWidth so that Imagine respects implicitContentWidthPolicy (which was added in 49ffc6e6af83b295c67fd119b79c925879cc292e). Fixes: QTBUG-106098 Change-Id: I6ff08f5cb9309ae0494d95917ce8b7a22d2ba663 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit e11df48384e38f2903a88f8dd3db49b78f1e27c6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PinchHandler: Enforce min/max scale limits with native gesturesShawn Rutledge2022-09-023-19/+27
| | | | | | | | | | | | So far the qBound() using m_minimumScale and m_maximumScale was only applied for normal pointer events: there were no limits when using a touchpad that sends native gestures. Fixes: QTBUG-106110 Change-Id: Ibf8d955e5f1dac517e0a3e9588fb117d83f443a6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5cb3ba93da2673b20abae8a544a961b7b57dff45) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Integrate property binding evaluation fix from qtbaseFabian Kosmale2022-09-023-3/+47
| | | | | | | | | | | | This is basically the same as QTBUG-105204, only with the QML engine being involved. Fixes: QTBUG-104982 Change-Id: I5afaadedcd7af41198702a8f2331703b4f6ef2e7 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 2879c7c3411955b1d4f795436f803abd960c176d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickTableView: avoid printing out incorrect warningRichard Moe Gustavsen2022-09-021-4/+12
| | | | | | | | | | | | | | | | | | A warning would be printed out from TableView if you called positionViewAtCell with a mode that affected either horizontal or vertical alignment, but not both. The reason is that the overridden version would just forward the call to positionViewAtRow() and positionViewAtColumn(), without checking if the given mode allowed for it first. This patch will instead check the mode first, before deciding which functions to call. This will stop the warning from being incorrectly printed. Change-Id: I58145873def7543fcffd51ade7d15c70fb755aae Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit bca463b61c29e68fe2a9a63ebee8e35ed125085c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Optimize QQuickMultiPointHandler::grabPoints slightlyShawn Rutledge2022-09-021-1/+1
| | | | | | | | | Clazy reminded me about the usual const-ref optimization in a range for. Change-Id: I2eafb49d341758829ce8fc43a8e5432a2d6dd4f6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5b81451d448d667b500ae6283ded9e59826e72b3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Prevent lookup of value type where we need an object typeUlf Hermann2022-09-015-73/+97
| | | | | | | | | | | | | | | | | With a particular nefarious combination of Q_GADGET and inheritance from QObject you can make QmlCompiler believe a type is a value type even though it is actually an object type. We never want to touch such a thing. There was a safe guard against this when looking up the type from the scope, but by putting it in a type namespace you could circumvent it. Refactor the code to apply to both cases the same way. Fixes: QTBUG-104556 Fixes: QTBUG-105608 Change-Id: I8a690e2b6f78fcaba0911a93504cde0d2c7dde0d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 0a8fe228f6bb65afe08f1bc203653266fa204ba5)
* Parser: Preserve keywordiness of "static" across nested classesUlf Hermann2022-09-012-6/+23
| | | | | | | | | | | | | | | | "static" is a keyword in the context of JS classes, no matter how deeply nested. Therefore, keep track of the nesting level. Switching the keywordiness of "static" off during method definition parsing makes no sense as the standard doesn't mention such a thing. Method bodies are strict code where you cannot use "static" as identifier. Methods and properties can be called "static" no matter if static is a keyword or not. Fixes: QTBUG-96631 Change-Id: Ia09e52fe2ae72721fe1c8a9b95899a31095db988 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit b50d01891b1adba15c4cfc47ad078d227aa1f491)
* Doc: Do not refer to files in ComponentBehavior documentationUlf Hermann2022-08-311-4/+4
| | | | | | | | | | | | There may be multiple QML contexts created from one file. If you define a component in one of them, you cannot instantiate it in a different one. Change-Id: I8a130f60bc03979bae7b22495737c3d971c09618 Reviewed-by: Kari Hautamäki <kari.hautamaki@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 7d013de05860cdfd2df15b340685e9cc4a86a001) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fusion: add TreeViewDelegateRichard Moe Gustavsen2022-08-314-2/+66
| | | | | | | | | | | | | | | | Add a version of TreeViewDelegate.qml to the Fusion style, that looks more at home for that style (rather than using the one in the Basic style). This version is using the arrow-indicator from the Fusion style as expand/collapse indicator, and makes the height of each row match the height of a normal Fusion button. Change-Id: I153bb5776e23476cf8c383fb6f76e63981e28639 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 13a8df4a878a4f62e626b577cb92a2e0d0ba54c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: Do not use import version numbers anymoreKai Köhne2022-08-31171-245/+245
| | | | | | | | | Change-Id: I1f4d4920bb9d132a846ac2dbcfdb8b660759d540 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit b7f448f8647a9a118cee2d79d446194b20d4b335) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* examples, texteditor: remove the config file, and use default settings insteadRichard Moe Gustavsen2022-08-313-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qtquickcontrols2.conf file was hard coding the style to be Material. In addition, it was overriding both the Primary and the Foreground color, and sat Theme=System. The latter meant that the application would run in either Light or Dark mode, depending on the OS. And for Dark mode, the assigned colors caused the text to end up with the same color as the background color, and therefore be invisible. The same with the toolbar buttons; since the icon color of a toolbar button map to the primary color, and the primary color was hard-coded to be the same as the background color in the configuration file, the buttons would appear hidden. Since we now have native styles for both macOS and Windows (and Fusion on Linux), overriding the style (and especially the colors) in a config file seems unnecessary. This patch will therefore remove the whole config file, and use the default style settings instead. Fixes: QTBUG-105860 Change-Id: I330fe30746096cf26d8dca343f2c122d7c32c7fe Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit ec582ef0b9e31c5e8fb9d36a17f1e39f593d7455) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS Style: Make the theme property read-onlyDoris Verria2022-08-313-15/+2
| | | | | | | | | | | | | | We had marked the iOS Style's theme property as a writable property. However, setting the theme through it was not supported. It also doesn't make sense to set the theme through this attached property since in the QPA layer we set the appearance(theme) and subscribe to theme changes based on the traitCollection property of the UIWindow, which changes based on system-wide configurations. Change-Id: I36191a47d8892dff3069901e16abad82b9f9f82e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit c0f50622c7d75915e1a2f167b9bcfe6702f5dcb1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix builtin value type documentationUlf Hermann2022-08-312-24/+65
| | | | | | | | | | date was miscategorized, and variant and void were missing. list was confusing. Fixes: QTBUG-96779 Change-Id: I8398a1a4ff7f0dff12b626d5a2a7d182e1386bcb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit d183606126962e91508de80b8f3ea050ee663ae7)
* examples: deploy qmldir for plugin exampleSamuli Piippo2022-08-311-0/+2
| | | | | | | | | We need to deploy qmldir to make the example work also for remote targets. Change-Id: Id0b7bf4a48bd163ddf5e44a5a68ca3edbbcc008e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit b21290a731876d6c26546b48ab339d36cb873745) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* TreeViewDelegate: fix license headersRichard Moe Gustavsen2022-08-304-4/+4
| | | | | | | Change-Id: I8e71c13871086c5338a138a9e5d626ca458eb12f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit cb5a7529ca9cc86d28e3d2804d5a3766999c6568) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Transition: properly remove QPropery based bindingsFabian Kosmale2022-08-303-5/+54
| | | | | | | | | | | | We need to use QQmlAnyBinding::removeBindingFrom instead of the functionality in QQmlPropertyPrivate, as the latter does not correctly handle QProperty based bindings. Fixes: QTBUG-105535 Change-Id: Ifcd8d3a97ff6d62b365008768e6bf50cfa102a39 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit af5f853413c633c665696dc176677fdde196dd01) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix TextInput and TextField mouse/touch selection fallback behaviorShawn Rutledge2022-08-308-8/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We tried to make default behavior depend on the import version; but in Controls that does not work well, because the QQuickTextField instance is created in a style-specific QML file that does not use the same import version that the user is using. So we work around it by adding support for a Controls-specific env var to revert to pre-6.4 behavior. Adding the autotest proves that the fallback was broken a different way too: we didn't check selectByTouchDrag in all the necessary places. Amends 650342de792e0ab37ce8bac8ccde21ab9b96b2c9 [ChangeLog][Controls][TextField] The selectByMouse property is now enabled by default, but no longer enables selecting by dragging your finger across text on a touchscreen. Platforms that are optimized for touchscreens normally use special text-selection handles, which interact with Qt via QInputMethod. You can opt out of the behavior change by setting the environment variable QT_QUICK_CONTROLS_TEXT_SELECTION_BEHAVIOR=old. Task-number: QTBUG-10684 Task-number: QTBUG-38934 Task-number: QTBUG-101205 Change-Id: If1c1d6bd9c538f52022ae06d5252d178a1ae5a38 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 42848bda5cb7ed92781cbbd536005af617e91020) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix thread issue in TextEdit when font db updatesEskil Abrahamsen Blomfeldt2022-08-302-0/+6
| | | | | | | | | | | | | | | | | | | | | | | This amends 2fb43a35dfa08bb0746913e3363f1fcf21815e72, which introduced invalidation of text when the font database changes. The text invalidation is done from the render thread, which mostly works well because it is done during sync, so the main thread is locked. However, for TextEdit, the invalidation is more complex and would implicitly call documentChanged() which would then try to stop a timer. Since the timer has to be stopped from the owner thread, it would fail and throw a warning. So for TextEdit, we invoke the method on the main thread instead, which means it will use one extra update pass in order to properly invalidate its contents. Fixes: QTBUG-105992 Change-Id: Idc020c682dcb2d1f3c66d043cf98fe9c6e4dc2a1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 286ca997d1ebfdd046c7dc1ada884de3fd6acc01) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qquickmenu: Take into account menu margins when checking coordinatesDoris Verria2022-08-301-4/+4
| | | | | | | | Change-Id: I416de281882a2ad94d03567d12dbb1491ffa801c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit f66d0bfebeaa6c5cdea4d8d65de8bd29b50e50ca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmlls: fix import as resolutionFawzi Mohamed2022-08-305-15/+38
| | | | | | | | | | | | | | Import as resolution (i.e. finding a type that was imported with an import as) was broken in two ways: the shortcut looking for types did look only to types imported without as, and the normal lookup for symbols declared the ImportScope as visited (to avoid loops) too early in one case and would skip it. This was visible in qmlls completions of Controls. Change-Id: Ifc1e777973ddc251bd0685290e8d28bfb025f269 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 8e6dcc04fc1073b043eba6792472c2d7cd3d5993) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Blacklist tst_QQuickMultiPointTouchArea::nonOverlapping and nestedHeikki Halmet2022-08-301-0/+2
| | | | | | | | | | | nonOverlapping for Ubuntu 22.04 nested for Ubuntu 22.04 Task-number: QTBUG-101499 Change-Id: I28e8a4f61c9bb1a5e0b2185e88dff22fbf170e37 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 6186f7109a45a6cd477df39aff3d20d4f1f82593) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS Style: Don't start animation for non-indeterminate ProgressBarDoris Verria2022-08-301-2/+8
| | | | | | | | Check if progress bar is indeterminate before restarting animations. Fixes: QTBUG-105937 Change-Id: I8d827fc27336e0fd6fe3f8d308b117e558cbeb14 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* iOS style: Fix target name when linking to UIKitDoris Verria2022-08-301-1/+1
| | | | | | | Change-Id: I57e28b94b3795102cf2cb4e899102106cb47b145 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 375280f4e7e644d36cbbd6eb6179fa993b26a723) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS Style: Draw progress for indeterminate progressbarDoris Verria2022-08-301-1/+1
| | | | | | | | | | | | | | Ammends commit 4a6e7cec9978d6fc95a90895309531a7955ff944 which made the progress visible only when value was bigger than 0, but didn't take into account the indeterminate status. In the indeterminate status, the value is 0 but we still need to draw the progress. Task-number: QTBUG-105937 Change-Id: Idd313716a65fd5004524de8ac8ce5ecd59d3e599 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit f9205f39188ba769e597d87e15b0233bcc9776da) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS Style: Add Menu controlsDoris Verria2022-08-3047-1/+205
| | | | | | | | | Add Menu, MenuItem, and MenuSeparator. Change-Id: Ic5d6629418081e591c1abd28cea73b6c3b3ecd1c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit b1c90719fe991c5dd1f7e290c52eeeebe447278c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* TextArea: selectByMouse default=true, but not on touchscreensShawn Rutledge2022-08-2910-2/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you drag a finger across a TextArea, it should not select text. - your finger probably covers several characters, so you can't see where you're selecting until afterwards - if the item is in a Flickable, flicking by touch should be prioritized - if flicking happens, the text cursor should not move; but to avoid losing too much functionality, we allow it to move on release, if the TextArea gets the release (i.e. if it still has the exclusive grab) - TextArea's pressed, pressAndHold and released signals continue to behave the same with touch as with mouse As with the TextEdit change in 90d3fac73a10b9363fd34e6757cc730d7a0c086c, we now distinguish mouse events that are synthesized from non-mouse devices and avoid mouse-like behaviors as described above, but there is no behavior change if the event comes from an actual mouse or touchpad. In QQuickPressHandler::mousePressEvent() we give the original event's device to the delayed press event, now that we check the device to distinguish "real" mouse events from those that are synthesized from touch. [ChangeLog][Controls][TextArea] The selectByMouse property is now enabled by default, but no longer enables selecting by dragging your finger across text on a touchscreen. Platforms that are optimized for touchscreens normally use special text-selection handles, which interact with Qt via QInputMethod. You can opt out of the behavior change by setting the environment variable QT_QUICK_CONTROLS_TEXT_SELECTION_BEHAVIOR=old. Task-number: QTBUG-10684 Task-number: QTBUG-38934 Task-number: QTBUG-90494 Task-number: QTBUG-101205 Change-Id: Icbe81e547b1cf8d5e3cc3ed922f12c7b411ca658 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 3ebb3540df9729d336d90225d3b4c1d2ca182e8e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlModels: Fix enum resolution in ListElementUlf Hermann2022-08-298-19/+92
| | | | | | | | | | | | | | | | | | There were two problems: a, We need to allow recursion when querying for enums. Otherwise we cannot find enums in the same document. b, when the enum resolution is done in the validation phase, we cannot query the current document's QQmlType for enums, yet, as it's not finalized. However, the QQmlPropertyValidator has the QQmlPropertyCache we're looking for in that case. c, As a drive-by, fix the excessive conversions between QByteArray and QString. Fixes: QTBUG-95864 Change-Id: If0d2687986e1483a27ce11373a204235b92a6efd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit cad5c89a0f0ebb24f17171fdbab8355832f0f415) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmllint: Don't warn about access to attached enumsUlf Hermann2022-08-293-4/+12
| | | | | | | | | | | | You can always access enums of attached objects, no matter what other rules apply to the attached properties. Fixes: QTBUG-105590 Change-Id: I07878d8efe63468539168aa2c2842e3159ed2090 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit cc89f62851ce1b9f859e9bc43415d4ce7e3a36e2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Document behavior of remote implicit importsUlf Hermann2022-08-292-2/+11
| | | | | | | | | | | | They are remote directory imports for all practical purposes. Therefore, you need to add qmldir files to make them work. Fixes: QTBUG-92068 Change-Id: I7b11e55e53b2c96d95619ac2346cd45561e73b9a Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit a22bd4164e10fd2e208d0fa6e3373c8e27996952) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmlimportscanner: Don't crash on invalid argumentUlf Hermann2022-08-291-1/+5
| | | | | | | | | | | | | | Apparently you can pass one "root path" as a bare argument, but you have to specify "-rootPath" if you want to pass more than one. The whole concept of a "root path" is wrong. Therefore let's not add more ways to specify root paths. It should not crash, though. Fixes: QTBUG-104928 Change-Id: Ie8a10ac7208f927fdb1fed0f87c088739b41c983 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit d937a53cbcd72304ba1c613ed2d2dc2010542f7e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Connections: Mention old syntax and its problemsUlf Hermann2022-08-291-0/+6
| | | | | | | | | | In particular, you cannot mix old and new syntax in the same object. Fixes: QTBUG-93603 Change-Id: I27cb0a925baafa68715d9a5e2c505d963b4a390f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3cd0000b70f031116dcb7d907b48f56e0bc9f9e9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>