Skip to content

Commit c536677

Browse files
committed
qt: Remove obsolete QModelIndex::child()
The QModelIndex::child() member function is obsolete since Qt 5.12.
1 parent 3ca514d commit c536677

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/qt/receivecoinsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void ReceiveCoinsDialog::copyColumnToClipboard(int column)
261261
if (!firstIndex.isValid()) {
262262
return;
263263
}
264-
GUIUtil::setClipboard(model->getRecentRequestsTableModel()->data(firstIndex.child(firstIndex.row(), column), Qt::EditRole).toString());
264+
GUIUtil::setClipboard(model->getRecentRequestsTableModel()->index(firstIndex.row(), column).data(Qt::EditRole).toString());
265265
}
266266

267267
// context menu

src/qt/recentrequeststablemodel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class RecentRequestsTableModel: public QAbstractTableModel
7676
QVariant data(const QModelIndex &index, int role) const;
7777
bool setData(const QModelIndex &index, const QVariant &value, int role);
7878
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
79-
QModelIndex index(int row, int column, const QModelIndex &parent) const;
79+
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
8080
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
8181
Qt::ItemFlags flags(const QModelIndex &index) const;
8282
/*@}*/

0 commit comments

Comments
 (0)