mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
chore: clang-tidy cleanups (#1287)
* chore: fix syntax error in clang-tidy config file
This commit is contained in:
+6
-4
@@ -251,14 +251,14 @@ bool FileTreeView::edit(QModelIndex const& index, EditTrigger trigger, QEvent* e
|
||||
return false;
|
||||
}
|
||||
|
||||
QModelIndex const nameIndex = index.sibling(index.row(), FileTreeModel::COL_NAME);
|
||||
QModelIndex const name_index = index.sibling(index.row(), FileTreeModel::COL_NAME);
|
||||
|
||||
if (editTriggers().testFlag(trigger))
|
||||
{
|
||||
selectionModel()->setCurrentIndex(nameIndex, QItemSelectionModel::NoUpdate);
|
||||
selectionModel()->setCurrentIndex(name_index, QItemSelectionModel::NoUpdate);
|
||||
}
|
||||
|
||||
return QTreeView::edit(nameIndex, trigger, event);
|
||||
return QTreeView::edit(name_index, trigger, event);
|
||||
}
|
||||
|
||||
void FileTreeView::checkSelectedItems()
|
||||
@@ -308,9 +308,11 @@ void FileTreeView::onlyCheckSelectedItems()
|
||||
continue;
|
||||
}
|
||||
|
||||
auto const* parent_model = parent_index.model();
|
||||
|
||||
for (int i = 0, count = model_->rowCount(parent_index); i < count; ++i)
|
||||
{
|
||||
QModelIndex const child_index = parent_index.child(i, 0);
|
||||
QModelIndex const child_index = parent_model->index(i, 0, parent_index);
|
||||
int const child_check_state = child_index.data(FileTreeModel::WantedRole).toInt();
|
||||
|
||||
if (child_check_state == Qt::Unchecked ||
|
||||
|
||||
Reference in New Issue
Block a user