From 2b2bc11d7d9753d5051f7ba364e786f3754b0f68 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 24 May 2015 15:11:37 +0800 Subject: [PATCH] Set default focus to cancel button in delete confirm dlg, closes #3085 --- src/gui/deletionconfirmationdlg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/deletionconfirmationdlg.h b/src/gui/deletionconfirmationdlg.h index 7756ad5ae..4b778d28b 100644 --- a/src/gui/deletionconfirmationdlg.h +++ b/src/gui/deletionconfirmationdlg.h @@ -32,6 +32,7 @@ #define DELETIONCONFIRMATIONDLG_H #include +#include #include "ui_confirmdeletiondlg.h" #include "preferences.h" #include "iconprovider.h" @@ -55,7 +56,7 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg { move(misc::screenCenter(this)); checkPermDelete->setChecked(Preferences::instance()->deleteTorrentFilesAsDefault()); connect(checkPermDelete, SIGNAL(clicked()), this, SLOT(updateRememberButtonState())); - buttonBox->setFocus(); + buttonBox->button(QDialogButtonBox::Cancel)->setFocus(); } bool shouldDeleteLocalFiles() const {