CollectionWatcher: Add missing const
This commit is contained in:
parent
6b446eb693
commit
4c8ada2b80
|
@ -75,7 +75,7 @@ using namespace Qt::StringLiterals;
|
|||
|
||||
QStringList CollectionWatcher::sValidImages = QStringList() << QStringLiteral("jpg") << QStringLiteral("png") << QStringLiteral("gif") << QStringLiteral("jpeg");
|
||||
|
||||
CollectionWatcher::CollectionWatcher(Song::Source source, QObject *parent)
|
||||
CollectionWatcher::CollectionWatcher(const Song::Source source, QObject *parent)
|
||||
: QObject(parent),
|
||||
source_(source),
|
||||
backend_(nullptr),
|
||||
|
@ -801,7 +801,7 @@ void CollectionWatcher::UpdateCueAssociatedSongs(const QString &file,
|
|||
const QString &matching_cue,
|
||||
const QUrl &art_automatic,
|
||||
const SongList &old_cue_songs,
|
||||
ScanTransaction *t) {
|
||||
ScanTransaction *t) const {
|
||||
|
||||
QHash<quint64, Song> sections_map;
|
||||
for (const Song &song : old_cue_songs) {
|
||||
|
@ -880,7 +880,7 @@ void CollectionWatcher::UpdateNonCueAssociatedSong(const QString &file,
|
|||
|
||||
}
|
||||
|
||||
SongList CollectionWatcher::ScanNewFile(const QString &file, const QString &path, const QString &fingerprint, const QString &matching_cue, QSet<QString> *cues_processed) {
|
||||
SongList CollectionWatcher::ScanNewFile(const QString &file, const QString &path, const QString &fingerprint, const QString &matching_cue, QSet<QString> *cues_processed) const {
|
||||
|
||||
SongList songs;
|
||||
|
||||
|
@ -1115,7 +1115,7 @@ void CollectionWatcher::DirectoryChanged(const QString &subdir) {
|
|||
if (it == subdir_mapping_.constEnd()) {
|
||||
return;
|
||||
}
|
||||
CollectionDirectory dir = *it;
|
||||
const CollectionDirectory dir = *it;
|
||||
|
||||
qLog(Debug) << "Subdir" << subdir << "changed under directory" << dir.path << "id" << dir.id;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class CollectionWatcher : public QObject {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CollectionWatcher(Song::Source source, QObject *parent = nullptr);
|
||||
explicit CollectionWatcher(const Song::Source source, QObject *parent = nullptr);
|
||||
~CollectionWatcher();
|
||||
|
||||
Song::Source source() { return source_; }
|
||||
|
@ -199,12 +199,12 @@ class CollectionWatcher : public QObject {
|
|||
void PerformScan(const bool incremental, const bool ignore_mtimes);
|
||||
|
||||
// Updates the sections of a cue associated and altered (according to mtime) media file during a scan.
|
||||
void UpdateCueAssociatedSongs(const QString &file, const QString &path, const QString &fingerprint, const QString &matching_cue, const QUrl &art_automatic, const SongList &old_cue_songs, ScanTransaction *t);
|
||||
void UpdateCueAssociatedSongs(const QString &file, const QString &path, const QString &fingerprint, const QString &matching_cue, const QUrl &art_automatic, const SongList &old_cue_songs, ScanTransaction *t) const;
|
||||
// Updates a single non-cue associated and altered (according to mtime) song during a scan.
|
||||
void UpdateNonCueAssociatedSong(const QString &file, const QString &fingerprint, const SongList &matching_songs, const QUrl &art_automatic, const bool cue_deleted, ScanTransaction *t);
|
||||
// Scans a single media file that's present on the disk but not yet in the collection.
|
||||
// It may result in a multiple files added to the collection when the media file has many sections (like a CUE related media file).
|
||||
SongList ScanNewFile(const QString &file, const QString &path, const QString &fingerprint, const QString &matching_cue, QSet<QString> *cues_processed);
|
||||
SongList ScanNewFile(const QString &file, const QString &path, const QString &fingerprint, const QString &matching_cue, QSet<QString> *cues_processed) const;
|
||||
|
||||
static void AddChangedSong(const QString &file, const Song &matching_song, const Song &new_song, ScanTransaction *t);
|
||||
|
||||
|
|
Loading…
Reference in New Issue