1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

qt5: use QStandardPaths in TomahawkSettings

This commit is contained in:
Dominik Schmidt 2013-01-05 16:46:42 +01:00
parent 504c1aece2
commit 45c6396b0a

View File

@ -18,7 +18,11 @@
#include "TomahawkSettingsGui.h"
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
#include <QStandardPaths>
#else
#include <QDesktopServices>
#endif
using namespace Tomahawk;
@ -82,7 +86,11 @@ TomahawkSettingsGui::~TomahawkSettingsGui()
QString
TomahawkSettingsGui::storageCacheLocation() const
{
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
return QStandardPaths::writableLocation( QStandardPaths::CacheLocation );
#else
return QDesktopServices::storageLocation( QDesktopServices::CacheLocation );
#endif
}
@ -91,7 +99,11 @@ TomahawkSettingsGui::scannerPaths() const
{
QString musicLocation;
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
musicLocation = QStandardPaths::writableLocation( QStandardPaths::MusicLocation );
#else
musicLocation = QDesktopServices::storageLocation( QDesktopServices::MusicLocation );
#endif
return value( "scanner/paths", musicLocation ).toStringList();
}