1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-13 17:43:59 +02:00

Clear attica pixmap cache on new version

This commit is contained in:
Leo Franchi
2012-09-17 10:13:15 -04:00
parent f6cef802f3
commit 0544274a80
2 changed files with 15 additions and 1 deletions

View File

@@ -591,6 +591,20 @@ TomahawkSettings::doUpgrade( int oldVersion, int newVersion )
createSpotifyAccount();
}
}
else if ( oldVersion == 12 )
{
// Force attica resolver pixmap cache refresh
QDir cacheDir = TomahawkUtils::appDataDir();
if ( cacheDir.cd( "atticacache" ) )
{
QStringList files = cacheDir.entryList( QStringList() << "*.png" );
foreach ( const QString& file, files )
{
const bool removed = cacheDir.remove( file );
tDebug() << "Tried to remove cached image, succeeded?" << removed << cacheDir.filePath( file );
}
}
}
}

View File

@@ -28,7 +28,7 @@
#include <QtNetwork/QNetworkProxy>
#include <QStringList>
#define TOMAHAWK_SETTINGS_VERSION 12
#define TOMAHAWK_SETTINGS_VERSION 13
/**
* Convenience wrapper around QSettings for tomahawk-specific config