From 240cecb23087b11197ac87373f4000089ec9ae8e Mon Sep 17 00:00:00 2001 From: Nobody Really Date: Sat, 20 Dec 2014 15:58:25 +0100 Subject: [PATCH] Allow closing Download Manager and Browsing Library with CTRL+w --- src/lib/downloads/downloadmanager.cpp | 3 ++- src/lib/other/browsinglibrary.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/downloads/downloadmanager.cpp b/src/lib/downloads/downloadmanager.cpp index 8750debea..27700d7db 100644 --- a/src/lib/downloads/downloadmanager.cpp +++ b/src/lib/downloads/downloadmanager.cpp @@ -101,7 +101,8 @@ void DownloadManager::resizeEvent(QResizeEvent* e) void DownloadManager::keyPressEvent(QKeyEvent* e) { - if (e->key() == Qt::Key_Escape) { + if (e->key() == Qt::Key_Escape + || (e->key() == Qt::Key_W && e->modifiers() == Qt::ControlModifier)) { close(); } diff --git a/src/lib/other/browsinglibrary.cpp b/src/lib/other/browsinglibrary.cpp index b198568a8..0dd3e9cbd 100644 --- a/src/lib/other/browsinglibrary.cpp +++ b/src/lib/other/browsinglibrary.cpp @@ -163,7 +163,8 @@ void BrowsingLibrary::closeEvent(QCloseEvent* e) void BrowsingLibrary::keyPressEvent(QKeyEvent* e) { - if (e->key() == Qt::Key_Escape) { + if (e->key() == Qt::Key_Escape + || (e->key() == Qt::Key_W && e->modifiers() == Qt::ControlModifier)) { close(); }