mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-14 01:54:07 +02:00
Clear attica pixmap cache on new version
This commit is contained in:
@@ -591,6 +591,20 @@ TomahawkSettings::doUpgrade( int oldVersion, int newVersion )
|
|||||||
createSpotifyAccount();
|
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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#include <QtNetwork/QNetworkProxy>
|
#include <QtNetwork/QNetworkProxy>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
#define TOMAHAWK_SETTINGS_VERSION 12
|
#define TOMAHAWK_SETTINGS_VERSION 13
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience wrapper around QSettings for tomahawk-specific config
|
* Convenience wrapper around QSettings for tomahawk-specific config
|
||||||
|
Reference in New Issue
Block a user