From f5002cae3671083b9bc60b85e59a3a7d0b4563aa Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 12 Jun 2024 18:07:58 +0200 Subject: [PATCH] Make static --- src/collection/collectionmodel.cpp | 2 +- src/collection/collectionmodel.h | 2 +- src/device/devicelister.cpp | 2 +- src/device/devicelister.h | 4 ++-- src/lyrics/azlyricscomlyricsprovider.h | 2 +- src/lyrics/elyricsnetlyricsprovider.h | 2 +- src/lyrics/letraslyricsprovider.h | 2 +- src/lyrics/songlyricscomlyricsprovider.h | 2 +- src/providers/musixmatchprovider.h | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/collection/collectionmodel.cpp b/src/collection/collectionmodel.cpp index 68f208d00..dc5f9ad29 100644 --- a/src/collection/collectionmodel.cpp +++ b/src/collection/collectionmodel.cpp @@ -848,7 +848,7 @@ QString CollectionModel::AlbumIconPixmapCacheKey(const QModelIndex &idx) const { } -QUrl CollectionModel::AlbumIconPixmapDiskCacheKey(const QString &cache_key) const { +QUrl CollectionModel::AlbumIconPixmapDiskCacheKey(const QString &cache_key) { return QUrl(QString::fromLatin1(QUrl::toPercentEncoding(cache_key))); diff --git a/src/collection/collectionmodel.h b/src/collection/collectionmodel.h index acada19fe..1299e532c 100644 --- a/src/collection/collectionmodel.h +++ b/src/collection/collectionmodel.h @@ -247,7 +247,7 @@ class CollectionModel : public SimpleTreeModel { // Helpers static bool IsCompilationArtistNode(const CollectionItem *node) { return node == node->parent->compilation_artist_node_; } QString AlbumIconPixmapCacheKey(const QModelIndex &idx) const; - QUrl AlbumIconPixmapDiskCacheKey(const QString &cache_key) const; + static QUrl AlbumIconPixmapDiskCacheKey(const QString &cache_key); QVariant AlbumIcon(const QModelIndex &idx); void ClearItemPixmapCache(CollectionItem *item); bool CompareItems(const CollectionItem *a, const CollectionItem *b) const; diff --git a/src/device/devicelister.cpp b/src/device/devicelister.cpp index e52072b4c..3effc028a 100644 --- a/src/device/devicelister.cpp +++ b/src/device/devicelister.cpp @@ -222,7 +222,7 @@ QUrl DeviceLister::MakeUrlFromLocalPath(const QString &path) const { } -bool DeviceLister::IsIpod(const QString &path) const { +bool DeviceLister::IsIpod(const QString &path) { return QFile::exists(path + QStringLiteral("/iTunes_Control")) || QFile::exists(path + QStringLiteral("/iPod_Control")) || QFile::exists(path + QStringLiteral("/iTunes/iTunes_Control")); diff --git a/src/device/devicelister.h b/src/device/devicelister.h index 9580da288..3c20f4417 100644 --- a/src/device/devicelister.h +++ b/src/device/devicelister.h @@ -91,10 +91,10 @@ class DeviceLister : public QObject { protected: virtual bool Init() = 0; QUrl MakeUrlFromLocalPath(const QString &path) const; - bool IsIpod(const QString &path) const; + static bool IsIpod(const QString &path); QVariantList GuessIconForPath(const QString &path); - QVariantList GuessIconForModel(const QString &vendor, const QString &model); + static QVariantList GuessIconForModel(const QString &vendor, const QString &model); protected: QThread *thread_; diff --git a/src/lyrics/azlyricscomlyricsprovider.h b/src/lyrics/azlyricscomlyricsprovider.h index 147b8b3be..88a41bb42 100644 --- a/src/lyrics/azlyricscomlyricsprovider.h +++ b/src/lyrics/azlyricscomlyricsprovider.h @@ -40,7 +40,7 @@ class AzLyricsComLyricsProvider : public HtmlLyricsProvider { QUrl Url(const LyricsSearchRequest &request) override; private: - QString StringFixup(const QString &text); + static QString StringFixup(const QString &text); }; #endif // AZLYRICSCOMLYRICSPROVIDER_H diff --git a/src/lyrics/elyricsnetlyricsprovider.h b/src/lyrics/elyricsnetlyricsprovider.h index 4fa4fb2cc..f1341f2ce 100644 --- a/src/lyrics/elyricsnetlyricsprovider.h +++ b/src/lyrics/elyricsnetlyricsprovider.h @@ -40,7 +40,7 @@ class ElyricsNetLyricsProvider : public HtmlLyricsProvider { QUrl Url(const LyricsSearchRequest &request) override; private: - QString StringFixup(const QString &text); + static QString StringFixup(const QString &text); }; #endif // ELYRICSNETLYRICSPROVIDER_H diff --git a/src/lyrics/letraslyricsprovider.h b/src/lyrics/letraslyricsprovider.h index 51b24c0b6..0f57a3007 100644 --- a/src/lyrics/letraslyricsprovider.h +++ b/src/lyrics/letraslyricsprovider.h @@ -40,7 +40,7 @@ class LetrasLyricsProvider : public HtmlLyricsProvider { QUrl Url(const LyricsSearchRequest &request) override; private: - QString StringFixup(const QString &text); + static QString StringFixup(const QString &text); }; #endif // LETRASLYRICSPROVIDER_H diff --git a/src/lyrics/songlyricscomlyricsprovider.h b/src/lyrics/songlyricscomlyricsprovider.h index 1b62c2ed2..93aa3ce61 100644 --- a/src/lyrics/songlyricscomlyricsprovider.h +++ b/src/lyrics/songlyricscomlyricsprovider.h @@ -40,7 +40,7 @@ class SongLyricsComLyricsProvider : public HtmlLyricsProvider { QUrl Url(const LyricsSearchRequest &request) override; private: - QString StringFixup(QString text); + static QString StringFixup(QString text); }; #endif // SONGLYRICSCOMLYRICSPROVIDER_H diff --git a/src/providers/musixmatchprovider.h b/src/providers/musixmatchprovider.h index 883dd80b7..4412df511 100644 --- a/src/providers/musixmatchprovider.h +++ b/src/providers/musixmatchprovider.h @@ -25,7 +25,7 @@ class MusixmatchProvider { protected: - QString StringFixup(QString text); + static QString StringFixup(QString text); protected: static const char *kApiUrl;