D29045: [KJots] Revive printing support
Daniel Vrátil
noreply at phabricator.kde.org
Tue Apr 21 15:26:36 BST 2020
dvratil requested changes to this revision.
dvratil added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> kjotswidget.cpp:1077
> +{
> + auto printer = new QPrinter(mode);
> + printer->setDocName(QStringLiteral("KJots_Print"));
You want to make this a `unique_ptr` already so the `QPrinter` gets destroyed in case an exception is thrown in one of the lines above (which it won't, Qt doesn't throw, but you know - good practices :)), or an early return is implemented in this method later on.
It's OK to bump required C++ to 14 or even 17 so you can use `make_unique`
`auto printer = std::make_unique<QPrinter>(mode);`
REPOSITORY
R573 KJots
REVISION DETAIL
https://phabricator.kde.org/D29045
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/20200421/bef12095/attachment.html>
More information about the kde-pim
mailing list