Commit 975a49b3 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Set supported schemes to "file" for getsavefilename

This was done in getopenfilename but not getsavefilename.
Since it calls selectedFiles when the dialog is accepted, any non-file URL will result in an empty return value.

Differential Revision:
parent 45573c44
......@@ -775,13 +775,17 @@ int main(int argc, char *argv[])
setFileDialogFilter(dlg, filter);
const bool saveUrls = parser.isSet("getsaveurl");
if (!saveUrls) {
dlg.setWindowTitle(title.isEmpty() ? i18nc("@title:window", "Save As") : title);
if (!dlg.exec()) {
return 1; // canceled
if ( parser.isSet("getsaveurl") ) {
if (saveUrls) {
const QList<QUrl> result = dlg.selectedUrls();
if (!result.isEmpty()) {
cout << << endl;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment