mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-26 14:05:33 -04:00
commit
7c9c6ea440
@ -503,12 +503,21 @@ void APTDemodGUI::on_saveImage_clicked()
|
|||||||
{
|
{
|
||||||
QStringList fileNames = fileDialog.selectedFiles();
|
QStringList fileNames = fileDialog.selectedFiles();
|
||||||
if (fileNames.size() > 0)
|
if (fileNames.size() > 0)
|
||||||
|
{
|
||||||
|
QFileInfo fileInfo(fileNames[0]);
|
||||||
|
|
||||||
|
if (fileInfo.suffix() != "")
|
||||||
{
|
{
|
||||||
qDebug() << "APT: Saving image to " << fileNames;
|
qDebug() << "APT: Saving image to " << fileNames;
|
||||||
if (!m_image.save(fileNames[0])) {
|
if (!m_image.save(fileNames[0])) {
|
||||||
QMessageBox::critical(this, "APT Demodulator", QString("Failed to save image to %1").arg(fileNames[0]));
|
QMessageBox::critical(this, "APT Demodulator", QString("Failed to save image to %1").arg(fileNames[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QMessageBox::critical(this, "APT Demodulator", QString("Please specify a filename with an extension such as .png or .jpg"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,11 +375,14 @@ void ConfigurationsDialog::on_configurationExport_clicked()
|
|||||||
|
|
||||||
if (fileName != "")
|
if (fileName != "")
|
||||||
{
|
{
|
||||||
|
#ifndef ANDROID
|
||||||
|
// Can't change filenames on Android
|
||||||
QFileInfo fileInfo(fileName);
|
QFileInfo fileInfo(fileName);
|
||||||
|
|
||||||
if (fileInfo.suffix() != "cfgx") {
|
if (fileInfo.suffix() != "cfgx") {
|
||||||
fileName += ".cfgx";
|
fileName += ".cfgx";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QFile exportFile(fileName);
|
QFile exportFile(fileName);
|
||||||
|
|
||||||
|
@ -297,11 +297,14 @@ void DeviceSetPresetsDialog::on_presetExport_clicked()
|
|||||||
|
|
||||||
if (fileName != "")
|
if (fileName != "")
|
||||||
{
|
{
|
||||||
|
#ifndef ANDROID
|
||||||
|
// Can't change filenames on Android
|
||||||
QFileInfo fileInfo(fileName);
|
QFileInfo fileInfo(fileName);
|
||||||
|
|
||||||
if (fileInfo.suffix() != "prex") {
|
if (fileInfo.suffix() != "prex") {
|
||||||
fileName += ".prex";
|
fileName += ".prex";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QFile exportFile(fileName);
|
QFile exportFile(fileName);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user