Fix compile with optional components disabled

This commit is contained in:
Jonas Kvinge
2019-10-03 23:29:52 +02:00
parent f449808ba3
commit 4402a56e94
16 changed files with 67 additions and 41 deletions

View File

@@ -213,9 +213,10 @@ void FileView::UndoCommand::undo() {
}
#ifdef HAVE_GSTREAMER
void FileView::Delete(const QStringList &filenames) {
#ifdef HAVE_GSTREAMER
if (filenames.isEmpty())
return;
@@ -228,19 +229,28 @@ void FileView::Delete(const QStringList &filenames) {
connect(delete_files, SIGNAL(Finished(SongList)), SLOT(DeleteFinished(SongList)));
delete_files->Start(filenames);
#else
Q_UNUSED(filenames)
#endif
}
void FileView::DeleteFinished(const SongList &songs_with_errors) {
#ifdef HAVE_GSTREAMER
if (songs_with_errors.isEmpty()) return;
OrganiseErrorDialog *dialog = new OrganiseErrorDialog(this);
dialog->Show(OrganiseErrorDialog::Type_Delete, songs_with_errors);
// It deletes itself when the user closes it
}
#else
Q_UNUSED(songs_with_errors)
#endif
}
void FileView::showEvent(QShowEvent *e) {
QWidget::showEvent(e);