Something like a Utility.cpp static routine to OR in the proper non-native flag or native flag when passed in options so it can be inlined right inside the call to the filedialog routine.
Then we could remove all ifdefs for platform from all filedialogs and replace the options value with a call to this utility routine.
In Utility.cpp we could check for a SIGIL_FORCE_NATIVE_FILE_DIALOG env variable and if set use the native for all platforms or put ifdefs for platforms all there.
But again, if the user sets that env var it is set at there own risk and no crashes caused by native filedialogs would be investigated anymore.
It is important to note Qt has a really lousy track record when trying to support native file dialogs as there have been repeated crashing bugs reported there with only temp patches and fixes added. So many developers that only target one platform must want native filedialogs and native dialogs in general, but for a cross platform app in a day and age where people are familiar and work with multiple os versions and web apps, it does seem strange. God forbid Windows starts injecting ads into their native dialogs!
Is something along those lines what you are thinking?
Last edited by KevinH; 07-29-2025 at 10:11 AM.
|