mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
fix: sonarcloud (#2558)
* fix: add const modifier for functions * fix: many sonarcloud use-init-statement warnings
This commit is contained in:
@@ -173,9 +173,7 @@ void FileTreeView::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
|
||||
void FileTreeView::contextMenuEvent(QContextMenuEvent* event)
|
||||
{
|
||||
QModelIndex const root_index = model_->index(0, 0);
|
||||
|
||||
if (!root_index.isValid())
|
||||
if (auto const root_index = model_->index(0, 0); !root_index.isValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user