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