diff options
author | Alexander Akulich <akulichalexander@gmail.com> | 2020-01-18 19:17:30 +0300 |
---|---|---|
committer | Alexander Akulich <akulichalexander@gmail.com> | 2020-01-18 22:37:08 +0300 |
commit | 4e3b64c54b82fcc6ccd22889ab5e4276b338e173 (patch) | |
tree | 2961444187341198bfa6b2fbec6c66b160a2bffb | |
parent | c951365fe24d255bbe86d7717fae3c5cb162a395 (diff) |
Port from deprecated QList::swap()
-rw-r--r-- | tests/features.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/features.cpp b/tests/features.cpp index 7925e775..add8f3c1 100644 --- a/tests/features.cpp +++ b/tests/features.cpp @@ -13,7 +13,11 @@ QList<Feature> reverse(const QList<Feature> &list) { QList<Feature> ret(list); for (int k = 0; k < (list.size() / 2); k++) { +#if QT_VERSION > QT_VERSION_CHECK(5, 13, 0) + ret.swapItemsAt(k, list.size() - (1 + k)); +#else ret.swap(k, list.size() - (1 + k)); +#endif } return ret; } |