Qt5: 'bool QTreeWidget::isItemSelected(const QTreeWidgetItem*) const' is deprecated: Use QTreeWidgetItem::isSelected() instead [-Wdeprecated-declarations]

This commit is contained in:
wmayer
2020-06-08 12:41:41 +02:00
committed by wwmayer
parent 59f38319a3
commit ca327b6f25
7 changed files with 23 additions and 23 deletions

View File

@@ -1403,7 +1403,7 @@ void TreeWidget::dragMoveEvent(QDragMoveEvent *event)
auto modifier = QApplication::queryKeyboardModifiers();
QTreeWidgetItem* targetItem = itemAt(event->pos());
if (!targetItem || this->isItemSelected(targetItem)) {
if (!targetItem || targetItem->isSelected()) {
leaveEvent(0);
event->ignore();
}
@@ -1545,7 +1545,7 @@ void TreeWidget::dropEvent(QDropEvent *event)
if (!targetItem)
return;
// one of the source items is also the destination item, that's not allowed
if (this->isItemSelected(targetItem))
if (targetItem->isSelected())
return;
App::Document *thisDoc;