summary refs log tree commit diff
path: root/src/dialogs/ImageOverlay.cpp
diff options
context:
space:
mode:
authorkirp <kirp@dismail.de>2021-08-11 02:26:26 +0300
committerkirp <kirp@dismail.de>2021-08-11 02:26:26 +0300
commitc7295d7fd1a4732592c8fc9d2ffd7fd6ebba40eb (patch)
tree248968404fbc1454c746fe98851af9c0e446e24b /src/dialogs/ImageOverlay.cpp
parentadd shortcut Escape button for closing images issues 672 (diff)
downloadnheko-c7295d7fd1a4732592c8fc9d2ffd7fd6ebba40eb.tar.xz
change slot close, to signal closing
Diffstat (limited to 'src/dialogs/ImageOverlay.cpp')
-rw-r--r--src/dialogs/ImageOverlay.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dialogs/ImageOverlay.cpp b/src/dialogs/ImageOverlay.cpp
index 0a3777f0..50cc5564 100644
--- a/src/dialogs/ImageOverlay.cpp
+++ b/src/dialogs/ImageOverlay.cpp
@@ -28,10 +28,11 @@ ImageOverlay::ImageOverlay(QPixmap image, QWidget *parent)
         setAttribute(Qt::WA_TranslucentBackground, true);
         setAttribute(Qt::WA_DeleteOnClose, true);
         setWindowState(Qt::WindowFullScreen);
+        close_shortcut_ = new QShortcut(QKeySequence(Qt::Key_Escape), this);
 
-        connect(this, SIGNAL(closing()), this, SLOT(close()));
+        connect(close_shortcut_, &QShortcut::activated, this,  &ImageOverlay::closing);
+        connect(this, &ImageOverlay::closing, this, &ImageOverlay::close);
 
-        close_shortcut_ = new QShortcut(QKeySequence(Qt::Key_Escape), this, SLOT(close()));
 
         raise();
 }