aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QtQml: Move ResolvedTypeReference into base CUUlf Hermann2024-01-139-80/+103
| | | | | Change-Id: I25063457aad3a6d29a8c2a5b236f9a51b56a2f51 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Move BindingPropertyData into the base CUUlf Hermann2024-01-136-16/+25
| | | | | Change-Id: I2edcb2c324919a1131ae490bee9c9b1140097b09 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Move inlineComponentData and icRootName into base CUUlf Hermann2024-01-139-58/+81
| | | | | | Change-Id: I89e44644b083681f069d1d7a385bec68b4bfd80b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Don't run automoc on *_qmlcache_loader.cpp generated filesDavid Faure2024-01-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Without this, CMake would warn: Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files. Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy command to set the policy and suppress this warning. For compatibility, CMake is excluding the GENERATED source file(s): "<builddir>/.rcc/qmlcache/myfile_qmlcache_loader.cpp" from processing by AUTOMOC. If any of the files should be processed, set CMP0071 to NEW. If any of the files should not be processed, explicitly exclude them by setting the source file property SKIP_AUTOMOC: set_property(SOURCE file.h PROPERTY SKIP_AUTOMOC ON) Pick-to: 6.7 Change-Id: Ifd1bad613ab21f5e2de2c42281e8c3261e2cfb03 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* API Cleanup: Remove focusReason from QQuickItem's public API and add docsDoris Verria2024-01-1310-60/+153
| | | | | | | | | | | | | | | | | | | | | | Make changes according to API review comments: - Remove focusReason property and relevant API from QQuickItem. Move it to private API in QQuickItemPrivate and rename it to lastFocusChangeReason. Defer exposing this property to QML for now. (In Qt7 we can expose it by adding it as a signal parameter to QQuickItem's focusChanged signal) - Add documentation for focusPolicy C++ API - Don't mark focusPolicy property as FINAL Partially reverts 1ca9928856c47108000ffe5f310f2b99740f087b Task-number: QTBUG-119952 Task-number: QTBUG-117596 Pick-to: 6.7 Change-Id: Ib4632b86c64e3221ca5e651d80d58b8c89fcf2b7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add underlying types to new enum typesEskil Abrahamsen Blomfeldt2024-01-122-2/+11
| | | | | | | | | Also adds static asserts to ensure values match up to the QQuickText enums. Pick-to: 6.7 Change-Id: I0a770e35e0a3fcaee4b88a65bea41dc4845d61f4 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Revert "Fix binding loop and polish issue in quick layout"Jani Heikkinen2024-01-122-9/+8
| | | | | | | | | | This reverts commit 9ad9d05f26184a79ad3fe09abdc662949088d19d. Reason for revert: QTBUG-120592 Change-Id: I6cba9e88832ac0d78280fd9d6f96b319748545be Pick-to: 6.7 6.6 6.5 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Revert "Remove dirty flag validation during geometry change in the layout"Jani Heikkinen2024-01-121-8/+2
| | | | | | | | | | This reverts commit d85de8da6011731e3ff31ae1361e71fecaedb0be. Reason for revert: QTBUG-120592 Pick-to: 6.7 6.6 6.5 Change-Id: I46f3b41508e9bfeca328b916ba172ea9e0d6aaa1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Remove the use of Q_QML_PRIVATE_EXPORTAlexey Edelev2024-01-1192-267/+267
| | | | | | Task-number: QTBUG-117983 Change-Id: I5790f01d614cd70c7fcc9bd817ec6ace3f3e3730 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove the use of GENERATE_PRIVATE_CPP_EXPORTSAlexey Edelev2024-01-1127-54/+27
| | | | | | | Task-number: QTBUG-117983 Change-Id: I584116bfd4d47deca914910b712c2ea3295f3e7f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Add CMake section about how to include .qrc files in a projectAndreas Eliasson2024-01-111-5/+32
| | | | | | | | | | | The current docs only describes how to do this in qmake. Let's use a tab and add a CMake section. Fixes: QTBUG-120568 Pick-to: 6.7 6.6 6.5 Change-Id: I766e92818c3e20aad5498443aa107aa369089ad0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* doc: Clarify the use of init_data()Joni Poikelin2024-01-111-2/+3
| | | | | | | Change-Id: Ie7923365bace8ed3d3c62b3ac1f19a7b2b06ab32 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Mike Trahearn <mtrahearn@topcon.com>
* Add doc for gc()Tasuku Suzuki2024-01-113-2/+14
| | | | | Change-Id: I920acf76846bece462b518239fc4c068a0fad8c1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Put the QML plugins to the non-config directoryAlexey Edelev2024-01-111-0/+31
| | | | | | | | | | | | | | | | | | | | The generated qmldir files that are used by QML engine specify the relative path to the QML plugins that are build within modules. So it's usually expected that plugins are located on the same level as the qmldir files. In Multi-Config builds all libraries are located in the build-specific directories by default. In this case QML engine is unable to locate the plugin and the application cannot be run without extra manual steps. This fixes this issue, by using the top-level plugin OUTPUT_DIRECTORY for the "default"(first) config as RUNTIME/LIBRARY_OUTPUT_DIRECTORY. In Windows platforms we need to make the same for non-static backing libraries, since we cannot rely on RPATH there. Task-number: QTBUG-99061 Pick-to: 6.2 6.5 6.6 6.7 Change-Id: I51a8864743b87fd6ec4ba7179e13f311c5bee403 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Extend the Q_IMPORT_QML_PLUGIN documentationAlexey Edelev2024-01-111-2/+14
| | | | | | | | | | | Add the explanation what is PluginName and how it's computed when using the modern QML API. Fixes: QTBUG-119372 Pick-to: 6.2 6.5 6.6 6.7 Change-Id: I7346f7b7f82c717ee79b07f4dcec0c0d1dc733b2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QmlCompiler: Allow primitive conversion if output is stored in varUlf Hermann2024-01-111-14/+23
| | | | | | | | | We can always convertStored() if the contained type has been fixed. Pick-to: 6.7 Fixes: QTBUG-120322 Change-Id: I7d834fa32a12503341c863c095d578ca6e838531 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Clear stale compilation units more thoroughlyUlf Hermann2024-01-114-18/+57
| | | | | | | | | There are various places where we can still hold references. Clean them up when asked to do so. Also, free unused types and caches outside the type loader mutex, and only once on engine shutdown. Change-Id: Iae77cd6f50ad847d29a7eae4ac5c7c1c2524065d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Move creation of ExecutableCompilationUnit into engineUlf Hermann2024-01-119-25/+40
| | | | | | | This is in preparation for letting the engine cache the executable CUs. Change-Id: Ideac10d8dda0784b41304b58f9b9fbd106173ea6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Remove QQmlTypeLoader from QQmlImportUlf Hermann2024-01-1122-149/+214
| | | | | | | | | The type loader belongs to the engine and we must not store it in engine-independent data structures. We do want the import cache to be stored in the type registry, though (in a separate change). Change-Id: I2828f5098b27bf1fc96852fc2bd160db44b109e7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Do detour through the CU for building property cachesUlf Hermann2024-01-111-1/+8
| | | | | | | | | | | | | This partially reverts commit bf2258e6f44f1279eee5e9c2dd595c5dd2020784. When building property caches we have to take the possibility into account that the QQmlType we have at hand is from a different QML engine. We therefore have to double check with our own QML engine. Pick-to: 6.7 Fixes: QTBUG-120189 Change-Id: If3b53a14b767f464318a61ed15d62077efd6bf61 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* qmlformat: Fix property names with escape charsSemih Yavuz2024-01-101-17/+1
| | | | | | | | | | | | Formatter was breaking the string literal property names if they consisted some escape sequences. Remove the complicated logic for rewriting, instead use the same literal that was scanned and assigned to propertyName. Pick-to: 6.5 6.6 6.7 Fixes: QTBUG-113776 Change-Id: I87d8c31d4893001e784536302e33f1f517f21acd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtQml: When clearing the type loader, also clear any pending eventsUlf Hermann2024-01-103-0/+23
| | | | | | | | | | The events typically hold references to the data blobs they want to notify about. Those will prevent such blobs from getting cleaned up. Since we are explicitly asked to clear everything, we should also clear those. Change-Id: I476b071d78555a561396181128f2e915df13aeee Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Get rid of the module mutexUlf Hermann2024-01-1010-85/+129
| | | | | | | | | | | | | It only exists so that the type loader can query pre-compiled and native modules from the loader thread. However, the type loader already has a mutex of its own. We can use that to inject a "native" blob into its script cache for the same effect. We need to get rid of the mutex so that we can use the module map for other compilation units, too. Change-Id: I5a9c266ea36b50f5ea69214110def644f7501674 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Always link executable CU on creationUlf Hermann2024-01-1018-207/+244
| | | | | | | | | | | | | | | We don't want floating unlinked executable CUs. They should always be tied to an engine, and the engine should not change. This gives us one definite point where to register them with the engine (to be done in subsequent change). Unfortunately, due to the refcounting, we need to remove the engine from any still-referenced CUs when the engine itself is destructed. We will be able to drop the refcounting and make the engine fully own its executable CUs once we can hold base CUs in most places. Change-Id: I9a53e83d5c4746c2b2bca896b51baa4fe7fee757 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Make base CU a member of ExecutableCompilationUnitUlf Hermann2024-01-1019-116/+159
| | | | | | | | | | | | We want to re-use the base compilation unit across engines. For that to work it cannot be a slice of the engine-specific ExecutableCompilationUnit. Since CompiledData::CompilationUnit is refcounted on its own now, make it unmovable. Change-Id: I8418c9754d7a07e5210c1e7a7fc69355e1d57807 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove dirty flag validation during geometry change in the layoutSanthosh Kumar2024-01-101-2/+8
| | | | | | | | | | | | | | | The patch 9ad9d05f26184a79ad3fe09abdc662949088d19d adds validation to avoid rearrange in the layout as there is possibility to refer invalid QGridLayoutItem (particularly during item removal from the layout). The same can be fixed through m_disableRearrange flag which cause rearrange to happen in next polish (as with the earlier fix) instead of geometryChange(). Fixes: QTBUG-120592 Pick-to: 6.7 6.6 6.5 Change-Id: Ia17a41eeba46797631263d865de055b46e1208f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Update 3rd party directories to SPDX-License-RefLucie Gérard2024-01-1031-1179/+63
| | | | | | | | Task-number: QTBUG-120262 Pick-to: 6.6 6.7 Change-Id: I57c610421e9d499175856ff6f9520710b18c8a3c Signed-off-by: Lucie Gérard <lucie.gerard@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* QQuickItem::map{To,From}Item: Handle items living in different windowsTor Arne Vestbø2024-01-102-2/+15
| | | | | | | | | | | | | | | With child windows now being a possibility, we need to account for the two items in a map{To,From}Item being in different windows. This also fixes mapping between items in different top level windows. The item's scene is defined as the window the item is rendered into, so nothing changes in that regard. Each window is its own scene; either another top level scene/window, or a child/sub-scene. Change-Id: Id2456bf1ab3b913ff9227dd10e90e756ccf33364 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* FileDialog: set url schema when using the file name text fieldOliver Eftevaag2024-01-101-1/+4
| | | | | | | | | | | | | | | | When using the text field to choose a file name inside the non-native file dialog, the selectedFile property would be updated based on the currentFolder property and what the newly typed filename was. However, the schema was ignored. This patch fixes the issue by also setting the schema in QQuickFileDialogImpl::setFileName(const QString &fileName). Fixes: QTBUG-120065 Pick-to: 6.7 6.6 6.5 Change-Id: I1860fbbc8209270d0bc6e34a4be6a91bad2253ab Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* QtQml: Clean up QIntrusiveListUlf Hermann2024-01-091-183/+102
| | | | | | | | | Allow const iteration and move all the functions inline so that it becomes more readable. Change-Id: I0c7c9f6607519f842c86476dd6d7dfba65a38575 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Clarify QQuickItem::map{To,From}Item when passed a nullptrTor Arne Vestbø2024-01-091-2/+2
| | | | | | | | | | | | | | Passing nullptr when mapping to/from an item results in mapping relative to the scene's coordinate system, and this is also what the "Scene Coordinates" section of "Concepts - Visual Coordinates in Qt Quick" documents. Avoid the ambiguous term "root QML view", which may be mistaken for the top level window in a child-window scenario. Pick-to: 6.7 6.6 6.5 Change-Id: Ibd386ec8248f5e398b04248d15c7cf48bd46c090 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* WindowContainer: Don't apply visibility to contained window without parentTor Arne Vestbø2024-01-091-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Window with a visual parent will not become visible until it inserted as a child into another window, as otherwise the Window would be shown as a top level window. We handle this by listening for ParentWindowChange events, and then call applyWindowVisibility(), which applies the Window's visible state. The reverse is also the case, when the Window loses the parent window, in which case we get the same ParentWindowChange callback. In both these cases, the logic for whether to defer showing the window or not is contained within applyWindowVisibility(), but the logic was assuming that the visual parent was another item. That's not always the case, as a Window can have another Window as its visual parent. In that case we internally parent the child window to the contents item of the outer Window, but the visual parent property still reflects the Window. To solve this, remove the assumption about the visual parent always being an item. The deferred visibility logic should apply in all cases, regardless of what type the visual parent is. Pick-to: 6.7 Change-Id: I3f7309ac92274ede72f07f350ce2b1ab65234b83 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* WindowContainer: Decouple contained window from parent on window changeTor Arne Vestbø2024-01-091-1/+22
| | | | | | | | | | | | | | We get the parentWindowChanged() callback when the window the container item is in is going away, or the container is moved out of the window. We need to decouple the contained window from the item's window at that point, as otherwise the item's window will take the contained window down with it if its destroyed before the container, which doesn't match the semantics of the window container ultimately managing the window. Pick-to: 6.7 Change-Id: Ie4640d1e30677a8559a1ba6f19d1eb2aecc87d80 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* WindowContainer: Handle the contained window being destroyedTor Arne Vestbø2024-01-092-0/+15
| | | | | | | | | | | The contained window may be deleted under our feet, in which case we need to ensure that we're not operating on a stale window reference, and that we reflect the now missing window in the container's state. Pick-to: 6.7 Change-Id: I3484e8dfa84524b6ff9ccb89e847cec91a9baced Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* WindowContainer: Call QJSEngine::objectOwnership without instanceTor Arne Vestbø2024-01-091-1/+1
| | | | | | | | | | | The function is static, so going via qmlEngine(this) is not needed, and might be confusing in the cases where the returned engine is nullptr, which would presumably cause a crash if we were not operating on a static method. Pick-to: 6.7 Change-Id: Ieaf20d302493a51fefaa2a2ac6acd5b89b348803 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* TableView: start a new selection when using Qt::ShiftModifierRichard Moe Gustavsen2024-01-092-6/+20
| | | | | | | | | | | | | | | If no selection exists in TableView from before, and the user shift-clicks on a cell, then start a new selection from the current cell towards the clicked cell. This is already how it works if a selection is started using the keyboard, and also standard selection behavior for other item view implementations outside of Qt (e.g Finder on macOS). Fixes: QTBUG-120628 Pick-to: 6.7 6.6 6.5 Change-Id: I2fd34e680eed9992dd7c405fbd58ae4f5b0834ec Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Doc: Describe correct case for stylesAndreas Eliasson2024-01-091-1/+1
| | | | | | | | | | The current text says to use lowercase for styles, such as Material, when, in fact, it is capitalized. Fixes: QTBUG-119994 Pick-to: 6.7 6.6 6.5 Change-Id: I2d473f8be525326318f325b05b75e01f8772d7ec Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Compiler: Handle all integer signs and sizes when converting primitivesOlivier De Cannière2024-01-091-4/+2
| | | | | | | | Fixes: QTBUG-120473 Pick-to: 6.7 Change-Id: I4941cd1567d94823551e4cc94df8bc5b413e951c Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Compiler: Guard against null dereference when ignoring function returnOlivier De Cannière2024-01-091-7/+9
| | | | | | | | | | | | | | | | | | | When a function is called, two arrays with the necessary information are passed to the engine: argv: [return address, prameter 1 address, parameter 2 address, ...] types: [return type, parameter 1 type, parameter 2 type, ...] When the result of the call is ignored, the return type is set to void and the return address to null. A check for this null value was missing leading to a null derefence. Amends: 4f1b9156a48e44cf1f127a4563d0ac69ab436f12 Fixes: QTBUG-120336 Pick-to: 6.7 Change-Id: I4a21779f3276b0143087b41b0d16c0cd3ba0e7db Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Change QSGTextNode::anchorColor to QSGTextNode::linkColorEskil Abrahamsen Blomfeldt2024-01-095-15/+15
| | | | | | | | This matches the property in the Text element. Pick-to: 6.7 Change-Id: Ic957b10cd615942583dae3148e4a8f23e22d26cb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove the use of Q_QUICKTEMPLATES2_PRIVATE_EXPORTAlexey Edelev2024-01-0991-117/+117
| | | | | | Task-number: QTBUG-117983 Change-Id: Ie8e0cf7d4b891e97f5624401da78a1b6e8eb9fd0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove the use of Q_QUICKSHAPES_PRIVATE_EXPORTAlexey Edelev2024-01-094-13/+13
| | | | | | Task-number: QTBUG-117983 Change-Id: I733ccf08ac4b5ed3b30e165d21c1d27e833809c9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove the use of Q_QUICKLAYOUTS_PRIVATE_EXPORTAlexey Edelev2024-01-094-10/+10
| | | | | | Task-number: QTBUG-117983 Change-Id: Ib64b6a344fdda8e21a126af228ce9b581f8fccde Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove the use of Q_QUICKDIALOGS2UTILS_PRIVATE_EXPORTAlexey Edelev2024-01-092-2/+2
| | | | | | Task-number: QTBUG-117983 Change-Id: Icfa0cdccab78f73b1005b9e22f541bdcd8fbea3d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove the use of Q_QUICKDIALOGS2QUICKIMPL_PRIVATE_EXPORTAlexey Edelev2024-01-0919-24/+24
| | | | | | Task-number: QTBUG-117983 Change-Id: I3a5f4d2dceb2399e89655d3789cf6cb3fbe5815e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Read the use of Q_QUICKDIALOGS2_PRIVATE_EXPORTAlexey Edelev2024-01-097-7/+7
| | | | | | Task-number: QTBUG-117983 Change-Id: I0b7e7ff3e305840efcd3e463ad562f48720c825e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove the use of Q_QUICKCONTROLS2IMPL_PRIVATE_EXPORTAlexey Edelev2024-01-0915-15/+15
| | | | | | Task-number: QTBUG-117983 Change-Id: Ia093cfc942015f54547224f0af566c34a7033fce Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove the use of Q_QUICK_PRIVATE_EXPORTAlexey Edelev2024-01-09169-314/+314
| | | | | | Task-number: QTBUG-117983 Change-Id: Ia904c9390efb13b92de2e16fa0690e48394f9bab Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove the use of Q_QMLXMLLISTMODEL_PRIVATE_EXPORTAlexey Edelev2024-01-092-3/+3
| | | | | | Task-number: QTBUG-117983 Change-Id: Ib2f6f6b4ffa27a469ba3deb2603c17342b6bd86c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove the use of Q_QMLWORKERSCRIPT_PRIVATE_EXPORTAlexey Edelev2024-01-092-2/+2
| | | | | | Task-number: QTBUG-117983 Change-Id: I80c13c1b85124a5020297f53badff4534befd47b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>