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()
setErrorText(i18n("No text found in Clipboard"));
emitResult();
} else {
QString attachmentName = QInputDialog::getText(nullptr, i18n("Define Attachment Name"), i18n("Attachment Name:"));
if (attachmentName.isEmpty()) {
attachmentName = i18n("Clipboard Text");
bool ok = false;
QString attachmentName = QInputDialog::getText(nullptr, i18n("Define Attachment Name"), i18n("Attachment Name:"), {}, {}, &ok);
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