From 174037c31a1911d8d15cd834758a896d3872e016 Mon Sep 17 00:00:00 2001 From: "Raine M. Ekman" Date: Mon, 7 Jan 2013 20:21:57 +0100 Subject: [PATCH] ExportProjectDialog: fix static file extension on multitrack export When using the multitrack export feature the output files always had the extension ".wav", even if exported as OGG. This patch fixes this issue. Closes #3595157. Signed-off-by: Tobias Doerffel --- include/export_project_dialog.h | 1 + src/gui/export_project_dialog.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/export_project_dialog.h b/include/export_project_dialog.h index eb0ba35ec..7f068e4b2 100644 --- a/include/export_project_dialog.h +++ b/include/export_project_dialog.h @@ -59,6 +59,7 @@ private slots: private: QString m_fileName; QString m_dirName; + QString m_fileExtension; typedef QVector RenderVector; RenderVector m_renderers; bool m_multiExport; diff --git a/src/gui/export_project_dialog.cpp b/src/gui/export_project_dialog.cpp index eba9123ee..2a385093c 100644 --- a/src/gui/export_project_dialog.cpp +++ b/src/gui/export_project_dialog.cpp @@ -39,6 +39,7 @@ exportProjectDialog::exportProjectDialog( const QString & _file_name, QDialog( _parent ), Ui::ExportProjectDialog(), m_fileName( _file_name ), + m_fileExtension(), m_multiExport(multi_export) { setupUi( this ); @@ -200,7 +201,7 @@ void exportProjectDialog::multiRender() m_unmuted.push_back(tk); QString nextName = tk->name(); nextName = nextName.remove(QRegExp("[^a-zA-Z]")); - QString name = QString("%1_%2.wav").arg(x++).arg(nextName); + QString name = QString( "%1_%2%3" ).arg( x++ ).arg( nextName ).arg( m_fileExtension ); m_fileName = QDir(m_dirName).filePath(name); prepRender(); } @@ -221,7 +222,7 @@ void exportProjectDialog::multiRender() m_unmuted.push_back(tk); QString nextName = tk->name(); nextName = nextName.remove(QRegExp("[^a-zA-Z]")); - QString name = QString("%1_%2.wav").arg(x++).arg(nextName); + QString name = QString( "%1_%2%3" ).arg( x++ ).arg( nextName ).arg( m_fileExtension ); m_fileName = QDir(m_dirName).filePath(name); prepRender(); } @@ -292,6 +293,7 @@ void exportProjectDialog::startBtnClicked() __fileEncodeDevices[i].m_description ) ) { m_ft = __fileEncodeDevices[i].m_fileFormat; + m_fileExtension = QString( QLatin1String( __fileEncodeDevices[i].m_extension ) ); break; } }