FilesystemMusicStorage: Use QFile::supportsMoveToTrash

This commit is contained in:
Jonas Kvinge
2025-02-18 16:55:02 +01:00
parent 6db540a3a7
commit 0cd0f7f2e7

View File

@@ -113,7 +113,11 @@ bool FilesystemMusicStorage::DeleteFromStorage(const DeleteJob &job) {
QString path = job.metadata_.url().toLocalFile();
QFileInfo fileInfo(path);
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
if (job.use_trash_ && QFile::supportsMoveToTrash()) {
#else
if (job.use_trash_) {
#endif
return QFile::moveToTrash(path);
}