Browse Source

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

chirpmodem-v8.0.0
f4exb 11 years ago
parent
commit
bb9900e699
  1. 7
      sdrbase/mainwindow.cpp

7
sdrbase/mainwindow.cpp

@ -20,6 +20,7 @@ @@ -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() @@ -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))

Loading…
Cancel
Save