Make static
This commit is contained in:
@@ -306,7 +306,7 @@ CollectionItem *CollectionModel::CreateCompilationArtistNode(const bool signal,
|
||||
|
||||
}
|
||||
|
||||
QString CollectionModel::ContainerKey(const GroupBy type, const Song &song) const {
|
||||
QString CollectionModel::ContainerKey(const GroupBy type, const Song &song) {
|
||||
|
||||
QString key;
|
||||
|
||||
@@ -397,7 +397,7 @@ QString CollectionModel::ContainerKey(const GroupBy type, const Song &song) cons
|
||||
|
||||
}
|
||||
|
||||
QString CollectionModel::DividerKey(const GroupBy type, CollectionItem *item) const {
|
||||
QString CollectionModel::DividerKey(const GroupBy type, CollectionItem *item) {
|
||||
|
||||
// Items which are to be grouped under the same divider must produce the same divider key. This will only get called for top-level items.
|
||||
|
||||
@@ -455,7 +455,7 @@ QString CollectionModel::DividerKey(const GroupBy type, CollectionItem *item) co
|
||||
|
||||
}
|
||||
|
||||
QString CollectionModel::DividerDisplayText(const GroupBy type, const QString &key) const {
|
||||
QString CollectionModel::DividerDisplayText(const GroupBy type, const QString &key) {
|
||||
|
||||
// Pretty display text for the dividers.
|
||||
|
||||
@@ -1754,7 +1754,7 @@ bool CollectionModel::CompareItems(const CollectionItem *a, const CollectionItem
|
||||
|
||||
}
|
||||
|
||||
qint64 CollectionModel::MaximumCacheSize(QSettings *s, const char *size_id, const char *size_unit_id, const qint64 cache_size_default) const {
|
||||
qint64 CollectionModel::MaximumCacheSize(QSettings *s, const char *size_id, const char *size_unit_id, const qint64 cache_size_default) {
|
||||
|
||||
qint64 size = s->value(size_id, cache_size_default).toInt();
|
||||
int unit = s->value(size_unit_id, CollectionSettingsPage::CacheSizeUnit::CacheSizeUnit_MB).toInt() + 1;
|
||||
|
||||
@@ -226,7 +226,7 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
|
||||
void TotalSongCountUpdatedSlot(const int count);
|
||||
void TotalArtistCountUpdatedSlot(const int count);
|
||||
void TotalAlbumCountUpdatedSlot(const int count);
|
||||
void ClearDiskCache();
|
||||
static void ClearDiskCache();
|
||||
|
||||
// Called after ResetAsync
|
||||
void ResetAsyncQueryFinished();
|
||||
@@ -247,7 +247,7 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
|
||||
// When the model is reset or when a node is lazy-loaded the Collection constructs a database query to populate the items.
|
||||
// Filters are added for each parent item, restricting the songs returned to a particular album or artist for example.
|
||||
static void InitQuery(const GroupBy type, CollectionQuery *q);
|
||||
void FilterQuery(const GroupBy type, CollectionItem *item, CollectionQuery *q);
|
||||
static void FilterQuery(const GroupBy type, CollectionItem *item, CollectionQuery *q);
|
||||
|
||||
// Items can be created either from a query that's been run to populate a node, or by a spontaneous SongsDiscovered emission from the backend.
|
||||
CollectionItem *ItemFromQuery(const GroupBy type, const bool signal, const bool create_divider, CollectionItem *parent, const SqlRow &row, const int container_level);
|
||||
@@ -260,9 +260,9 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
|
||||
CollectionItem *InitItem(const GroupBy type, const bool signal, CollectionItem *parent, const int container_level);
|
||||
void FinishItem(const GroupBy type, const bool signal, const bool create_divider, CollectionItem *parent, CollectionItem *item);
|
||||
|
||||
QString ContainerKey(const GroupBy type, const Song &song) const;
|
||||
QString DividerKey(const GroupBy type, CollectionItem *item) const;
|
||||
QString DividerDisplayText(const GroupBy type, const QString &key) const;
|
||||
static QString ContainerKey(const GroupBy type, const Song &song) ;
|
||||
static QString DividerKey(const GroupBy type, CollectionItem *item) ;
|
||||
static QString DividerDisplayText(const GroupBy type, const QString &key) ;
|
||||
|
||||
// Helpers
|
||||
static bool IsCompilationArtistNode(const CollectionItem *node) { return node == node->parent->compilation_artist_node_; }
|
||||
@@ -270,7 +270,7 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
|
||||
QVariant AlbumIcon(const QModelIndex &idx);
|
||||
QVariant data(const CollectionItem *item, const int role) const;
|
||||
bool CompareItems(const CollectionItem *a, const CollectionItem *b) const;
|
||||
qint64 MaximumCacheSize(QSettings *s, const char *size_id, const char *size_unit_id, const qint64 cache_size_default) const;
|
||||
static qint64 MaximumCacheSize(QSettings *s, const char *size_id, const char *size_unit_id, const qint64 cache_size_default) ;
|
||||
|
||||
private:
|
||||
CollectionBackend *backend_;
|
||||
|
||||
@@ -168,7 +168,7 @@ class CollectionWatcher : public QObject {
|
||||
void ScanSubdirectory(const QString &path, const Subdirectory &subdir, const quint64 files_count, CollectionWatcher::ScanTransaction *t, const bool force_noincremental = false);
|
||||
|
||||
private:
|
||||
static bool FindSongsByPath(const SongList &list, const QString &path, SongList *out);
|
||||
static bool FindSongsByPath(const SongList &songs, const QString &path, SongList *out);
|
||||
bool FindSongsByFingerprint(const QString &file, const QString &fingerprint, SongList *out);
|
||||
static bool FindSongsByFingerprint(const QString &file, const SongList &songs, const QString &fingerprint, SongList *out);
|
||||
inline static QString NoExtensionPart(const QString &fileName);
|
||||
@@ -178,7 +178,7 @@ class CollectionWatcher : public QObject {
|
||||
QUrl ImageForSong(const QString &path, QMap<QString, QStringList> &album_art);
|
||||
void AddWatch(const Directory &dir, const QString &path);
|
||||
void RemoveWatch(const Directory &dir, const Subdirectory &subdir);
|
||||
quint64 GetMtimeForCue(const QString &cue_path);
|
||||
static quint64 GetMtimeForCue(const QString &cue_path);
|
||||
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.
|
||||
@@ -189,7 +189,7 @@ class CollectionWatcher : public QObject {
|
||||
// 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);
|
||||
|
||||
void AddChangedSong(const QString &file, const Song &matching_song, const Song &new_song, ScanTransaction *t);
|
||||
static void AddChangedSong(const QString &file, const Song &matching_song, const Song &new_song, ScanTransaction *t);
|
||||
|
||||
quint64 FilesCountForPath(ScanTransaction *t, const QString &path);
|
||||
quint64 FilesCountForSubdirs(ScanTransaction *t, const SubdirectoryList &subdirs, QMap<QString, quint64> &subdir_files_count);
|
||||
|
||||
Reference in New Issue
Block a user