summaryrefslogtreecommitdiffstats
path: root/src/library
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2018-01-18 21:36:08 +0100
committerUwe Klotz <uklotz@mixxx.org>2018-01-25 06:44:11 +0100
commitc215665f53a396f0831cf077b3b383a74ea2efb8 (patch)
tree987d5a74bb7d3f4f3fb6606c27a45afb1d2607ae /src/library
parent84d72a0bdfcfa88a9d879c610b72f82e72d2d1d7 (diff)
Prefer CoverInfoRelative over CoverInfo
Diffstat (limited to 'src/library')
-rw-r--r--src/library/coverartcache.cpp2
-rw-r--r--src/library/coverartcache.h2
-rw-r--r--src/library/coverartdelegate.cpp6
-rw-r--r--src/library/coverartdelegate.h2
-rw-r--r--src/library/dao/trackdao.cpp2
-rw-r--r--src/library/dlgcoverartfullsize.cpp14
-rw-r--r--src/library/dlgcoverartfullsize.h4
-rw-r--r--src/library/dlgtrackinfo.cpp12
-rw-r--r--src/library/dlgtrackinfo.h2
9 files changed, 23 insertions, 23 deletions
diff --git a/src/library/coverartcache.cpp b/src/library/coverartcache.cpp
index 3acb119627..eb91411473 100644
--- a/src/library/coverartcache.cpp
+++ b/src/library/coverartcache.cpp
@@ -109,7 +109,7 @@ void CoverArtCache::requestCover(const Track& track,
CoverArtCache* pCache = CoverArtCache::instance();
if (pCache == nullptr) return;
- CoverInfo info = track.getCoverInfo();
+ CoverInfo info = track.getCoverInfoWithLocation();
pCache->requestCover(info, pRequestor, 0, false, true);
}
diff --git a/src/library/coverartcache.h b/src/library/coverartcache.h
index 27754a4c2e..89e9efd5a1 100644
--- a/src/library/coverartcache.h
+++ b/src/library/coverartcache.h
@@ -55,7 +55,7 @@ class CoverArtCache : public QObject, public Singleton<CoverArtCache> {
signals:
void coverFound(const QObject* requestor,
- const CoverInfo& info, QPixmap pixmap, bool fromCache);
+ const CoverInfoRelative& info, QPixmap pixmap, bool fromCache);
protected:
CoverArtCache();
diff --git a/src/library/coverartdelegate.cpp b/src/library/coverartdelegate.cpp
index 827145b400..548e9d5a8f 100644
--- a/src/library/coverartdelegate.cpp
+++ b/src/library/coverartdelegate.cpp
@@ -21,9 +21,9 @@ CoverArtDelegate::CoverArtDelegate(QObject *parent)
CoverArtCache* pCache = CoverArtCache::instance();
if (pCache) {
- connect(pCache, SIGNAL(coverFound(const QObject*, const CoverInfo&,
+ connect(pCache, SIGNAL(coverFound(const QObject*, const CoverInfoRelative&,
QPixmap, bool)),
- this, SLOT(slotCoverFound(const QObject*, const CoverInfo&,
+ this, SLOT(slotCoverFound(const QObject*, const CoverInfoRelative&,
QPixmap, bool)));
}
@@ -69,7 +69,7 @@ void CoverArtDelegate::slotOnlyCachedCoverArt(bool b) {
}
void CoverArtDelegate::slotCoverFound(const QObject* pRequestor,
- const CoverInfo& info,
+ const CoverInfoRelative& info,
QPixmap pixmap, bool fromCache) {
if (pRequestor == this && !pixmap.isNull() && !fromCache) {
// qDebug() << "CoverArtDelegate::slotCoverFound" << pRequestor << info
diff --git a/src/library/coverartdelegate.h b/src/library/coverartdelegate.h
index 2e36fb8dfb..d510c1d006 100644
--- a/src/library/coverartdelegate.h
+++ b/src/library/coverartdelegate.h
@@ -36,7 +36,7 @@ class CoverArtDelegate : public QStyledItemDelegate {
void slotOnlyCachedCoverArt(bool b);
void slotCoverFound(const QObject* pRequestor,
- const CoverInfo& info,
+ const CoverInfoRelative& info,
QPixmap pixmap, bool fromCache);
private:
diff --git a/src/library/dao/trackdao.cpp b/src/library/dao/trackdao.cpp
index 7677ad4c23..eebcce7f6d 100644
--- a/src/library/dao/trackdao.cpp
+++ b/src/library/dao/trackdao.cpp
@@ -424,7 +424,7 @@ namespace {
pTrackLibraryQuery->bindValue(":timesplayed", playCounter.getTimesPlayed());
pTrackLibraryQuery->bindValue(":played", playCounter.isPlayed() ? 1 : 0);
- const CoverInfo coverInfo(track.getCoverInfo());
+ const CoverInfoRelative coverInfo(track.getCoverInfo());
pTrackLibraryQuery->bindValue(":coverart_source", coverInfo.source);
pTrackLibraryQuery->bindValue(":coverart_type", coverInfo.type);
pTrackLibraryQuery->bindValue(":coverart_location", coverInfo.coverLocation);
diff --git a/src/library/dlgcoverartfullsize.cpp b/src/library/dlgcoverartfullsize.cpp
index 52f96c3fe4..70db2bb3da 100644
--- a/src/library/dlgcoverartfullsize.cpp
+++ b/src/library/dlgcoverartfullsize.cpp
@@ -12,16 +12,16 @@ DlgCoverArtFullSize::DlgCoverArtFullSize(QWidget* parent, BaseTrackPlayer* pPlay
CoverArtCache* pCache = CoverArtCache::instance();
if (pCache != nullptr) {
connect(pCache, SIGNAL(coverFound(const QObject*,
- const CoverInfo&, QPixmap, bool)),
+ const CoverInfoRelative&, QPixmap, bool)),
this, SLOT(slotCoverFound(const QObject*,
- const CoverInfo&, QPixmap, bool)));
+ const CoverInfoRelative&, QPixmap, bool)));
}
setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(slotCoverMenu(QPoint)));
- connect(m_pCoverMenu, SIGNAL(coverInfoSelected(const CoverInfo&)),
- this, SLOT(slotCoverInfoSelected(const CoverInfo&)));
+ connect(m_pCoverMenu, SIGNAL(coverInfoSelected(const CoverInfoRelative&)),
+ this, SLOT(slotCoverInfoSelected(const CoverInfoRelative&)));
connect(m_pCoverMenu, SIGNAL(reloadCoverArt()),
this, SLOT(slotReloadCoverArt()));
@@ -93,7 +93,7 @@ void DlgCoverArtFullSize::slotTrackCoverArtUpdated() {
}
void DlgCoverArtFullSize::slotCoverFound(const QObject* pRequestor,
- const CoverInfo& info, QPixmap pixmap,
+ const CoverInfoRelative& info, QPixmap pixmap,
bool fromCache) {
Q_UNUSED(info);
Q_UNUSED(fromCache);
@@ -136,13 +136,13 @@ void DlgCoverArtFullSize::slotCoverFound(const QObject* pRequestor,
// slots to handle signals from the context menu
void DlgCoverArtFullSize::slotReloadCoverArt() {
if (m_pLoadedTrack != nullptr) {
- CoverInfo coverInfo =
+ auto coverInfo =
CoverArtUtils::guessCoverInfo(*m_pLoadedTrack);
slotCoverInfoSelected(coverInfo);
}
}
-void DlgCoverArtFullSize::slotCoverInfoSelected(const CoverInfo& coverInfo) {
+void DlgCoverArtFullSize::slotCoverInfoSelected(const CoverInfoRelative& coverInfo) {
// qDebug() << "DlgCoverArtFullSize::slotCoverInfoSelected" << coverInfo;
if (m_pLoadedTrack != nullptr) {
m_pLoadedTrack->setCoverInfo(coverInfo);
diff --git a/src/library/dlgcoverartfullsize.h b/src/library/dlgcoverartfullsize.h
index a190c1c85f..3612a8fc55 100644
--- a/src/library/dlgcoverartfullsize.h
+++ b/src/library/dlgcoverartfullsize.h
@@ -25,12 +25,12 @@ class DlgCoverArtFullSize
public slots:
void slotLoadTrack(TrackPointer);
void slotCoverFound(const QObject* pRequestor,
- const CoverInfo& info, QPixmap pixmap, bool fromCache);
+ const CoverInfoRelative& info, QPixmap pixmap, bool fromCache);
void slotTrackCoverArtUpdated();
// slots that handle signals from WCoverArtMenu
void slotCoverMenu(const QPoint& pos);
- void slotCoverInfoSelected(const CoverInfo& coverInfo);
+ void slotCoverInfoSelected(const CoverInfoRelative& coverInfo);
void slotReloadCoverArt();
private:
diff --git a/src/library/dlgtrackinfo.cpp b/src/library/dlgtrackinfo.cpp
index 6fcac80437..bbc369915f 100644
--- a/src/library/dlgtrackinfo.cpp
+++ b/src/library/dlgtrackinfo.cpp
@@ -90,11 +90,11 @@ void DlgTrackInfo::init() {
CoverArtCache* pCache = CoverArtCache::instance();
if (pCache != NULL) {
- connect(pCache, SIGNAL(coverFound(const QObject*, const CoverInfo&, QPixmap, bool)),
- this, SLOT(slotCoverFound(const QObject*, const CoverInfo&, QPixmap, bool)));
+ connect(pCache, SIGNAL(coverFound(const QObject*, const CoverInfoRelative&, QPixmap, bool)),
+ this, SLOT(slotCoverFound(const QObject*, const CoverInfoRelative&, QPixmap, bool)));
}
- connect(m_pWCoverArtLabel, SIGNAL(coverInfoSelected(const CoverInfo&)),
- this, SLOT(slotCoverInfoSelected(const CoverInfo&)));
+ connect(m_pWCoverArtLabel, SIGNAL(coverInfoSelected(const CoverInfoRelative&)),
+ this, SLOT(slotCoverInfoSelected(const CoverInfoRelative&)));
connect(m_pWCoverArtLabel, SIGNAL(reloadCoverArt()),
this, SLOT(slotReloadCoverArt()));
}
@@ -177,7 +177,7 @@ void DlgTrackInfo::populateFields(const Track& track) {
reloadTrackBeats(track);
- m_loadedCoverInfo = track.getCoverInfo();
+ m_loadedCoverInfo = track.getCoverInfoWithLocation();
m_pWCoverArtLabel->setCoverArt(m_loadedCoverInfo, QPixmap());
CoverArtCache* pCache = CoverArtCache::instance();
if (pCache != NULL) {
@@ -227,7 +227,7 @@ void DlgTrackInfo::loadTrack(TrackPointer pTrack) {
}
void DlgTrackInfo::slotCoverFound(const QObject* pRequestor,
- const CoverInfo& info,
+ const CoverInfoRelative& info,
QPixmap pixmap, bool fromCache) {
Q_UNUSED(fromCache);
if (pRequestor == this && m_pLoadedTrack &&
diff --git a/src/library/dlgtrackinfo.h b/src/library/dlgtrackinfo.h
index b31e3e7fcf..ab6717f6d5 100644
--- a/src/library/dlgtrackinfo.h
+++ b/src/library/dlgtrackinfo.h
@@ -62,7 +62,7 @@ class DlgTrackInfo : public QDialog, public Ui::DlgTrackInfo {
void slotOpenInFileBrowser();
void slotCoverFound(const QObject* pRequestor,
- const CoverInfo& info, QPixmap pixmap, bool fromCache);
+ const CoverInfoRelative& info, QPixmap pixmap, bool fromCache);
void slotCoverInfoSelected(const CoverInfo& coverInfo);
void slotReloadCoverArt();