1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 09:04:33 +02:00

change TomahawkUtils::removeDirectory to use the new Qt5 functionality when building with Qt5

This commit is contained in:
Stefan Derkits
2014-09-10 11:16:16 +02:00
parent f8f93ab575
commit e70daa3f7e

View File

@@ -531,6 +531,9 @@ mergePlaylistChanges( const QList< Tomahawk::query_ptr >& orig, const QList< Tom
bool bool
removeDirectory( const QString& dir ) removeDirectory( const QString& dir )
{ {
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
return QDir aDir( dir ).removeRecursively();
#else
const QDir aDir( dir ); const QDir aDir( dir );
tLog() << "Deleting DIR:" << dir; tLog() << "Deleting DIR:" << dir;
@@ -556,6 +559,7 @@ removeDirectory( const QString& dir )
} }
return !has_err; return !has_err;
#endif
} }