diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2016-08-06 01:27:42 +0200 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2016-08-06 01:27:42 +0200 |
commit | b4fef08545765c1d12d33f75515a5caed14f9b9d (patch) | |
tree | 377dc505d9bc17c3db2881e1000ebdf21f0d3baf | |
parent | 904a34355987f3a60e498e2f48193664d6bf1261 (diff) | |
parent | 0e388e67534a21c3281816e2a69b6cdeb5a52033 (diff) |
Merge remote-tracking branch 'upstream/master' into coverduplicate2
Conflicts:
src/library/coverart.h
src/library/coverartcache.cpp
src/test/coverartutils_test.cpp
-rw-r--r-- | src/dialog/dlgabout.cpp | 3 | ||||
-rw-r--r-- | src/engine/effects/engineeffectchain.cpp | 2 | ||||
-rw-r--r-- | src/library/coverart.cpp | 4 | ||||
-rw-r--r-- | src/library/coverart.h | 4 | ||||
-rw-r--r-- | src/library/coverartdelegate.cpp | 1 | ||||
-rw-r--r-- | src/test/coverartutils_test.cpp | 6 |
6 files changed, 13 insertions, 7 deletions
diff --git a/src/dialog/dlgabout.cpp b/src/dialog/dlgabout.cpp index e41e5a3530..f891bde0b9 100644 --- a/src/dialog/dlgabout.cpp +++ b/src/dialog/dlgabout.cpp @@ -109,7 +109,8 @@ DlgAbout::DlgAbout(QWidget* parent) : QDialog(parent), Ui::DlgAboutDlg() { << "Serge Ukolov" << "Patric Schmitz" << "Timothy Rae" - << "Roland Schwarz"; + << "Roland Schwarz" + << "Jan Ypma"; QStringList specialThanks; specialThanks diff --git a/src/engine/effects/engineeffectchain.cpp b/src/engine/effects/engineeffectchain.cpp index b344da6465..1b065729e9 100644 --- a/src/engine/effects/engineeffectchain.cpp +++ b/src/engine/effects/engineeffectchain.cpp @@ -202,7 +202,7 @@ void EngineEffectChain::process(const ChannelHandle& handle, if (pEffect == NULL || !pEffect->enabled()) { continue; } - const CSAMPLE* pIntermediateInput = (i == 0) ? pInOut : m_pBuffer; + const CSAMPLE* pIntermediateInput = (anyProcessed) ? m_pBuffer : pInOut; CSAMPLE* pIntermediateOutput = m_pBuffer; pEffect->process(handle, pIntermediateInput, pIntermediateOutput, numSamples, sampleRate, diff --git a/src/library/coverart.cpp b/src/library/coverart.cpp index f9d678a390..89f324ade4 100644 --- a/src/library/coverart.cpp +++ b/src/library/coverart.cpp @@ -1,6 +1,7 @@ #include <QtDebug> #include "library/coverart.h" +#include "library/coverartutils.h" #include "util/debug.h" QString sourceToString(CoverInfo::Source source) { @@ -46,3 +47,6 @@ QDebug operator<<(QDebug dbg, const CoverArt& art) { .arg(toDebugString(art.image.size()), toDebugString(static_cast<CoverInfo>(art))); } + +const quint16 CoverInfoRelative::kNullImageHash = CoverArtUtils::calculateHash(QImage()); + diff --git a/src/library/coverart.h b/src/library/coverart.h index 3d03266219..1ea0464087 100644 --- a/src/library/coverart.h +++ b/src/library/coverart.h @@ -29,11 +29,13 @@ class CoverInfoRelative { FILE = 2 }; + static const quint16 kNullImageHash; + CoverInfoRelative() : source(UNKNOWN), type(NONE), // This default value is fine: qChecksum(NULL, 0) is 0. - hash(0) { + hash(kNullImageHash) { } bool operator==(const CoverInfoRelative& other) const { diff --git a/src/library/coverartdelegate.cpp b/src/library/coverartdelegate.cpp index 13027da4cb..d93639d62d 100644 --- a/src/library/coverartdelegate.cpp +++ b/src/library/coverartdelegate.cpp @@ -71,7 +71,6 @@ void CoverArtDelegate::slotOnlyCachedCoverArt(bool b) { void CoverArtDelegate::slotCoverFound(const QObject* pRequestor, const CoverInfo& info, QPixmap pixmap, bool fromCache) { - Q_UNUSED(info); if (pRequestor == this && !pixmap.isNull() && !fromCache) { // qDebug() << "CoverArtDelegate::slotCoverFound" << pRequestor << info // << pixmap.size(); diff --git a/src/test/coverartutils_test.cpp b/src/test/coverartutils_test.cpp index 22e1d8c3e7..611462d04d 100644 --- a/src/test/coverartutils_test.cpp +++ b/src/test/coverartutils_test.cpp @@ -136,7 +136,7 @@ TEST_F(CoverArtUtilTest, searchImage) { EXPECT_EQ(result.type, CoverInfo::METADATA); EXPECT_EQ(result.source, CoverInfo::GUESSED); EXPECT_EQ(result.coverLocation, QString()); - EXPECT_NE(result.hash, 0); + EXPECT_NE(result.hash, CoverInfoRelative::kNullImageHash); const char* format("jpg"); const QString qFormat(format); @@ -164,7 +164,7 @@ TEST_F(CoverArtUtilTest, searchImage) { // All the following expect the same image/hash to be selected. CoverInfoRelative expected2; - expected2.hash = 0; + expected2.hash = CoverInfoRelative::kNullImageHash; // All the following expect FILE and GUESSED. expected2.type = CoverInfo::FILE; @@ -244,7 +244,7 @@ TEST_F(CoverArtUtilTest, searchImage) { if (cover.baseName() == "other1") { expected2.type = CoverInfo::NONE; expected2.coverLocation = QString(); - expected2.hash = 0; + expected2.hash = CoverInfoRelative::kNullImageHash; } else { expected2.type = CoverInfo::FILE; expected2.coverLocation = cover.fileName(); |