diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-04 01:01:47 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-04 01:01:48 +0200 |
commit | 3a1613c2276a30ccf101e7349d89611cf5d86e6a (patch) | |
tree | a58ca18e938b88bb0952cbcd3c70252ad2eb2ae0 /examples | |
parent | 127ed7e6e0f8939861cce7349e28a1dec9a7d6ed (diff) | |
parent | a978d21dac57697ae9557b99062bc804b005b9d4 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I43393cf47675fd6c14972df1221986335c6f493c
Diffstat (limited to 'examples')
-rw-r--r-- | examples/widgets/graphicsview/flowlayout/flowlayout.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/widgets/graphicsview/flowlayout/flowlayout.cpp b/examples/widgets/graphicsview/flowlayout/flowlayout.cpp index 54914b3746..03cf320568 100644 --- a/examples/widgets/graphicsview/flowlayout/flowlayout.cpp +++ b/examples/widgets/graphicsview/flowlayout/flowlayout.cpp @@ -62,7 +62,7 @@ FlowLayout::FlowLayout(QGraphicsLayoutItem *parent) : QGraphicsLayout(parent) void FlowLayout::insertItem(int index, QGraphicsLayoutItem *item) { item->setParentLayoutItem(this); - if (index > m_items.count()) + if (index > m_items.count() || index < 0) index = m_items.count(); m_items.insert(index, item); invalidate(); |