Fix parameter name mispatches

This commit is contained in:
Jonas Kvinge
2020-06-14 18:58:24 +02:00
parent 2fbdb29ebc
commit 082c9097e4
76 changed files with 145 additions and 147 deletions

View File

@@ -987,15 +987,15 @@ void Playlist::InsertItemsWithoutUndo(const PlaylistItemList &items, int pos, bo
}
void Playlist::InsertCollectionItems(const SongList &songs, int pos, bool play_now, bool enqueue, bool enqueue_next) {
void Playlist::InsertCollectionItems(const SongList &songs, const int pos, const bool play_now, const bool enqueue, const bool enqueue_next) {
InsertSongItems<CollectionPlaylistItem>(songs, pos, play_now, enqueue, enqueue_next);
}
void Playlist::InsertSongs(const SongList &songs, int pos, bool play_now, bool enqueue, bool enqueue_next) {
void Playlist::InsertSongs(const SongList &songs, const int pos, const bool play_now, const bool enqueue, const bool enqueue_next) {
InsertSongItems<SongPlaylistItem>(songs, pos, play_now, enqueue, enqueue_next);
}
void Playlist::InsertSongsOrCollectionItems(const SongList &songs, int pos, bool play_now, bool enqueue, bool enqueue_next) {
void Playlist::InsertSongsOrCollectionItems(const SongList &songs, const int pos, const bool play_now, const bool enqueue, const bool enqueue_next) {
PlaylistItemList items;
for (const Song &song : songs) {
@@ -1010,7 +1010,7 @@ void Playlist::InsertSongsOrCollectionItems(const SongList &songs, int pos, bool
}
void Playlist::InsertInternetItems(InternetService *service, const SongList &songs, int pos, bool play_now, bool enqueue, bool enqueue_next) {
void Playlist::InsertInternetItems(InternetService *service, const SongList &songs, const int pos, const bool play_now, const bool enqueue, const bool enqueue_next) {
PlaylistItemList playlist_items;
for (const Song &song : songs) {
@@ -1433,7 +1433,7 @@ bool Playlist::removeRows(QList<int> &rows) {
}
PlaylistItemList Playlist::RemoveItemsWithoutUndo(int row, int count) {
PlaylistItemList Playlist::RemoveItemsWithoutUndo(const int row, const int count) {
if (row < 0 || row >= items_.size() || row + count > items_.size()) {
return PlaylistItemList();

View File

@@ -229,11 +229,11 @@ class Playlist : public QAbstractListModel {
void UpdateScrobblePoint(const qint64 seek_point_nanosec = 0);
// Changing the playlist
void InsertItems (const PlaylistItemList &items, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
void InsertCollectionItems (const SongList &items, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
void InsertSongs (const SongList &items, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
void InsertSongsOrCollectionItems (const SongList &items, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
void InsertInternetItems(InternetService* service, const SongList& songs, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
void InsertItems(const PlaylistItemList &itemsIn, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void InsertCollectionItems(const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void InsertSongs(const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void InsertSongsOrCollectionItems(const SongList &songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void InsertInternetItems(InternetService* service, const SongList& songs, const int pos = -1, const bool play_now = false, const bool enqueue = false, const bool enqueue_next = false);
void ReshuffleIndices();
@@ -265,7 +265,7 @@ class Playlist : public QAbstractListModel {
// QAbstractListModel
int rowCount(const QModelIndex& = QModelIndex()) const { return items_.count(); }
int columnCount(const QModelIndex& = QModelIndex()) const { return ColumnCount; }
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const;
bool setData(const QModelIndex &index, const QVariant &value, int role);
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
@@ -301,7 +301,7 @@ class Playlist : public QAbstractListModel {
void InsertUrls(const QList<QUrl> &urls, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);
// Removes items with given indices from the playlist. This operation is not undoable.
void RemoveItemsWithoutUndo(const QList<int> &indices);
void RemoveItemsWithoutUndo(const QList<int> &indicesIn);
signals:
void RestoreFinished();
@@ -331,7 +331,7 @@ class Playlist : public QAbstractListModel {
// Modify the playlist without changing the undo stack. These are used by our friends in PlaylistUndoCommands
void InsertItemsWithoutUndo(const PlaylistItemList &items, int pos, bool enqueue = false, bool enqueue_next = false);
PlaylistItemList RemoveItemsWithoutUndo(int pos, int count);
PlaylistItemList RemoveItemsWithoutUndo(const int row, const int count);
void MoveItemsWithoutUndo(const QList<int> &source_rows, int pos);
void MoveItemWithoutUndo(int source, int dest);
void MoveItemsWithoutUndo(int start, const QList<int> &dest_rows);

View File

@@ -128,7 +128,7 @@ class FileTypeItemDelegate : public PlaylistDelegateBase {
class TextItemDelegate : public PlaylistDelegateBase {
public:
explicit TextItemDelegate(QObject *parent) : PlaylistDelegateBase(parent) {}
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &idx) const;
};
class TagCompletionModel : public QStringListModel {
@@ -177,7 +177,7 @@ class SongSourceDelegate : public PlaylistDelegateBase {
void paint(QPainter *paint, const QStyleOptionViewItem &option, const QModelIndex &index) const;
private:
QPixmap LookupPixmap(const Song::Source &type, const QSize &size) const;
QPixmap LookupPixmap(const Song::Source &source, const QSize &size) const;
mutable QPixmapCache cache_;
};