D29217: [KJots] Port to NoteMessageWrapper
Daniel Vrátil
noreply at phabricator.kde.org
Mon Apr 27 11:17:59 BST 2020
dvratil requested changes to this revision.
dvratil added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> kjotsmodel.cpp:185
> + note.setLastModifiedDate(QDateTime::currentDateTime());
> + item.setPayload( note.message() );
>
Remove the extra spaces inside parentheses.
> kjotsmodel.cpp:237
> + if (note.textFormat() == Qt::RichText
> + || doc.startsWith(QStringLiteral("<!DOCTYPE"))
> + || doc.startsWith(QStringLiteral("<html>")))
Leave `QLatin1String` here - it is preferred to use the `QLatin1String` overloads over `QString` ones when using string literals. Or even better, if there's QStringView overload present, use that one: `doc.startsWith(u"<!DOCTYPE")`
> localresourcecreator.cpp:154-156
> + auto eda = new Akonadi::EntityDisplayAttribute();
> eda->setIconName(QLatin1String("text-plain"));
> item.addAttribute(eda);
Can be shortened to
item.attribute<Akonadi::EntityDisplayAttribute>(Akonadi::Item::AddIfMissing)->setIconName(QStringLiteral("text-plain"));
REPOSITORY
R573 KJots
REVISION DETAIL
https://phabricator.kde.org/D29217
To: poboiko, dvratil
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200427/cd13f60d/attachment-0001.html>
More information about the kde-pim
mailing list