diff --git a/autotests/localfilelistingtest.cpp b/autotests/localfilelistingtest.cpp --- a/autotests/localfilelistingtest.cpp +++ b/autotests/localfilelistingtest.cpp @@ -41,10 +41,6 @@ #include -#if !defined Q_OS_FREEBSD && !defined Q_OS_MACOS -#include -#endif - class LocalFileListingTests: public QObject, public DatabaseTestData { Q_OBJECT @@ -389,12 +385,8 @@ QCOMPARE(newTracks.count(), 1); QCOMPARE(newCovers.count(), 1); -#if defined Q_OS_FREEBSD || defined Q_OS_MACOS - QString commandLine(QStringLiteral("mv ") + musicPath + QStringLiteral(" ") + musicFriendPath); - system(commandLine.toLatin1().data()); -#else - std::rename(musicPath.toStdString().c_str(), musicFriendPath.toStdString().c_str()); -#endif + QDir dir; + dir.rename(musicPath, musicFriendPath); auto removedFilesWorking = removedTracksListSpy.wait();