Add missing names for parameter variables

This commit is contained in:
Jonas Kvinge
2024-09-28 12:32:12 +02:00
parent f2e28d18bc
commit 3cb0f60900
73 changed files with 365 additions and 164 deletions

View File

@@ -188,7 +188,9 @@ void Playlist::InsertSongItems(const SongList &songs, const int pos, const bool
}
QVariant Playlist::headerData(const int section, Qt::Orientation, const int role) const {
QVariant Playlist::headerData(const int section, Qt::Orientation orientation, const int role) const {
Q_UNUSED(orientation)
if (role != Qt::DisplayRole && role != Qt::ToolTipRole) return QVariant();
@@ -501,7 +503,8 @@ int Playlist::last_played_row() const {
return last_played_item_index_.isValid() ? last_played_item_index_.row() : -1;
}
void Playlist::ShuffleModeChanged(const PlaylistSequence::ShuffleMode) {
void Playlist::ShuffleModeChanged(const PlaylistSequence::ShuffleMode shuffle_mode) {
Q_UNUSED(shuffle_mode)
ReshuffleIndices();
}
@@ -787,7 +790,10 @@ Qt::DropActions Playlist::supportedDropActions() const {
return Qt::MoveAction | Qt::CopyAction | Qt::LinkAction;
}
bool Playlist::dropMimeData(const QMimeData *data, Qt::DropAction action, const int row, int, const QModelIndex&) {
bool Playlist::dropMimeData(const QMimeData *data, Qt::DropAction action, const int row, const int column, const QModelIndex &parent_index) {
Q_UNUSED(column)
Q_UNUSED(parent_index)
if (action == Qt::IgnoreAction) return false;
@@ -2060,7 +2066,9 @@ PlaylistItemPtrList Playlist::collection_items_by_id(const int id) const {
return collection_items_by_id_.values(id);
}
void Playlist::TracksAboutToBeDequeued(const QModelIndex&, const int begin, const int end) {
void Playlist::TracksAboutToBeDequeued(const QModelIndex &idx, const int begin, const int end) {
Q_UNUSED(idx)
for (int i = begin; i <= end; ++i) {
temp_dequeue_change_indexes_ << queue_->mapToSource(queue_->index(i, static_cast<int>(Column::Title)));
@@ -2078,7 +2086,9 @@ void Playlist::TracksDequeued() {
}
void Playlist::TracksEnqueued(const QModelIndex&, const int begin, const int end) {
void Playlist::TracksEnqueued(const QModelIndex &parent_idx, const int begin, const int end) {
Q_UNUSED(parent_idx)
const QModelIndex &b = queue_->mapToSource(queue_->index(begin, static_cast<int>(Column::Title)));
const QModelIndex &e = queue_->mapToSource(queue_->index(end, static_cast<int>(Column::Title)));

View File

@@ -255,7 +255,7 @@ class Playlist : public QAbstractListModel {
QStringList mimeTypes() const override;
Qt::DropActions supportedDropActions() const override;
QMimeData *mimeData(const QModelIndexList &indexes) const override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action, const int row, const int column, const QModelIndex &parent) override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action, const int row, const int column, const QModelIndex &parent_index) override;
void sort(const int column_number, const Qt::SortOrder order) override;
bool removeRows(const int row, const int count, const QModelIndex &parent = QModelIndex()) override;
@@ -288,7 +288,7 @@ class Playlist : public QAbstractListModel {
void RemoveUnavailableSongs();
void Shuffle();
void ShuffleModeChanged(const PlaylistSequence::ShuffleMode);
void ShuffleModeChanged(const PlaylistSequence::ShuffleMode shuffle_mode);
void SetColumnAlignment(const ColumnAlignmentMap &alignment);
@@ -348,7 +348,7 @@ class Playlist : public QAbstractListModel {
private Q_SLOTS:
void TracksAboutToBeDequeued(const QModelIndex&, const int begin, const int end);
void TracksDequeued();
void TracksEnqueued(const QModelIndex&, const int begin, const int end);
void TracksEnqueued(const QModelIndex &parent_idx, const int begin, const int end);
void QueueLayoutChanged();
void SongSaveComplete(TagReaderReply *reply, const QPersistentModelIndex &idx, const Song &old_metadata);
void ItemReloadComplete(const QPersistentModelIndex &idx, const Song &old_metadata, const bool metadata_edit);

View File

@@ -170,7 +170,9 @@ PlaylistDelegateBase::PlaylistDelegateBase(QObject *parent, const QString &suffi
{
}
QString PlaylistDelegateBase::displayText(const QVariant &value, const QLocale&) const {
QString PlaylistDelegateBase::displayText(const QVariant &value, const QLocale &locale) const {
Q_UNUSED(locale)
QString text;
@@ -297,7 +299,9 @@ bool PlaylistDelegateBase::helpEvent(QHelpEvent *event, QAbstractItemView *view,
}
QString LengthItemDelegate::displayText(const QVariant &value, const QLocale&) const {
QString LengthItemDelegate::displayText(const QVariant &value, const QLocale &locale) const {
Q_UNUSED(locale)
bool ok = false;
qint64 nanoseconds = value.toLongLong(&ok);
@@ -308,7 +312,9 @@ QString LengthItemDelegate::displayText(const QVariant &value, const QLocale&) c
}
QString SizeItemDelegate::displayText(const QVariant &value, const QLocale&) const {
QString SizeItemDelegate::displayText(const QVariant &value, const QLocale &locale) const {
Q_UNUSED(locale)
bool ok = false;
qint64 bytes = value.toLongLong(&ok);
@@ -425,7 +431,10 @@ void TagCompleter::ModelReady() {
}
QWidget *TagCompletionItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem&, const QModelIndex&) const {
QWidget *TagCompletionItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &idx) const {
Q_UNUSED(option)
Q_UNUSED(idx)
QLineEdit *editor = new QLineEdit(parent);
new TagCompleter(backend_, column_, editor);
@@ -434,7 +443,9 @@ QWidget *TagCompletionItemDelegate::createEditor(QWidget *parent, const QStyleOp
}
QString NativeSeparatorsDelegate::displayText(const QVariant &value, const QLocale&) const {
QString NativeSeparatorsDelegate::displayText(const QVariant &value, const QLocale &locale) const {
Q_UNUSED(locale)
const QString string_value = value.toString();
@@ -458,8 +469,9 @@ QString NativeSeparatorsDelegate::displayText(const QVariant &value, const QLoca
SongSourceDelegate::SongSourceDelegate(QObject *parent) : PlaylistDelegateBase(parent) {}
QString SongSourceDelegate::displayText(const QVariant &value, const QLocale&) const {
QString SongSourceDelegate::displayText(const QVariant &value, const QLocale &locale) const {
Q_UNUSED(value);
Q_UNUSED(locale)
return QString();
}
@@ -522,7 +534,9 @@ QSize RatingItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QMo
}
QString RatingItemDelegate::displayText(const QVariant &value, const QLocale&) const {
QString RatingItemDelegate::displayText(const QVariant &value, const QLocale &locale) const {
Q_UNUSED(locale)
if (value.isNull() || value.toFloat() <= 0) return QString();
@@ -533,7 +547,9 @@ QString RatingItemDelegate::displayText(const QVariant &value, const QLocale&) c
}
QString Ebur128LoudnessLUFSItemDelegate::displayText(const QVariant &value, const QLocale&) const {
QString Ebur128LoudnessLUFSItemDelegate::displayText(const QVariant &value, const QLocale &locale) const {
Q_UNUSED(locale)
bool ok = false;
double v = value.toDouble(&ok);
@@ -543,7 +559,9 @@ QString Ebur128LoudnessLUFSItemDelegate::displayText(const QVariant &value, cons
}
QString Ebur128LoudnessRangeLUItemDelegate::displayText(const QVariant &value, const QLocale&) const {
QString Ebur128LoudnessRangeLUItemDelegate::displayText(const QVariant &value, const QLocale &locale) const {
Q_UNUSED(locale)
bool ok = false;
double v = value.toDouble(&ok);

View File

@@ -164,7 +164,8 @@ void PlaylistHeader::ToggleVisible(const int section) {
Q_EMIT SectionVisibilityChanged(section, !isSectionHidden(section));
}
void PlaylistHeader::enterEvent(QEnterEvent*) {
void PlaylistHeader::enterEvent(QEnterEvent *e) {
Q_UNUSED(e)
Q_EMIT MouseEntered();
}

View File

@@ -70,8 +70,13 @@ bool PlaylistListView::ItemsSelected() const {
return selectionModel()->selectedRows().count() > 0;
}
void PlaylistListView::selectionChanged(const QItemSelection&, const QItemSelection&) {
void PlaylistListView::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) {
Q_UNUSED(selected)
Q_UNUSED(deselected)
Q_EMIT ItemsSelectedChanged(selectionModel()->selectedRows().count() > 0);
}
void PlaylistListView::dragEnterEvent(QDragEnterEvent *e) {

View File

@@ -408,7 +408,8 @@ void PlaylistTabBar::dragMoveEvent(QDragMoveEvent *e) {
}
void PlaylistTabBar::dragLeaveEvent(QDragLeaveEvent*) {
void PlaylistTabBar::dragLeaveEvent(QDragLeaveEvent *e) {
Q_UNUSED(e)
drag_hover_timer_.stop();
}