diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-03-03 01:00:05 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-03-03 12:23:20 +0100 |
commit | 04e3918f0fd0c19ed830d406e1c549a037089cc4 (patch) | |
tree | 8e07ee9c550124b277983542e2ad0f7a791b5276 /src/quick | |
parent | b760d972459fd3b0c41e4c85076fa933ba5c0d1d (diff) | |
parent | 254a56252874b63430701351dcd8c9bef8507353 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
src/qmlmodels/qqmltableinstancemodel.cpp
src/qmlmodels/qqmltableinstancemodel_p.h
Change-Id: I89339b1cb41ba27fe30c79530859a1c2bfbecc69
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 8 | ||||
-rw-r--r-- | src/quick/items/qquicktableview.cpp | 11 | ||||
-rw-r--r-- | src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp | 10 |
3 files changed, 22 insertions, 7 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index bc68d46075..4d9e3de859 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -2569,6 +2569,7 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo bool skip = false; QQuickItem *startItem = item; + QQuickItem *originalStartItem = startItem; // Protect from endless loop: // If we start on an invisible item we will not find it again. // If there is no other item which can become the focus item, we have a forever loop, @@ -2644,7 +2645,12 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo } } from = last; - if (current == startItem && from == firstFromItem) { + // if [from] item is equal to [firstFromItem], means we have traversed one path and + // jump back to parent of the chain, and then we have to check whether we have + // traversed all of the chain (by compare the [current] item with [startItem]) + // Since the [startItem] might be promoted to its parent if it is invisible, + // we still have to check [current] item with original start item + if ((current == startItem || current == originalStartItem) && from == firstFromItem) { // wrapped around, avoid endless loops if (item == contentItem) { qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: looped, return contentItem"; diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index 6124c8304b..4926d81cfe 100644 --- a/src/quick/items/qquicktableview.cpp +++ b/src/quick/items/qquicktableview.cpp @@ -441,7 +441,16 @@ QQuickTableViewPrivate::QQuickTableViewPrivate() QQuickTableViewPrivate::~QQuickTableViewPrivate() { - releaseLoadedItems(QQmlTableInstanceModel::NotReusable); + for (auto *fxTableItem : loadedItems) { + if (auto item = fxTableItem->item) { + if (fxTableItem->ownItem) + delete item; + else if (tableModel) + tableModel->dispose(item); + } + delete fxTableItem; + } + if (tableModel) delete tableModel; } diff --git a/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp b/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp index e981921c69..7c98e2c1e1 100644 --- a/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp +++ b/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp @@ -136,12 +136,12 @@ Texture::Texture(Atlas *atlas, const QRect &textureRect, const QByteArray &data, { float w = atlas->size().width(); float h = atlas->size().height(); - QRect nopad = atlasSubRect(); + const QRect &r = atlasSubRect(); // offset by half-pixel to prevent bleeding when scaling - m_texture_coords_rect = QRectF((nopad.x() + .5) / w, - (nopad.y() + .5) / h, - (nopad.width() - 1.) / w, - (nopad.height() - 1.) / h); + m_texture_coords_rect = QRectF((r.x() + .5) / w, + (r.y() + .5) / h, + (size.width() - 1.) / w, + (size.height() - 1.) / h); } Texture::~Texture() |