telepathy-qt: Port from deprecated QList::swap()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jan 25 18:06:00 UTC 2020


Module: telepathy-qt
Branch: master
Commit: 4e3b64c54b82fcc6ccd22889ab5e4276b338e173
URL:    http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=4e3b64c54b82fcc6ccd22889ab5e4276b338e173

Author: Alexander Akulich <akulichalexander at gmail.com>
Date:   Sat Jan 18 19:17:30 2020 +0300

Port from deprecated QList::swap()

---

 tests/features.cpp | 4 ++++
 1 file changed, 4 insertions(+)

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;
 }



More information about the telepathy-commits mailing list