sonarcloud warnings 9 (#1511)

* refactor: const correctness 

* refactor: fix some implicit conversions

* refactor: make local pointers const if their objects are not modified

* refactor: do not cast away const in torrent-cell-renderer

* refactor: remove call to deprecated gtk_icon_size_lookup_for_settings

* refactor: member functions that do not mutate their objects should be declared const

* chore: do not end comments with a semicolon
This commit is contained in:
Charles Kerr
2020-11-08 21:31:02 -06:00
committed by GitHub
parent 6b0408b320
commit 9d313a8816
72 changed files with 1838 additions and 299 deletions

View File

@@ -101,7 +101,7 @@ void PathButton::paintEvent(QPaintEvent* /*event*/)
painter.drawComplexControl(QStyle::CC_ToolButton, option);
}
void PathButton::onClicked()
void PathButton::onClicked() const
{
auto* dialog = new QFileDialog(window(), effectiveTitle());
dialog->setFileMode(isDirMode() ? QFileDialog::Directory : QFileDialog::ExistingFile);