1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05:00

Merge pull request #1685 from srcejon/fix_1681

Fix QFileDialog filters to work with non-native file dialog.
This commit is contained in:
Edouard Griffiths 2023-05-04 11:34:31 +02:00 committed by GitHub
commit 892ef90bf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -505,7 +505,7 @@ void APTDemodGUI::on_showSettings_clicked()
// Save image to disk
void APTDemodGUI::on_saveImage_clicked()
{
QFileDialog fileDialog(nullptr, "Select file to save image to", "", "*.png;*.jpg;*.jpeg;*.bmp;*.ppm;*.xbm;*.xpm");
QFileDialog fileDialog(nullptr, "Select file to save image to", "", "*.png *.jpg *.jpeg *.bmp *.ppm *.xbm *.xpm");
fileDialog.setAcceptMode(QFileDialog::AcceptSave);
if (fileDialog.exec())
{

View File

@ -100,7 +100,7 @@ void APTDemodSettingsDialog::on_autoSave_clicked(bool checked)
void APTDemodSettingsDialog::on_addPalette_clicked()
{
QFileDialog fileDialog(nullptr, "Select palette files", "", "*.png;*.bmp");
QFileDialog fileDialog(nullptr, "Select palette files", "", "*.png *.bmp");
fileDialog.setFileMode(QFileDialog::ExistingFiles);
if (fileDialog.exec())
{

View File

@ -390,7 +390,7 @@ void HeatMapGUI::on_readCSV_clicked()
void HeatMapGUI::on_writeImage_clicked()
{
m_imageFileDialog.setAcceptMode(QFileDialog::AcceptSave);
m_imageFileDialog.setNameFilter("*.png;*.jpg;*.jpeg;*.bmp;*.ppm;*.xbm;*.xpm");
m_imageFileDialog.setNameFilter("*.png *.jpg *.jpeg *.bmp *.ppm *.xbm *.xpm");
if (m_imageFileDialog.exec())
{
QStringList fileNames = m_imageFileDialog.selectedFiles();

View File

@ -5038,7 +5038,7 @@ void RadioAstronomyGUI::on_sunOrbitalVelocity_valueChanged(double value)
void RadioAstronomyGUI::on_savePowerChartImage_clicked()
{
QFileDialog fileDialog(nullptr, "Select file to save image to", "", "*.png;*.jpg;*.jpeg;*.bmp;*.ppm;*.xbm;*.xpm");
QFileDialog fileDialog(nullptr, "Select file to save image to", "", "*.png *.jpg *.jpeg *.bmp *.ppm *.xbm *.xpm");
fileDialog.setAcceptMode(QFileDialog::AcceptSave);
if (fileDialog.exec())
{
@ -5058,7 +5058,7 @@ void RadioAstronomyGUI::on_savePowerChartImage_clicked()
void RadioAstronomyGUI::on_saveSpectrumChartImage_clicked()
{
QFileDialog fileDialog(nullptr, "Select file to save image to", "", "*.png;*.jpg;*.jpeg;*.bmp;*.ppm;*.xbm;*.xpm");
QFileDialog fileDialog(nullptr, "Select file to save image to", "", "*.png *.jpg *.jpeg *.bmp *.ppm *.xbm *.xpm");
fileDialog.setAcceptMode(QFileDialog::AcceptSave);
if (fileDialog.exec())
{