Remove usages of deprecated APIs (part 2)

Replace the uses of deprecated APIs listed below, while keeping in mind
that compatibility with Qt 5.12 (the latest LTS) must be kept. This
means that the new alternatives must be used only when compiling with
Qt versions where the replacement is available.

Replaced:
  QLineF::intersect() -> QLine::intersects() (since 5.14)
  QComboBox::activated() -> QComboBox::textActivated() (since 5.14)
  QWheelEvent::pos() -> QWheelEvent::position() (since 5.14)
  QList::swap() -> QList::swapItemsAt() (since 5.13)

Task-number: QTBUG-76491
Change-Id: I62adc4f0826607b0156bf4bc5648ffb0e41cd895
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Sona Kurazyan
2019-08-29 14:41:14 +02:00
parent d39d26a54f
commit 6f4aa0458c
8 changed files with 53 additions and 2 deletions

View File

@@ -224,7 +224,11 @@ void layout(const QList<QGraphicsItem*> &items)
firstItem = initialItem->outputTransitions().constFirst()->connectedItem(initialItem);
int index = childItems.indexOf(firstItem);
if (index > 0)
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
childItems.swap(index, 0);
#else
childItems.swapItemsAt(index, 0);
#endif
}
// Search final-item