[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim-addons/Applications/17.08] plugins/messageviewerplugins/createtodoplugin: Fix attachement ma
From: Montel Laurent <null () kde ! org>
Date: 2017-08-18 5:38:09
Message-ID: E1diZyz-0003Fk-Gh () code ! kde ! org
[Download RAW message or body]
Git commit 0cdf4f5153d58981eaa5c3d10e1ea2c91e34dc55 by Montel Laurent.
Committed on 18/08/2017 at 05:37.
Pushed by mlaurent into branch 'Applications/17.08'.
Fix attachement mail
Bug found by kevin
M +9 -2 plugins/messageviewerplugins/createtodoplugin/todoedit.cpp
https://commits.kde.org/kdepim-addons/0cdf4f5153d58981eaa5c3d10e1ea2c91e34dc55
diff --git a/plugins/messageviewerplugins/createtodoplugin/todoedit.cpp \
b/plugins/messageviewerplugins/createtodoplugin/todoedit.cpp index b57443d3..a1b7ff82 \
100644
--- a/plugins/messageviewerplugins/createtodoplugin/todoedit.cpp
+++ b/plugins/messageviewerplugins/createtodoplugin/todoedit.cpp
@@ -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();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic