X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fdialogs%2FSaveDialog.cpp;h=5e969164e508e2b13f0c7fbfedb5ae169ddb2510;hb=8f1b160582ac3bd86b6e7aeaafcae059aff609c0;hp=39d2b1855bbb9d83a3dcd25909c7fa9717d9149d;hpb=06a69a2d38bf73c0c5219f94c345b19142bb1646;p=PrivacyBrowserPC.git diff --git a/src/dialogs/SaveDialog.cpp b/src/dialogs/SaveDialog.cpp index 39d2b18..5e96916 100644 --- a/src/dialogs/SaveDialog.cpp +++ b/src/dialogs/SaveDialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2022 Soren Stoutner . + * Copyright 2022-2023 Soren Stoutner . * * This file is part of Privacy Browser PC . * @@ -88,6 +88,7 @@ SaveDialog::SaveDialog(QUrl &url, QString &mimeTypeString, int totalBytes, QStri // Create the keyboard shortcuts. QShortcut *sShortcutPointer = new QShortcut(QKeySequence(i18nc("The save key shortcut.", "s")), this); QShortcut *cShortcutPointer = new QShortcut(QKeySequence(i18nc("The close key shortcut.", "c")), this); + QShortcut *quitShortcutPointer = new QShortcut(QKeySequence::Quit, this); // Connect the save buttons. if (nativeDownloader) @@ -98,7 +99,7 @@ SaveDialog::SaveDialog(QUrl &url, QString &mimeTypeString, int totalBytes, QStri } else { - // Use WebEngine's downloader + // Use WebEngine's downloader. connect(saveButtonPointer, SIGNAL(clicked()), this, SLOT(accept())); connect(sShortcutPointer, SIGNAL(activated()), this, SLOT(accept())); } @@ -106,12 +107,13 @@ SaveDialog::SaveDialog(QUrl &url, QString &mimeTypeString, int totalBytes, QStri // Connect the cancel button. connect(dialogButtonBoxPointer, SIGNAL(rejected()), this, SLOT(reject())); connect(cShortcutPointer, SIGNAL(activated()), this, SLOT(reject())); + connect(quitShortcutPointer, SIGNAL(activated()), this, SLOT(reject())); } void SaveDialog::showFilePicker() { // Show the file picker dialog. - emit useNativeDownloader(downloadUrl, suggestedFileName); + emit useNativeKdeDownloader(downloadUrl, suggestedFileName); // Close the dialog. reject();