diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-08-01 11:56:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-08-01 13:23:26 +0200 |
commit | a16b5a7b661b96b79dc0da25a1328dd870cbd8b0 (patch) | |
tree | 0e82896dbda2491b12a4b49c3776e95ea820c231 | |
parent | 671f73bb1f26cf1d8daa1d33f01fc15fd1e9f62e (diff) |
Fix build with Qt 6 and strict API deprecations
QList's swap(int i, int j) is deprecated in favor of swapItemsAt() and
when building with QT_VERSION == 6 it's removed from the API.
This was cherry-picked as a merge from dev to wip/qt6 is not possible as
it requires a newer qtbase, which can't be brought into qt5 without this
fix.
Change-Id: I5513d4d879a85369040864cfc9c058f0f3665648
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
(cherry picked from commit 1b5e97ee6d9368ed27519d26bb9adcff64d8adb1)
-rw-r--r-- | examples/wayland/qwindow-compositor/compositor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/wayland/qwindow-compositor/compositor.cpp b/examples/wayland/qwindow-compositor/compositor.cpp index 485f16504..220ea3d74 100644 --- a/examples/wayland/qwindow-compositor/compositor.cpp +++ b/examples/wayland/qwindow-compositor/compositor.cpp @@ -545,6 +545,6 @@ void Compositor::raise(View *view) int source = endPos + 1 + i; int dest = startPos + i; for (int j = source; j > dest; j--) - m_views.swap(j, j-1); + m_views.swapItemsAt(j, j-1); } } |