1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 18:43:28 -05:00

Merge pull request #2190 from srcejon/android_fixes

Android fixes
This commit is contained in:
Edouard Griffiths 2024-06-29 23:31:06 +02:00 committed by GitHub
commit 7c9c6ea440
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 3 deletions

View File

@ -504,9 +504,18 @@ void APTDemodGUI::on_saveImage_clicked()
QStringList fileNames = fileDialog.selectedFiles();
if (fileNames.size() > 0)
{
qDebug() << "APT: Saving image to " << fileNames;
if (!m_image.save(fileNames[0])) {
QMessageBox::critical(this, "APT Demodulator", QString("Failed to save image to %1").arg(fileNames[0]));
QFileInfo fileInfo(fileNames[0]);
if (fileInfo.suffix() != "")
{
qDebug() << "APT: Saving image to " << fileNames;
if (!m_image.save(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"));
}
}
}

View File

@ -375,11 +375,14 @@ void ConfigurationsDialog::on_configurationExport_clicked()
if (fileName != "")
{
#ifndef ANDROID
// Can't change filenames on Android
QFileInfo fileInfo(fileName);
if (fileInfo.suffix() != "cfgx") {
fileName += ".cfgx";
}
#endif
QFile exportFile(fileName);

View File

@ -297,11 +297,14 @@ void DeviceSetPresetsDialog::on_presetExport_clicked()
if (fileName != "")
{
#ifndef ANDROID
// Can't change filenames on Android
QFileInfo fileInfo(fileName);
if (fileInfo.suffix() != "prex") {
fileName += ".prex";
}
#endif
QFile exportFile(fileName);