mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
fix: sonarcloud (#2558)
* fix: add const modifier for functions * fix: many sonarcloud use-init-statement warnings
This commit is contained in:
+1
-3
@@ -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