diff options
author | 2024-10-25 03:03:09 -0400 | |
---|---|---|
committer | 2024-10-25 03:12:18 -0400 | |
commit | 32b40fb3712c792bb39a2c68d1fb97bb1ee46fd7 (patch) | |
tree | c5f5609d9fe4632b420d76c89c76412e0f683614 /dev-qt/qtdeclarative/files | |
parent | x11-misc/rofi-file-browser-extended: add github upstream metadata (diff) | |
download | gentoo-32b40fb3712c792bb39a2c68d1fb97bb1ee46fd7.tar.gz gentoo-32b40fb3712c792bb39a2c68d1fb97bb1ee46fd7.tar.bz2 gentoo-32b40fb3712c792bb39a2c68d1fb97bb1ee46fd7.zip |
dev-qt/qtdeclarative: backport fix for QTBUG-129622
This should resolve the last (known) major blocker for
potentially stabilizing 6.7.3, likely in a few days if
nothing comes up.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-qt/qtdeclarative/files')
-rw-r--r-- | dev-qt/qtdeclarative/files/qtdeclarative-6.7.3-QTBUG-129622.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-6.7.3-QTBUG-129622.patch b/dev-qt/qtdeclarative/files/qtdeclarative-6.7.3-QTBUG-129622.patch new file mode 100644 index 000000000000..3e2bc70b5c2c --- /dev/null +++ b/dev-qt/qtdeclarative/files/qtdeclarative-6.7.3-QTBUG-129622.patch @@ -0,0 +1,84 @@ +https://bugreports.qt.io/browse/QTBUG-129622 +https://bugs.kde.org/show_bug.cgi?id=493854 +https://codereview.qt-project.org/c/qt/qtdeclarative/+/598853 +--- a/src/quick/items/qquickitemview.cpp ++++ b/src/quick/items/qquickitemview.cpp +@@ -2481,5 +2481,7 @@ + QQuickItemPrivate::get(item->item)->setCulled(true); + } +- if (!isClearing) ++ // If deleteLater was called, the item isn't long for this world and so we shouldn't store references to it. ++ // This can happen when a Repeater is used to populate items in SwipeView's ListView contentItem. ++ if (!isClearing && !QObjectPrivate::get(item->item)->deleteLaterCalled) + unrequestedItems.insert(item->item, model->indexOf(item->item, q)); + } else if (flags & QQmlInstanceModel::Destroyed) { +--- a/tests/auto/quickcontrols/controls/data/tst_swipeview.qml ++++ b/tests/auto/quickcontrols/controls/data/tst_swipeview.qml +@@ -5,4 +5,5 @@ + import QtTest + import QtQuick.Controls ++import QtQuick.Layouts + + TestCase { +@@ -761,3 +762,61 @@ + compare(item2.x, swipeListView.width) + } ++ ++ Component { ++ id: zeroSizeSwipeViewWithRepeatersComponent ++ ++ Item { ++ objectName: "rootItem" ++ anchors.fill: parent ++ ++ property alias swipeView: swipeView ++ property int d ++ ++ Timer { ++ interval: 2 ++ running: true ++ repeat: false ++ onTriggered: d = 2 ++ } ++ ++ SwipeView { ++ id: swipeView ++ contentItem.objectName: "swipeViewListView" ++ ++ Repeater { ++ objectName: "swipeViewContentItemRepeater" ++ model: [ ++ { ++ title: d ++ } ++ ] ++ ++ delegate: GridLayout { ++ objectName: "gridLayoutDelegate" ++ ++ Repeater { ++ id: repeater ++ objectName: "delegateRepeater" ++ model: d ++ delegate: Item { ++ objectName: "delegate" + index ++ ++ required property int index ++ } ++ } ++ } ++ } ++ } ++ } ++ } ++ ++ // QTBUG-129622 ++ function test_zeroSizeSwipeViewWithRepeaters() { ++ let root = createTemporaryObject(zeroSizeSwipeViewWithRepeatersComponent, testCase) ++ verify(root) ++ ++ let swipeView = root.swipeView ++ tryCompare(root, "d", 2) ++ // Shouldn't crash when the model is changed. ++ } + } |