D3987: Use nullptr in all Frameworks (just diff in KIO shown here)
Kevin Funk
noreply at phabricator.kde.org
Mon Mar 20 19:13:40 UTC 2017
kfunk added a comment.
In https://phabricator.kde.org/D3987#96418, @kossebau wrote:
> In https://phabricator.kde.org/D3987#95858, @kfunk wrote:
>
> > Closing. This Diff refactored the code technically correct.
>
>
> Technically correct, as in: it builds.
> But semantically it is incorrect and a regression when it comes to flags, especially as high level languages are made for humans in the first line, not compilers ;)
Not true, the patch does /not/ change behavior. See explanation in https://phabricator.kde.org/D3987#78426.
>> If you want to replace `MyFlags flags = nullptr` by `... = {}` please do so in a follow-up patch/review.
>
> Seems you do not see yourself in the duty to do the fix-up. so I have to scratch this itch myself, tss :)
Yes, honestly I think either way is fine (`nullptr` or `{}`). Get... used to the new look I'd say ;)
> So please tell what tools you used to create this diff, so I could have a look how I can reuse them for fixing all the `MyFlags flags = nullptr` by `... = {}`? Any suggestions how that could be done best?
clang-tidy was being used. You need to special case its 'modernize-use-nullptr' check for `QFlags`, fwiw...
REPOSITORY
R280 Prison
REVISION DETAIL
https://phabricator.kde.org/D3987
To: kfunk, #frameworks, dfaure, kossebau
Cc: skelly, kossebau, dfaure, graesslin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170320/26978f5a/attachment.html>
More information about the Kde-frameworks-devel
mailing list