Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9551e4a3 authored by Laurent Montel's avatar Laurent Montel 😁

Fix attachement mail

Bug found by kevin
parent c9dda27e
......@@ -30,6 +30,7 @@
#include <QEvent>
#include <QKeyEvent>
#include <QLabel>
#include <QTemporaryFile>
#include <AkonadiWidgets/CollectionComboBox>
......@@ -289,14 +290,20 @@ bool TodoEdit::eventFilter(QObject *object, QEvent *e)
void TodoEdit::slotOpenEditor()
{
QTemporaryFile tf;
tf.setAutoRemove(false);
tf.open();
tf.write(mMessage->encodedContent());
tf.close();
const KMime::Headers::Subject *const subject = mMessage->subject(false);
IncidenceEditorNG::IncidenceDialog *dlg = IncidenceEditorNG::IncidenceDialogFactory::createTodoEditor(
mNoteEdit->text(), QString(),
QStringList() << QString::fromLatin1(mMessage->encodedContent().toBase64()),
QStringList() << tf.fileName(),
QStringList(), // attendees
QStringList() << KMime::Message::mimeType(),
QStringList() << (subject ? subject->asUnicodeString() : QString()),
false, mCollection, false, this);
true, mCollection, true, this);
connect(dlg, &IncidenceEditorNG::IncidenceDialog::finished, this, &TodoEdit::slotCloseWidget);
dlg->open();
}
......
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