Changeset View
Changeset View
Standalone View
Standalone View
plugins/messageviewerplugins/createtodoplugin/todoedit.cpp
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Line(s) | 247 | if (!mNoteEdit->text().trimmed().isEmpty()) { | |||
---|---|---|---|---|---|
256 | mMsgWidget->animatedShow(); | 256 | mMsgWidget->animatedShow(); | ||
257 | } | 257 | } | ||
258 | } | 258 | } | ||
259 | 259 | | |||
260 | KCalCore::Todo::Ptr TodoEdit::createTodoItem() | 260 | KCalCore::Todo::Ptr TodoEdit::createTodoItem() | ||
261 | { | 261 | { | ||
262 | KCalCore::Todo::Ptr todo(new KCalCore::Todo); | 262 | KCalCore::Todo::Ptr todo(new KCalCore::Todo); | ||
263 | todo->setSummary(mNoteEdit->text()); | 263 | todo->setSummary(mNoteEdit->text()); | ||
264 | KCalCore::Attachment::Ptr attachment(new KCalCore::Attachment(mMessage->encodedContent().toBase64(), KMime::Message::mimeType())); | 264 | KCalCore::Attachment attachment(mMessage->encodedContent().toBase64(), KMime::Message::mimeType()); | ||
265 | const KMime::Headers::Subject *const subject = mMessage->subject(false); | 265 | const KMime::Headers::Subject *const subject = mMessage->subject(false); | ||
266 | if (subject) { | 266 | if (subject) { | ||
267 | attachment->setLabel(subject->asUnicodeString()); | 267 | attachment.setLabel(subject->asUnicodeString()); | ||
268 | } | 268 | } | ||
269 | 269 | | |||
270 | todo->addAttachment(attachment); | 270 | todo->addAttachment(attachment); | ||
271 | return todo; | 271 | return todo; | ||
272 | } | 272 | } | ||
273 | 273 | | |||
274 | bool TodoEdit::eventFilter(QObject *object, QEvent *e) | 274 | bool TodoEdit::eventFilter(QObject *object, QEvent *e) | ||
275 | { | 275 | { | ||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |