D25213: Cancel task if conversion to XML fail

Daniel Vrátil noreply at phabricator.kde.org
Mon Nov 11 06:49:47 GMT 2019


dvratil requested changes to this revision.
dvratil added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> contactsresource.cpp:256
>  
> -        KContacts::ContactGroupTool::convertToXml(group, &file);
> +        QString *errorMessage = new QString();
> +        if (!KContacts::ContactGroupTool::convertToXml(group, &file, errorMessage)) {

Don't allocate QString on heap or use QScopedPointer/std::unqiue_ptr. Preferably just allocate it on stack and just pass a pointer to it to the function.

> contactsresource.cpp:307
>  
> -        KContacts::ContactGroupTool::convertToXml(group, &file);
> +        QString *errorMessage = new QString();
> +        if (!KContacts::ContactGroupTool::convertToXml(group, &file, errorMessage)) {

Same as above.

REPOSITORY
  R44 KDE PIM Runtime

REVISION DETAIL
  https://phabricator.kde.org/D25213

To: ognarb, #kde_pim, dvratil
Cc: dvratil, mlaurent, kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, knauss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20191111/6e51435b/attachment-0001.html>


More information about the kde-pim mailing list