mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -06:00
Add pointer qualifications to auto-typed variables
This commit is contained in:
@@ -75,7 +75,7 @@ TorrentContentWidget::TorrentContentWidget(QWidget *parent)
|
||||
m_filterModel->setSourceModel(m_model);
|
||||
QTreeView::setModel(m_filterModel);
|
||||
|
||||
auto itemDelegate = new TorrentContentItemDelegate(this);
|
||||
auto *itemDelegate = new TorrentContentItemDelegate(this);
|
||||
setItemDelegate(itemDelegate);
|
||||
|
||||
connect(this, &QAbstractItemView::clicked, this, qOverload<const QModelIndex &>(&QAbstractItemView::edit));
|
||||
@@ -436,7 +436,7 @@ void TorrentContentWidget::openParentFolder(const QModelIndex &index) const
|
||||
|
||||
Path TorrentContentWidget::getFullPath(const QModelIndex &index) const
|
||||
{
|
||||
const auto contentHandler = m_model->contentHandler();
|
||||
const auto *contentHandler = m_model->contentHandler();
|
||||
if (const int fileIdx = getFileIndex(index); fileIdx >= 0)
|
||||
{
|
||||
const Path fullPath = contentHandler->actualStorageLocation() / contentHandler->actualFilePath(fileIdx);
|
||||
@@ -450,7 +450,7 @@ Path TorrentContentWidget::getFullPath(const QModelIndex &index) const
|
||||
|
||||
void TorrentContentWidget::onItemDoubleClicked(const QModelIndex &index)
|
||||
{
|
||||
const auto contentHandler = m_model->contentHandler();
|
||||
const auto *contentHandler = m_model->contentHandler();
|
||||
Q_ASSERT(contentHandler && contentHandler->hasMetadata());
|
||||
|
||||
if (Q_UNLIKELY(!contentHandler || !contentHandler->hasMetadata()))
|
||||
|
||||
Reference in New Issue
Block a user