D21760: Add KListOpenFilesJob

David Hallas noreply at phabricator.kde.org
Fri Sep 6 11:24:01 BST 2019


hallas added inline comments.

INLINE COMMENTS

> dfaure wrote in klistopenfilesjobtest_unix.cpp:34
> (minor) we never check that `new` succeeded, in Qt code.
> 
> The reasoning is that on desktop systems, with swap enabled, before the swap is exhausted, the user will have given up and rebooted the machine anyway. I know I do, many times a month :). So in practice, `new` can be considered to always succeed.

Makes sense, this was a leftover from when the job was returned by a function instead of new-ing it directly :) Another reason for not checking is that new doesn't return nullptr on failure, instead it throws std::bad_alloc, to get nullptr on failure you need to use the nothrow version of new :)

> dfaure wrote in klistopenfilesjob.h:39
> [is it useful to repeat that sentence? I admit I'm no expert on Doxygen's @brief command]

I don't think it is useful, so I have remove it

> dfaure wrote in klistopenfilesjob_win.cpp:26
> Won't be needed anymore once the getter returns by value :-)

Remove :)

REPOSITORY
  R244 KCoreAddons

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

To: hallas, davidedmundson, broulik, #frameworks, dfaure, bruns, #plasma
Cc: meven, cfeck, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190906/98784007/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list