FilesystemMusicStorage: Use QFile::supportsMoveToTrash
This commit is contained in:
@@ -113,7 +113,11 @@ bool FilesystemMusicStorage::DeleteFromStorage(const DeleteJob &job) {
|
|||||||
QString path = job.metadata_.url().toLocalFile();
|
QString path = job.metadata_.url().toLocalFile();
|
||||||
QFileInfo fileInfo(path);
|
QFileInfo fileInfo(path);
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
|
||||||
|
if (job.use_trash_ && QFile::supportsMoveToTrash()) {
|
||||||
|
#else
|
||||||
if (job.use_trash_) {
|
if (job.use_trash_) {
|
||||||
|
#endif
|
||||||
return QFile::moveToTrash(path);
|
return QFile::moveToTrash(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user