Skip to content

Commit

Permalink
Qt5: 'QModelIndex QModelIndex::child(int, int) const' is deprecated: …
Browse files Browse the repository at this point in the history
…Use QAbstractItemModel::index [-Wdeprecated-declarations]
  • Loading branch information
wwmayer committed Jun 12, 2020
1 parent 2c11344 commit deb39c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Gui/Tree.cpp
Expand Up @@ -1269,14 +1269,14 @@ void TreeWidget::keyPressEvent(QKeyEvent *event)
}else if(event->key() == Qt::Key_Left) {
auto index = currentIndex();
if(index.column()==1) {
setCurrentIndex(index.parent().child(index.row(),0));
setCurrentIndex(model()->index(index.row(), 0, index.parent()));
event->accept();
return;
}
}else if(event->key() == Qt::Key_Right) {
auto index = currentIndex();
if(index.column()==0) {
setCurrentIndex(index.parent().child(index.row(),1));
setCurrentIndex(model()->index(index.row(), 1, index.parent()));
event->accept();
return;
}
Expand Down

0 comments on commit deb39c4

Please sign in to comment.