mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 03:26:05 -04:00
File dialog filter with an extension separator dot
Included the dot symbol in the "save file as" dialog filter (e.g. for PDF files the filter now is `(*.pdf)` instead of `(*pdf)`).
This commit is contained in:
parent
76124ddb5f
commit
c1d8cdc896
@ -39,7 +39,7 @@ QString askForSaveFilePath(const QString& suggestedName)
|
||||
const auto app = KiwixApp::instance();
|
||||
const QString suggestedPath = app->getPrevSaveDir() + "/" + suggestedName;
|
||||
const QString extension = suggestedName.section(".", -1);
|
||||
const QString filter = extension.isEmpty() ? "" : "(*" + extension + ")";
|
||||
const QString filter = extension.isEmpty() ? "" : "(*." + extension + ")";
|
||||
QString fileName = QFileDialog::getSaveFileName(
|
||||
app->getMainWindow(), gt("save-file-as-window-title"),
|
||||
suggestedPath, filter);
|
||||
|
Loading…
x
Reference in New Issue
Block a user