Past review https://git.reviewboard.kde.org/r/128452/ avoided double overwrite check by disabling the dialog one, it should have been the opposite, reusing QFileDialog.
Details
- Reviewers
ngraham cullmann - Group Reviewers
Frameworks Kate - Maniphest Tasks
- T8552: Polish Open/Save dialogs
- Commits
- R39:fb2ea92822d2: Use native dialog overwrite check
Diff Detail
- Repository
- R39 KTextEditor
- Branch
- arcpatch-D21401
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 12184 Build 12202: arc lint + arc unit
This will work fine for a KDE environment where we know that the file dialog correctly handles the overwrite use case. Do we know that the GTK file dialog does the same for when Kate is run on GNOME, XFCE, or MATE?
I believe it will be fine. https://developer.gnome.org/gtk3/stable/GtkFileChooserDialog.html GtkFileChooserDialog has a gtk_file_chooser_set_do_overwrite_confirmation (since 2005's gtk 2.8) so I would expect QFileDialog to use this feature.
So given GNOME, XFCE and MATE uses gtk >= 2.8, I don't foresee an issue on those DE.
Also bug https://bugreports.qt.io/browse/QTBUG-11539 mentions it works under GNOME at least.
On the QFileDialog side, I wish it would be better documented : https://doc.qt.io/archives/qt-4.8/qfiledialog.html#details mentioned GNOME and KDE but not anymore in qt5 stable documentation https://doc.qt.io/qt-5/qfiledialog.html#details
I think this is fine then, please remove the decl. of bool KTextEditor::DocumentPrivate::checkOverwrite(QUrl u, QWidget *parent), too and push this, thanks!
Good part is that the overwrite check dialog will now be a native one analog to other apps instead of a KMessageBox, providing consistency outside of KDE.