summary refs log tree commit diff
path: root/src/dialogs
diff options
context:
space:
mode:
authorsalahmak <salah.mak@protonmail.com>2021-03-15 00:10:03 +0100
committersalahmak <salah.mak@protonmail.com>2021-03-15 12:42:17 +0100
commitaa0223c041404e35d59dc9e02e1b8e5554982d5e (patch)
treef1b5290c1ae7f10996e0c73b3004ccada5ca1ca1 /src/dialogs
parentReduce allocations when escaping emoji (diff)
downloadnheko-aa0223c041404e35d59dc9e02e1b8e5554982d5e.tar.xz
Pressing return on image upload dialog sends the message
Diffstat (limited to 'src/dialogs')
-rw-r--r--src/dialogs/PreviewUploadOverlay.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dialogs/PreviewUploadOverlay.cpp b/src/dialogs/PreviewUploadOverlay.cpp
index 55421a7d..b2bef136 100644
--- a/src/dialogs/PreviewUploadOverlay.cpp
+++ b/src/dialogs/PreviewUploadOverlay.cpp
@@ -48,6 +48,12 @@ PreviewUploadOverlay::PreviewUploadOverlay(QWidget *parent)
                 emit confirmUpload(data_, mediaType_, fileName_.text());
                 close();
         });
+
+        connect(&fileName_, &QLineEdit::returnPressed, this, [this]() {
+                emit confirmUpload(data_, mediaType_, fileName_.text());
+                close();
+        });
+
         connect(&cancel_, &QPushButton::clicked, this, [this]() {
                 emit aborted();
                 close();