summaryrefslogtreecommitdiffstats
path: root/src/controls/Styles/Android/qquickandroid9patch.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-07-09 14:44:47 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-08-31 11:17:04 +0200
commit71c0d0e34a08e812932bf6db2419d6aa307ba6b0 (patch)
tree8f7ebe554b34abb9a47e98b901ad3c09861a27f4 /src/controls/Styles/Android/qquickandroid9patch.cpp
parent7aeaa7aa1ef38ed337b41ea785852c72e48d6f22 (diff)
Use QList instead of QVector
Task-number: QTBUG-84469 Change-Id: I9109f92d059fd4152aee1f37597c5564d477fbf9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/controls/Styles/Android/qquickandroid9patch.cpp')
-rw-r--r--src/controls/Styles/Android/qquickandroid9patch.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/controls/Styles/Android/qquickandroid9patch.cpp b/src/controls/Styles/Android/qquickandroid9patch.cpp
index 48e86baa7..51c2a9d96 100644
--- a/src/controls/Styles/Android/qquickandroid9patch.cpp
+++ b/src/controls/Styles/Android/qquickandroid9patch.cpp
@@ -85,8 +85,8 @@ void QQuickAndroid9PatchNode1::initialize(QSGTexture *texture, const QRectF &bou
m_geometry.allocate(xlen * ylen, verticesPerQuad * quads);
QSGGeometry::TexturedPoint2D *vertices = m_geometry.vertexDataAsTexturedPoint2D();
- QVector<qreal> xCoords = xDivs.coordsForSize(bounds.width());
- QVector<qreal> yCoords = yDivs.coordsForSize(bounds.height());
+ QList<qreal> xCoords = xDivs.coordsForSize(bounds.width());
+ QList<qreal> yCoords = yDivs.coordsForSize(bounds.height());
for (int y = 0; y < ylen; ++y) {
for (int x = 0; x < xlen; ++x, ++vertices)
vertices->set(xCoords[x], yCoords[y], xDivs.data[x] / sourceSize.width(),
@@ -115,7 +115,7 @@ void QQuickAndroid9PatchNode1::initialize(QSGTexture *texture, const QRectF &bou
markDirty(QSGNode::DirtyGeometry | QSGNode::DirtyMaterial);
}
-QVector<qreal> QQuickAndroid9PatchDivs1::coordsForSize(qreal size) const
+QList<qreal> QQuickAndroid9PatchDivs1::coordsForSize(qreal size) const
{
// n = number of stretchable sections
// We have to compensate when adding 0 and/or
@@ -124,7 +124,7 @@ QVector<qreal> QQuickAndroid9PatchDivs1::coordsForSize(qreal size) const
const int n = (inverted ? l - 1 : l) >> 1;
const qreal stretchAmount = (size - data.last()) / n;
- QVector<qreal> coords;
+ QList<qreal> coords;
coords.reserve(l);
coords.append(0);