-
- // Connect the shortcuts.
- connect(sShortcutPointer, SIGNAL(activated()), this, SLOT(showFileDialog()));
+ QShortcut *quitShortcutPointer = new QShortcut(QKeySequence::Quit, this);
+
+ // Connect the save buttons.
+ if (nativeDownloader)
+ {
+ // Show the file picker for the native download.
+ connect(saveButtonPointer, SIGNAL(clicked()), this, SLOT(showFilePicker()));
+ connect(sShortcutPointer, SIGNAL(activated()), this, SLOT(showFilePicker()));
+ }
+ else
+ {
+ // Use WebEngine's downloader.
+ connect(saveButtonPointer, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(sShortcutPointer, SIGNAL(activated()), this, SLOT(accept()));
+ }
+
+ // Connect the cancel button.
+ connect(dialogButtonBoxPointer, SIGNAL(rejected()), this, SLOT(reject()));