From 3143d2d3518acdec0618e562b90572ffbd815a9d Mon Sep 17 00:00:00 2001 From: ann0see Date: Sun, 15 Nov 2026 18:43:01 +0100 Subject: [PATCH] iOS: Suggest a file name with the settings suffix when saving the mixer setup The iOS file dialog takes the suggested file name from the path passed to QFileDialog::getSaveFileName() and falls back to "Untitled" without an extension. The load dialog filters for *.jch, so a setup saved on iOS could not be loaded again without renaming the file first. Pass a default name that carries the suffix. The save dialog hides the known suffix from the text field, so the user still sees "MixerSetup", but the file is written as MixerSetup.jch. --- src/clientdlg.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 2c7c35f02c..be621c1fd7 100644 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -807,7 +807,16 @@ void CClientDlg::OnLoadChannelSetup() void CClientDlg::OnSaveChannelSetup() { - QString strFileName = QFileDialog::getSaveFileName ( this, tr ( "Select Channel Setup File" ), "", QString ( "*." ) + MIX_SETTINGS_FILE_SUFFIX ); +#if defined( Q_OS_IOS ) + // the iOS file dialog only uses the file name as a suggestion, and the saved file + // must keep the suffix, otherwise the load dialog will not show it again. This is a workaround. + const QString strDefaultName = QString ( "MixerSetup." ) + MIX_SETTINGS_FILE_SUFFIX; +#else + const QString strDefaultName = ""; +#endif + + QString strFileName = + QFileDialog::getSaveFileName ( this, tr ( "Select Channel Setup File" ), strDefaultName, QString ( "*." ) + MIX_SETTINGS_FILE_SUFFIX ); if ( !strFileName.isEmpty() ) {