diff --git a/sources/editor/editorcommands.cpp b/sources/editor/editorcommands.cpp index 6a0faec86..8d639a0ac 100644 --- a/sources/editor/editorcommands.cpp +++ b/sources/editor/editorcommands.cpp @@ -413,7 +413,11 @@ void ChangeZValueCommand::applyRaise(const QList &items_list) { for (int i = my_items_list.count() - 2 ; i >= 0 ; -- i) { if (my_items_list[i] -> isSelected()) { if (!my_items_list[i +1] -> isSelected()) { +#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) // ### Qt 6: remove my_items_list.swap(i, i + 1); +#else + my_items_list.swapItemsAt(i, i + 1); +#endif } } } @@ -431,7 +435,11 @@ void ChangeZValueCommand::applyLower(const QList &items_list) { for (int i = 1 ; i < my_items_list.count() ; ++ i) { if (my_items_list[i] -> isSelected()) { if (!my_items_list[i - 1] -> isSelected()) { +#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) // ### Qt 6: remove my_items_list.swap(i, i - 1); +#else + my_items_list.swapItemsAt(i, i - 1); +#endif } } }