Make Preferences Choose Folder dialog obey the MuseScore.ini "nativeDialogs" boolean.
as mentioned by lasonic in https://musescore.org/en/node/99616#comment-443101:
Native/Non native dialogs for Open file and Save file are controlled by a preference. We could (should?) use this preference for the "Choose directory" dialog.
I say mscore->preferences dialogs should obey the nativeDialogs boolean. Or we make a new boolean that is for file dialogs for things other than scores.
I have been experiencing a crash #99616: FreeType CRASH in Preferences Dialog when change a path using Native File Dialog on archlinux (x86+armv7a), which could be avoided if these dialog boxes obeyed the setting.
Comments
I've tested out on my windows x86-64, archlinux i686, and archlinuxarm marchines. Now all the folder buttons in preferences will obey "nativeDialogs" setting.
However according to Qt rules for these static functions QFileDialog::getOpenFileName() and QFileDialog::getExistingDirectory() "On Windows, and OS X, this static function will use the native file dialog and not a QFileDialog" and I see no need to bother implementing that specific behavior.
https://github.com/musescore/MuseScore/pull/2406
Please quickly review this PR (since the bug with native file on archlinux is preventing me from verifying that I can pass my other PR #2400).
Fixed in branch master, commit fefc67699f
fix #99626 Preferences obey nativeDialogs setting in .ini
If on linux, Preferences dialogs for setting folders and files will now obey nativeDialog boolean setting from ini.
Note: this commit doesn't change behavior for Windows and OS X, since Qt says getExistingDirectory() and getOpenFileName() do not obey the QFileDialog::DontUseNativeDialog option.
Fixed in branch master, commit f874f24522
Merge pull request #2406 from ericfont/99626-preferences-obey-nativeDialogs-ini
fix #99626 Preferences obey nativeDialogs setting in .ini
Fixed in branch 2.0.3, commit 7c4c519eaf
fix #99626 Preferences obey nativeDialogs setting in .ini
If on linux, Preferences dialogs for setting folders and files will now obey nativeDialog boolean setting from ini.
Note: this commit doesn't change behavior for Windows and OS X, since Qt says getExistingDirectory() and getOpenFileName() do not obey the QFileDialog::DontUseNativeDialog option.
I have interesting behavior to report: The AppImage for latest commit in 2.0.3 and AppImage for latest commit in master both seem to only display the non-native File Dialogs (essentially ignoring value of nativeDialogs in MuseScoreDevelopment.ini) in my arch linux i686 machine. However, if I build 2.0.3 or master on my own i686 from git using Makefile's make, then the ./build.release/mscore does obey the nativeDialogs string.
Been looking at this for an hour trying to determine if I did something wrong. But the only conclusion I can come to is that AppImages simply don't use the native dialog.
Automatically closed -- issue fixed for 2 weeks with no activity.