diff --git a/autotests/localfilelistingtest.cpp b/autotests/localfilelistingtest.cpp --- a/autotests/localfilelistingtest.cpp +++ b/autotests/localfilelistingtest.cpp @@ -41,7 +41,7 @@ #include -#if !defined Q_OS_FREEBSD && !defined Q_OS_MACOS +#if !defined Q_OS_FREEBSD && !defined Q_OS_MACOS && !defined Q_OS_LINUX #include #endif @@ -389,9 +389,9 @@ 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()); +#if defined Q_OS_FREEBSD || defined Q_OS_MACOS || defined Q_OS_LINUX + QDir dir; + dir.rename(musicPath, musicFriendPath); #else std::rename(musicPath.toStdString().c_str(), musicFriendPath.toStdString().c_str()); #endif