Commit b14c64d5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Don't attach when we click on cancel:

parent 339613c2
...@@ -56,10 +56,13 @@ void AttachmentClipBoardJob::doStart() ...@@ -56,10 +56,13 @@ void AttachmentClipBoardJob::doStart()
setErrorText(i18n("No text found in Clipboard")); setErrorText(i18n("No text found in Clipboard"));
emitResult(); emitResult();
} else { } else {
QString attachmentName = QInputDialog::getText(nullptr, i18n("Define Attachment Name"), i18n("Attachment Name:")); bool ok = false;
if (attachmentName.isEmpty()) { QString attachmentName = QInputDialog::getText(nullptr, i18n("Define Attachment Name"), i18n("Attachment Name:"), {}, {}, &ok);
attachmentName = i18n("Clipboard Text"); if (ok) {
if (attachmentName.isEmpty()) {
attachmentName = i18n("Clipboard Text");
}
addAttachment(clipText.toUtf8(), attachmentName);
} }
addAttachment(clipText.toUtf8(), attachmentName);
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment