Commit 4bedccca authored by Matthieu Gallien's avatar Matthieu Gallien

fix compilation to not require filesystem stl c++ header

Summary: Use QDir::rename on platforms where filesystem stl standard header might not be present

Test Plan: Automatic tests are OK

Reviewers: #elisa, jriddell, ngraham, pino

Reviewed By: ngraham, pino

Subscribers: pino, ngraham

Tags: #elisa

Differential Revision: https://phabricator.kde.org/D20929
parent bc9b05ca
......@@ -41,10 +41,6 @@
#include <algorithm>
#if !defined Q_OS_FREEBSD && !defined Q_OS_MACOS
#include <filesystem>
#endif
class LocalFileListingTests: public QObject, public DatabaseTestData
{
Q_OBJECT
......@@ -389,12 +385,7 @@ private Q_SLOTS:
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().rename(musicPath, musicFriendPath);
auto removedFilesWorking = removedTracksListSpy.wait();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment