Add pointer qualifications to auto-typed variables

This commit is contained in:
Chocobo1
2023-05-05 03:07:26 +08:00
parent 8c9b6e2f2d
commit e408973ee6
27 changed files with 78 additions and 78 deletions

View File

@@ -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()))