From 4cc13104a872e8a1d4a66ebdcb58288c97dd1590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Sun, 15 Dec 2024 16:29:56 +0100 Subject: [PATCH] fix running mixxx-test directly --- src/test/librarytest.cpp | 4 ++++ src/test/librarytest.h | 2 +- src/test/playermanagertest.cpp | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/librarytest.cpp b/src/test/librarytest.cpp index 14ae1fc00e4..4a8abb3d18e 100644 --- a/src/test/librarytest.cpp +++ b/src/test/librarytest.cpp @@ -37,6 +37,10 @@ LibraryTest::LibraryTest() CoverArtCache::createInstance(); } +LibraryTest::~LibraryTest() { + CoverArtCache::destroy(); +} + TrackPointer LibraryTest::getOrAddTrackByLocation( const QString& trackLocation) const { return m_pTrackCollectionManager->getOrAddTrack( diff --git a/src/test/librarytest.h b/src/test/librarytest.h index 6fc97ce2145..0752a4de9b8 100644 --- a/src/test/librarytest.h +++ b/src/test/librarytest.h @@ -14,7 +14,7 @@ class LibraryTest : public MixxxDbTest, SoundSourceProviderRegistration { protected: LibraryTest(); - ~LibraryTest() override = default; + ~LibraryTest() override; TrackCollectionManager* trackCollectionManager() const { return m_pTrackCollectionManager.get(); diff --git a/src/test/playermanagertest.cpp b/src/test/playermanagertest.cpp index a4c4695d0b1..3fba2dc3dcc 100644 --- a/src/test/playermanagertest.cpp +++ b/src/test/playermanagertest.cpp @@ -107,6 +107,7 @@ class PlayerManagerTest : public MixxxDbTest, SoundSourceProviderRegistration { m_pEffectsManager.reset(); m_pTrackCollectionManager.reset(); m_pControlIndicatorTimer.reset(); + CoverArtCache::destroy(); } protected: