mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-10-14 14:31:06 -04:00
Replaced deprecated QModelIndex::child by QAbstractItemModel::index
This commit is contained in:
parent
c00a4dccb5
commit
ec497f0015
4 changed files with 6 additions and 6 deletions
|
@ -1018,7 +1018,7 @@ void SharedFilesDialog::recursExpandAll(const QModelIndex& index)
|
|||
|
||||
for(int row=0;row<ui.dirTreeView->model()->rowCount(index);++row)
|
||||
{
|
||||
QModelIndex idx(index.child(row,0)) ;
|
||||
QModelIndex idx(ui.dirTreeView->model()->index(row,0,index)) ;
|
||||
|
||||
if(ui.dirTreeView->model()->rowCount(idx) > 0)
|
||||
recursExpandAll(idx) ;
|
||||
|
|
|
@ -2720,7 +2720,7 @@ void IdDialog::recursSaveExpandedItems_idTreeView(const QModelIndex& proxy_index
|
|||
expanded.insert(local_path) ;
|
||||
|
||||
for(int row=0;row<mProxyModel->rowCount(proxy_index);++row)
|
||||
recursSaveExpandedItems_idTreeView(proxy_index.child(row,0),local_path,expanded,selected) ;
|
||||
recursSaveExpandedItems_idTreeView(mProxyModel->index(row,0,proxy_index),local_path,expanded,selected) ;
|
||||
}
|
||||
|
||||
if(ui->idTreeWidget->selectionModel()->isSelected(proxy_index))
|
||||
|
@ -2752,7 +2752,7 @@ void IdDialog::recursRestoreExpandedItems_idTreeView(const QModelIndex& proxy_in
|
|||
ui->idTreeWidget->setExpanded(proxy_index,true) ;
|
||||
|
||||
for(int row=0;row<mProxyModel->rowCount(proxy_index);++row)
|
||||
recursRestoreExpandedItems_idTreeView(proxy_index.child(row,0),local_path,expanded,selected) ;
|
||||
recursRestoreExpandedItems_idTreeView(mProxyModel->index(row,0,proxy_index),local_path,expanded,selected) ;
|
||||
}
|
||||
|
||||
if(selected.find(local_path) != selected.end())
|
||||
|
|
|
@ -448,7 +448,7 @@ void NewFriendList::recursSaveExpandedItems(const QModelIndex& index,const QMode
|
|||
exp.insert(local_path) ;
|
||||
|
||||
for(int row=0;row<mProxyModel->rowCount(index);++row)
|
||||
recursSaveExpandedItems(index.child(row,0),current_index,local_path,exp,sel,indx+1) ;
|
||||
recursSaveExpandedItems(mProxyModel->index(row,0,index),current_index,local_path,exp,sel,indx+1) ;
|
||||
}
|
||||
#ifdef DEBUG_NEW_FRIEND_LIST
|
||||
else
|
||||
|
@ -479,7 +479,7 @@ void NewFriendList::recursRestoreExpandedItems(const QModelIndex& index, const Q
|
|||
ui->peerTreeWidget->setExpanded(index,true) ;
|
||||
|
||||
for(int row=0;row<mProxyModel->rowCount(index);++row)
|
||||
recursRestoreExpandedItems(index.child(row,0),local_path,exp,sel,selected_index,indx+1) ;
|
||||
recursRestoreExpandedItems(mProxyModel->index(row,0,index),local_path,exp,sel,selected_index,indx+1) ;
|
||||
}
|
||||
#ifdef DEBUG_NEW_FRIEND_LIST
|
||||
else
|
||||
|
|
|
@ -540,7 +540,7 @@ void GxsForumThreadWidget::recursSaveExpandedItems(const QModelIndex& index, QLi
|
|||
if(ui->threadTreeWidget->isExpanded(index))
|
||||
{
|
||||
for(int row=0;row<mThreadProxyModel->rowCount(index);++row)
|
||||
recursSaveExpandedItems(index.child(row,0),expanded_items) ;
|
||||
recursSaveExpandedItems(mThreadProxyModel->index(row,0,index),expanded_items) ;
|
||||
|
||||
RsGxsMessageId message_id(index.sibling(index.row(),RsGxsForumModel::COLUMN_THREAD_MSGID).data(Qt::UserRole).toString().toStdString());
|
||||
expanded_items.push_back(message_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue