mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
fix deprecated warning QModelIndex::child
Use QModelIndex::index instead. This function was DEPRECATED_SINCE(5, 8)
This commit is contained in:
committed by
Laurent Trinques
parent
803414f716
commit
24528b0fdb
@@ -112,7 +112,7 @@ bool ElementsCollectionModel::canDropMimeData(const QMimeData *data, Qt::DropAct
|
||||
if (!(QStandardItemModel::canDropMimeData(data, action, row, column, parent) && parent.isValid()))
|
||||
return false;
|
||||
|
||||
QStandardItem *qsi = itemFromIndex(parent.child(row, column));
|
||||
QStandardItem *qsi = itemFromIndex(parent.QModelIndex::model()->index(row, column));
|
||||
if (!qsi)
|
||||
qsi = itemFromIndex(parent);
|
||||
|
||||
@@ -150,8 +150,7 @@ bool ElementsCollectionModel::canDropMimeData(const QMimeData *data, Qt::DropAct
|
||||
bool ElementsCollectionModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
|
||||
{
|
||||
Q_UNUSED(action)
|
||||
|
||||
QStandardItem *qsi = itemFromIndex(parent.child(row, column));
|
||||
QStandardItem *qsi = itemFromIndex(parent.QModelIndex::model()->index(row, column));
|
||||
if (!qsi)
|
||||
qsi = itemFromIndex(parent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user