From e70daa3f7e45f06c999ba79ba9b99b61f3be80b1 Mon Sep 17 00:00:00 2001 From: Stefan Derkits Date: Wed, 10 Sep 2014 11:16:16 +0200 Subject: [PATCH] change TomahawkUtils::removeDirectory to use the new Qt5 functionality when building with Qt5 --- src/libtomahawk/utils/TomahawkUtils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libtomahawk/utils/TomahawkUtils.cpp b/src/libtomahawk/utils/TomahawkUtils.cpp index 8adaa3b99..000bd4a0e 100644 --- a/src/libtomahawk/utils/TomahawkUtils.cpp +++ b/src/libtomahawk/utils/TomahawkUtils.cpp @@ -531,6 +531,9 @@ mergePlaylistChanges( const QList< Tomahawk::query_ptr >& orig, const QList< Tom bool removeDirectory( const QString& dir ) { +#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) + return QDir aDir( dir ).removeRecursively(); +#else const QDir aDir( dir ); tLog() << "Deleting DIR:" << dir; @@ -556,6 +559,7 @@ removeDirectory( const QString& dir ) } return !has_err; +#endif }