Fix error: 'swap' is deprecated: Use QList<T>::swapItemsAt().

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-07-24 14:22:57 +03:00
parent 4ad06e28b2
commit 16a5adbbd4

View File

@ -482,7 +482,11 @@ QVector<T> VLayoutPiece::Map(QVector<T> points) const
QList<T> list = points.toList(); QList<T> list = points.toList();
for (int k=0, s=list.size(), max=(s/2); k<max; k++) for (int k=0, s=list.size(), max=(s/2); k<max; k++)
{ {
#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
list.swapItemsAt(k, s-(1+k));
#else
list.swap(k, s-(1+k)); list.swap(k, s-(1+k));
#endif
} }
points = list.toVector(); points = list.toVector();
} }