From aa0223c041404e35d59dc9e02e1b8e5554982d5e Mon Sep 17 00:00:00 2001 From: salahmak Date: Mon, 15 Mar 2021 00:10:03 +0100 Subject: [PATCH] Pressing return on image upload dialog sends the message --- src/dialogs/PreviewUploadOverlay.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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();