aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicklayouts
Commit message (Collapse)AuthorAgeFilesLines
* Make the default layout size policy configurable at the component levelSanthosh Kumar8 days2-1/+47
| | | | | | | | | | | | | | The default size policy that can be set through application attribute affects globally and there are no configurations provided at the component level to opt-out. This makes it inflexible for the user who wants different behavior at the component level. This patch relaxes the above limitation by adding support to configure default layout size policy at the component level. Task-number: QTBUG-117597 Change-Id: Ic4ea3adbd6f3056bffca5d22690b968c7b6296f0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Enable layouts to respect other size policies than Fixed and PreferredJan Arve Sæther10 days2-18/+22
| | | | | | | | | | If no Layout.fillWidth/fillHeight is set, it will fallback to the default built-in size policies, which might be e.g. Expanding or Minimum Task-number: QTBUG-117597 Change-Id: I3cd43cdfb6b4beaefedb81605f52794afba55641 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Do not try to rearrange if the width/height is < 0Jan Arve Sæther2024-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes a crash in this peculiar condition: Item { width: 0 height: 0 RowLayout { anchors.fill: parent anchors.leftMargin: 1 anchors.leftMargin: 1 } } Reason for crash: As a consequence the layout was rearranged with size == (-1, -1), (which happens to be the value of uninitialized QSizeF). This invalid size was passed down to QGridLayoutEngine::setGeometries() (in the contentsGeometry QRect), and again to ensureGeometries(). ensureGeometries() would return early because of the condition if (q_cachedSize == size) (q_cachedSize is an uninitialized QSizeF by default, and size == (-1, -1) This caused the q_xx, q_yy, q_widths, and q_height to not be properly initialized, and it would crash inside QGridLayoutEngine::setGeometries() when accessing the list: qreal x = q_xx.at(item->firstColumn()); Pick-to: 6.2 6.5 6.7 Fixes: QTBUG-124456 Change-Id: I2e3586389aa1728c3622e92bd589af87d11955ae Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Layouts: reimplement toString() for better warning messagesMitch Curtis2024-04-172-0/+3
| | | | | | | | | | | | | | | | When combined with the patch in qtbase that adds the virtual toString function to QGridLayoutItem, this turns the following warning QGridLayoutEngine::addItem: Cell (1, 0) already taken into the much more informative QGridLayoutEngine::addItem: Can't add QQuickRectangle(0x6110000d5100, id="r4", parent=0x6110000d4ac0, geometry=0,0 20x20) at cell (1, 0) because it's already taken by QQuickRectangle(0x6110000d4e80, id="r2", parent=0x6110000d4ac0, geometry=0,0 20x20) This makes it easier to see which item warnings are referring to. Change-Id: I80a85b77abcb404fb0d6bc622baa1be3cd9e0df5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* QQuick: Use a QQmlListProperty to expose a list of objectsUlf Hermann2024-04-172-4/+11
| | | | | | | | | That's what is best supported in QML. You can create a read-only list by omitting the mutating methods on construction. Task-number: QTBUG-101143 Change-Id: Ic6a0e86085f77c8f2b74b47a6ffa0efdb2507098 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix binding loop and polish issue in quick layoutSanthosh Kumar2024-04-092-27/+21
| | | | | | | | | | | | | | | | | | | | | The quick layout item caused a binding loop issue when layout item sizes were updated in between polish. This has been fixed by not allowing rearrange during geometry change, if the layout is already dirty due to polish event. There is also a polish issue due to the child item not being invalidated and it can lead to skipping the corresponding item box size calculation. This patch invalidates all the items in the rearrange list of the layout and finally, invalidates the engine and layout. The threshold limit to trigger layout polish has also been removed now. Fixes: QTBUG-117899 Fixes: QTBUG-118511 Pick-to: 6.7 6.6 6.5 Change-Id: Ie5713f51ed9e428786046bb06a822e5668beebb0 Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Use Qt::AA_QtQuickUseDefaultSizePolicy to apply size policy for layoutSanthosh Kumar2024-03-052-10/+38
| | | | | | | | | | | | | The default size policy that need to be applied for quick items within the layout has been changed as opt-in. This further require layout to consider Qt::AA_QtQuickUseDefaultSizePolicy attribute and the same been tested for set before applying those size policies. Task-number: QTBUG-117597 Pick-to: 6.7 Change-Id: Idbd27f8cd1ffbfe7631e953c787234f9f1e5b0e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Layouts: Remove "tech preview" notesJan Arve Sæther2024-02-292-15/+0
| | | | | | | | | | These are no longer tech preview in Qt 6.8: * LayoutItemProxy * uniformCellWidths/uniformCellHeights/uniformCellSizes Change-Id: Idfac34c51a6a0b55f7884ea35a8c1fcb4d05a3e7 Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
* Revert "Adapt layouts to take advantage of new size policy information"Santhosh Kumar2024-02-292-38/+10
| | | | | | | | | | | | | This reverts commit dd72694b6046d98a64bd99361ed9cb4613af78f8. Reason for revert: This is needed in order to rename AA_QtQuickDontUseDefaultSizePolicy to AA_QtQuickUseDefaultSizePolicy in qtbase Change-Id: I41d34682fed794cc3594f967b0e58892107b3a33 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Adapt layouts to take advantage of new size policy informationSanthosh Kumar2024-02-222-10/+38
| | | | | | | | | | | | | | The size policy been defined for QQuickItem and its subclasses (as part of task QTBUG-117597). This commit adds code so that Qt Quick Layouts will effectively use them. It also have an opt-out code path by testing for QGuiApplication::testAttribute(Qt::AA_QtQuickDontUseDefaultSizePolicy) Task-number: QTBUG-117597 Pick-to: 6.7 Change-Id: I624509a77a870d72a5c4ce96505516bf30801559 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Layouts: Make {Row,Column}Layout.uniformCellSizes visible to QMLJan Arve Sæther2024-02-201-0/+1
| | | | | | | | | | | | Problem was that the property uniformCellSizes was inherited from QQuickLinearLayout, while it was only the concrete subclasses QQuick{Row,Column}Layout that was registered in the QML engine. Marking QQuickLinearLayout as anonymous solves this issue. Pick-to: 6.7 6.6 Fixes: QTBUG-122024 Change-Id: I9612de2c43ba1219278ffbd417563e5c2788458c Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Partially revert "Make properties in Qt Quick Layouts FINAL"Fabian Kosmale2024-02-162-9/+10
| | | | | | | | | | | | | | Making properties FINAL is an API break not covered by any QUIP rule. However, this does not apply to the attached types whose properties were marked FINAL in the referenced commit, as it is not possible to derive from them anyway. Moreover, properties only introduced with Qt 6.6 can also stay final (given that they are revisioned). This partially reverts commit b949315427a7da1e91462fa4fce0ad35abaea2d4. Pick-to: 6.6 6.7 Change-Id: I45a03f15db7a34bbbe6befe24bb4d50556c20bf6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* 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 GENERATE_PRIVATE_CPP_EXPORTSAlexey Edelev2024-01-111-2/+1
| | | | | | | 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>
* 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>
* 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>
* Fix binding loop and polish issue in quick layoutSanthosh Kumar2023-12-212-8/+9
| | | | | | | | | | | | | | | | | The quick layout item cause binding loop issue when layout item size were updated in-between polish. This has been fixed by not updating layout size hint during rearrange. But there is polish issue due to child item not being invalidated and this skips corresponding item box size calculation. This patch invalidate all the items in the rearrange list of the layout and finally, invalidate engine and layout. Fixes: QTBUG-117899 Fixes: QTBUG-118511 Pick-to: 6.7 6.6 6.5 Change-Id: I1e318335ce8b5268d878b48a02a089d703bb90ad Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Remove all QML_DECLARE_TYPE from src and toolsUlf Hermann2023-11-181-2/+0
| | | | | | | | They are generally not useful for anything. Change-Id: I12e959ce9338e6eb7465633496c7921fa09a3fe8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Fix linking issuesTopi Reinio2023-07-051-5/+5
| | | | | | | | | | | | | | | | | | | * Remove broken links to 'Scene Graph - Rendering FBOs' example as it no longer exists. * Remove a link to 'Calendar Example' from a list of QML examples; this was a widgets example. * TableView: Fix linking to enumeration values and change enum properties to use \value commands. * LayoutItemProxy: Fix linking to Item.visible property. * Shape: Fix broken links to enumeration values. Pick-to: 6.6 Change-Id: Id3a33cac722dd62c61792eeb7163a01d6fd2b6e5 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* Make properties in Qt Quick Layouts FINALOliver Eftevaag2023-06-073-37/+36
| | | | | | | | | | | | | | | | | | | Without setting the FINAL flag, properties can be shadowed by users. This can both cause confusion for non-experienced users, and it causes issues with qmlsc. [ChangeLog][Important Behavior Changes][Layouts] Properties for types in the Qt Quick Layouts module are now FINAL, meaning they can no longer be shadowed by declaring new properties with the same names in QML. A warning will be printed out to the console, when a FINAL property is being shadowed. We recommend that users rename those properties to avoid potential unexpected behavior changes. Pick-to: 6.6 Task-number: QTBUG-108739 Change-Id: If09b220775ff2a20a84bccd78d39f5114472e151 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Replace Q_OS_OSX with Q_OS_MACOSTor Arne Vestbø2023-06-071-1/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: I1e408b9676a9bfc299dcd45f1c790827e316db30 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Mask some QML attached properties as read-onlyIvan Tkachenko2023-06-061-0/+4
| | | | | | | This affects ListView, GridView, PathView and StackLayout. Change-Id: Iacff4cf9118323916ca66bd755736a397c26fc43 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickLayout: improve polish loop warningMitch Curtis2023-06-051-1/+2
| | | | | | | | | | | | | - Print the layout that caused (or detected) the loop to make finding it easier. Until now it was only possible to find the item by debugging Qt, which is tedious for users. - Replace the module prefix ("Qt Quick Layouts") with a simpler "Layout" prefix, as qmlWarning(this) already ensures that the type name is printed at the beginning of the warning. Pick-to: 6.5 6.6 Change-Id: Ief801cad21958d7a8da406452f2918889f90658f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Introduction of LayoutItemProxyJan Arve Sæther2023-06-023-0/+676
| | | | | | | | | | | | | The LayoutItemProxy is a proxy for an arbitrary QuickItem that is intended to be used in Layouts. This allows to position a QuickItem in multiple layouts to build responsive layouts. [ChangeLog][Layouts] Added LayoutItemProxy, a helper item for writing responsive layouts. Task-number: QTBUG-71153 Change-Id: Ief2bdbf44b3b346157ce2c71a313cc1e132f49ac Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Expose isPropertySet of Layout attached dataMatthias Rauter2023-06-022-0/+20
| | | | | | | | | | | | The Layout attached data stores whether a property was set or not. This is useful to know from outside the Layout attached property and this patch exposes this information. It was not stored for two properties (alignment, margins), which is also added with this patch. This is also done in preparation for the LayoutProxyItem. Change-Id: Ia1ec33fa1f1f5836857ceba7999d7a0e750f1a66 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Add uniformCellWidths and uniformCellHeights to QuickLayoutMatthias Rauter2023-06-012-0/+130
| | | | | | | | | | | Some users wish to make layouts with uniform column widths or uniform row heights, ignoring the sizeHints of individual items. This patch enables this mode in the QuickLayout. [ChangeLog][Layouts] Added uniformCellSizes properties to QuickLayout Change-Id: I25777d4d47d8d943f69e8f829a6d9602abccad92 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* doc: add both stretch factors to the list of attached propertiesOliver Eftevaag2023-05-161-0/+4
| | | | | | | | | | | | | The horizontalStretchFactor and verticalStretchFactor properties were both added in 6.5. Not only did we forget to mark them with a \since Qt 6.5, but we also forgot to add them to the list of attached properties that is mentioned on the RowLayout and ColumnLayout doc pages. Task-number: QTBUG-113230 Pick-to: 6.5 6.5.1 Change-Id: I8537fe5c9b5aa1389a8bfaf4e1abed3a1f0a34d5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Carl-Lucien Armand Schwan <carl.schwan@kdab.com>
* Allow a layout with width or height == 0 to resize its child itemsJan Arve Sæther2023-05-111-1/+1
| | | | | | | Fixes: QTBUG-112740 Pick-to: 6.5 Change-Id: I66327f3fa76d3f1c14b62d0ac42d3fd4c28288b2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix StackLayout to keep the current visible item after insert/removalJan Arve Sæther2023-04-262-4/+34
| | | | | | | | | | | | | | | | If an item is inserted or deleted at an index less than or equal to the current index, StackLayout.currentIndex will be updated in order to reflect which is the current visible item. This is consistent with QStackedLayout, QStackedWidget and TabBar [ChangeLog][QtQuick][Layouts] StackLayout will now update currentIndex if an Item is inserted or removed at an index less than or equal to the current index. Task-number: QTBUG-112691 Pick-to: 6.5 Change-Id: Id1d687e309c8f199a4f68698b53ca7c169f17dcd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix StackLayout to react to reordering siblingsJan Arve Sæther2023-04-252-0/+11
| | | | | | | | | | When siblings in a StackLayout are reordered, we need to react, since the sibling order corresponds to the "stack order" Fixes: QTBUG-112691 Pick-to: 6.5 Change-Id: Ie768af34bf5ee9d15ca67d61a64115f3df31990f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Avoid rebuilding the layout before the component is completeJan Arve Sæther2023-04-251-0/+2
| | | | | | | | | | | | | | | isReady() will only return true *after* componentComplete() and *before* destruction is about to happen There is no point in rebuilding the layout when an item is added or removed before the component is ready, because there will be a full layout rebuild as soon as the component is completed. This is a preparation for fixing QTBUG-112691 Pick-to: 6.5 Change-Id: I6e19578d847c6d4518479bc00f21442333e0fb07 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix stack layout index when loaded asynchronouslySanthosh Kumar2023-04-141-0/+5
| | | | | | | | | | | | | | | Lazy loading of stack layout causes incorrect index value in the attached property for the child items. This is because, attachedProperties are created and updated for the child object, after being added to the stack layout. This patchset triggers childItemsChanged() to reset child objects of stack layout with right index value. Fixes: QTBUG-111902 Pick-to: 6.4 6.5 Change-Id: Iad06d028d0f977189b5da1122904dc754060a609 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* doc: Use \value rather than \li for enumeration values and constantsShawn Rutledge2023-03-281-18/+10
| | | | | | Pick-to: 6.2 6.5 Change-Id: Ica8354a53d0a5fb5dd1d8cd5f774dcdc56b6f99a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Do not crash if resizing a layout that got its child destroyedJan Arve Sæther2023-03-231-0/+4
| | | | | | | | | | | Normally updatePolish() would call ensureLayoutItemsUpdated(), but in some cases the layout might be resized before the updatePolish() is processed. We therefore have to also call ensureLayoutItemsUpdated() from rearrange() Fixes: QTBUG-111792 Change-Id: Iab24dafc26dfa86975348c92244034f7ff825e5f Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Add {horizontal,vertical}StretchFactorJan Arve Sæther2022-12-088-2/+143
| | | | | | | | | | | This utilizes the standard implementation of stretch factors that is already in the QGridLayoutEngine [ChangeLog][QtQuick][Layouts] Added support for stretch factors Fixes: QTBUG-32923 Change-Id: I4afa7636dda465af2230c2919daa5c40831c44ae Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-072-2/+2
| | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix wrong item-sizeHint-cache when StackLayout children were reorderedJan Arve Sæther2022-10-072-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | This fixes the Tests_StackLayout::test_addAndRemoveItems() autotest The code uses an index to look up the cached size hints. This index corresponds to the layout's item child index (which doesn't have to correspond to the children index). The vector of sizeHints then had to be in sync with the index of the child layout items for this to work. The problem here was that if the first item in the stack was removed (or siblings was reordered), the vector was not adjusted for this (basically we could get the size hint of an previously removed item). In order to avoid to keep the QVector<SizeHints> index in sync with the layout children index, we change it to use a QHash instead, where we look up by QQuickItem*. QHash<QQuickItem*, SizeHints> Task-number: QTBUG-106520 Task-number: QTBUG-106521 Pick-to: 6.4 6.2 5.15 Change-Id: I7c1f9fb018fcab093b074c45dfaba264f76749f4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove unused QQuickGridLayoutEngine::alignment() functionJan Arve Sæther2022-10-072-8/+0
| | | | | | Pick-to: 6.4 6.2 Change-Id: Ifc8312b796b2c58171957a6cf545571cf7df5ec3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Do not listen to baselineOffset changes unless really neededJan Arve Sæther2022-09-273-2/+17
| | | | | | | | | | | | | | | | | | | | | | For some controls, (e.g. TextInput and Text) we can get changes in baseline offset when they change their height. These changes will invalidate the layout and generate a polish event. This means that during a rearrange of a layout with TextInput children, it might change the height of its children. This might change the baselineOffset of these children, which again will cause the layout to have to be invalidated (and rearranged again) This double-loop is unnecessary if the layout is not supposed to align these items by their baselines, so we add some conditions to see if we really need to connect to the baselineOffsetChanged() signal. This also fixes a bug observed in the color dialog, where the semi-recursiveness described above lead to a problem with that the alpha TextField of the RGBA color input was *not* laid out by the parent RowLayout Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-105899 Change-Id: If66b4bbde6a37c962b157e166c883ba20ff24c21 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-09-071-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: Id89ed14990804a5024183e75382cc539d4293da1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* StackLayout: Do not set size of children to (-1, -1)Jan Arve Sæther2022-08-262-4/+12
| | | | | | | | | | | The item-size-hint-cache in StackLayout was not always valid when QQuickStackLayout::rearrange() was entered, so it would end up setting the size of the item to (-1, -1) Pick-to: 5.15 6.2 6.3 6.4 Fixes: QTBUG-105899 Change-Id: I632aa18bb10b84d59af35cd3c7cb0c675d8d1692 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Fix compilation error when using QQuickLinearLayout in C++Yuhang Zhao2022-08-191-1/+1
| | | | | | | | | | | | QQuickRowLayout and QQuickColumnLayout both inherit from QQuickLinearLayout, however, QQuickLinearLayout is not exported, so if you try to use QQuickRowLayout or QQuickColumnLayout outside of Qt itself, you'll get compilation errors due to missing symbols. Fix it by simply exporting QQuickLinearLayout. Pick-to: 6.4 Change-Id: I8c87500ea67c560e9c27b534a8dbc03fb1388d68 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickStackLayout: also export the attached typeYuhang Zhao2022-08-131-1/+1
| | | | | | | | | Make QQuickStackLayout more usable for users besides Qt itself. Pick-to: 6.4 Change-Id: I1f39ba31d99cf6e52fdc26fde96900938413b77f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove Qt key words from header filesYuhang Zhao2022-07-193-7/+7
| | | | | | | | | | | So that users can use QT_NO_KEYWORDS when linking against QtDeclarative, even if they are using private headers. Docs, examples and tools are not touched because it's not necessary. Pick-to: 6.4 Change-Id: Idc30797074aaa72576429ebdaaf915d7f5acf84e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-081-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add "auto" to module DEPENDENCIESUlf Hermann2022-06-241-1/+1
| | | | | | | | | This has not effect at run time but signals to tooling that the same version of the dependent module should be assumed. Change-Id: I582f6df80822c2700d3929fe3581f9c10e1a62cf Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove all usage of m_ignoredItemsJan Arve Sæther2022-06-162-6/+1
| | | | | | | | | It's not used anymore in the base class, so its existence is currently pointless Pick-to: 6.2 6.3 6.4 Change-Id: I7838ae9a570b3167a14558422fd6938fb4dac200 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1111-418/+22
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>