Automatically add .prex suffix to saved preset file if not specified in the file dialog

pull/6/head
f4exb 2016-03-29 11:04:08 +02:00
rodzic a81c7e6e5b
commit bb9900e699
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -20,6 +20,7 @@
#include <QLabel>
#include <QComboBox>
#include <QFile>
#include <QFileInfo>
#include <QFileDialog>
#include <QTextStream>
@ -547,6 +548,12 @@ void MainWindow::on_presetExport_clicked()
if (fileName != "")
{
QFileInfo fileInfo(fileName);
if (fileInfo.suffix() != "prex") {
fileName += ".prex";
}
QFile exportFile(fileName);
if (exportFile.open(QIODevice::WriteOnly | QIODevice::Text))