Use of KFileDialog/QFileDialog in KSudoku

Luigi Toscano luigi.toscano at tiscali.it
Sat Apr 22 21:05:45 UTC 2017


Ian Wadham ha scritto:
> Hi guys, and thanks for all the work you have been doing on KSudoku
> re KUrl/QUrl this weekend.
> 
> One thing bothers me - the usage of KFileDialog in the Save and Save as… actions.
> 
> a) Should we be using QFileDialog?  I definitely prefer it because, among other
>      things, it uses a native file dialog on (e.g.) Apple OS X.  IOW users get consistent
>      file dialogs in apps from Apple, KDE and all other FOSS that uses Qt.
> 
>     OTOH, you may lose the ability to save KSudoku games on the Internet (i.e.
>     support only local files in saving and loading KSudoku games).  I don't think
>     network saves would be any great loss.  After all, you can always attach a
>     saved KSudoku game to an email or put it in a drop box.  What do others think?

No reason to stay with KFileDialog: it's deprecated.

You don't lose KIO support if you use the Plasma integration plugin, which
shows the same file dialog as before (but based transparently on QFileDialog).



> 
> b) And if we stop using KFileDialog, what happens about that idiom of
>      KFileDialog that says:
>            KFileDialog::getSaveUrl(KUrl("kfiledialog:///ksudoku"))?
> 
>      IIRC/IIUC that idiom saved/found a previously used URL (if any) in the user's
>      config area.  I don't think QFileDialog has an equivalent.

This is something I didn't understand. Most of the code I've seen simply
removed that idiom.


Ciao
-- 
Luigi


More information about the kde-games-devel mailing list