mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
ifdefs--: abstract QDesktopServices away once again in TomahawkSettings
This commit is contained in:
@@ -88,6 +88,13 @@ TomahawkSettingsGui::~TomahawkSettingsGui()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
TomahawkSettingsGui::storageCacheLocation() const
|
||||||
|
{
|
||||||
|
return QDesktopServices::storageLocation( QDesktopServices::CacheLocation ) + "/InfoSystemCache/";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QStringList
|
QStringList
|
||||||
TomahawkSettingsGui::scannerPaths() const
|
TomahawkSettingsGui::scannerPaths() const
|
||||||
{
|
{
|
||||||
|
@@ -39,6 +39,7 @@ public:
|
|||||||
explicit TomahawkSettingsGui( QObject* parent = 0 );
|
explicit TomahawkSettingsGui( QObject* parent = 0 );
|
||||||
virtual ~TomahawkSettingsGui();
|
virtual ~TomahawkSettingsGui();
|
||||||
|
|
||||||
|
virtual QString storageCacheLocation() const;
|
||||||
virtual QStringList scannerPaths() const;
|
virtual QStringList scannerPaths() const;
|
||||||
|
|
||||||
AtticaManager::StateHash atticaResolverStates() const;
|
AtticaManager::StateHash atticaResolverStates() const;
|
||||||
|
@@ -40,11 +40,7 @@ namespace InfoSystem
|
|||||||
|
|
||||||
InfoSystemCache::InfoSystemCache( QObject* parent )
|
InfoSystemCache::InfoSystemCache( QObject* parent )
|
||||||
: QObject( parent )
|
: QObject( parent )
|
||||||
#ifndef ENABLE_HEADLESS
|
, m_cacheBaseDir( TomahawkSettings::instance()->storageCacheLocation() + "/InfoSystemCache/" )
|
||||||
, m_cacheBaseDir( QDesktopServices::storageLocation( QDesktopServices::CacheLocation ) + "/InfoSystemCache/" )
|
|
||||||
#else
|
|
||||||
, m_cacheBaseDir( QDir::tempPath() )
|
|
||||||
#endif
|
|
||||||
, m_cacheVersion( 2 )
|
, m_cacheVersion( 2 )
|
||||||
{
|
{
|
||||||
tDebug() << Q_FUNC_INFO;
|
tDebug() << Q_FUNC_INFO;
|
||||||
|
@@ -219,6 +219,13 @@ TomahawkSettings::infoSystemCacheVersion() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
TomahawkSettings::storageCacheLocation() const
|
||||||
|
{
|
||||||
|
return QDir::tempPath() + "/tomahawk/";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QStringList
|
QStringList
|
||||||
TomahawkSettings::scannerPaths() const
|
TomahawkSettings::scannerPaths() const
|
||||||
{
|
{
|
||||||
|
@@ -41,6 +41,7 @@ public:
|
|||||||
void applyChanges() { emit changed(); }
|
void applyChanges() { emit changed(); }
|
||||||
|
|
||||||
/// General settings
|
/// General settings
|
||||||
|
virtual QString storageCacheLocation() const;
|
||||||
virtual QStringList scannerPaths() const; /// QDesktopServices::MusicLocation in TomahawkSettingsGui
|
virtual QStringList scannerPaths() const; /// QDesktopServices::MusicLocation in TomahawkSettingsGui
|
||||||
void setScannerPaths( const QStringList& paths );
|
void setScannerPaths( const QStringList& paths );
|
||||||
bool hasScannerPaths() const;
|
bool hasScannerPaths() const;
|
||||||
|
Reference in New Issue
Block a user