D28325: [Inotify] Call QFile::decode only in a single place

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Fri Mar 27 14:35:59 GMT 2020


kossebau added inline comments.

INLINE COMMENTS

> kinotify.cpp:368
> +        uint32_t fileEvents = EventAll & ~(EventMoveFrom | EventQueueOverflow | EventIgnored);
> +        const QString fname = event->mask & fileEvents ? QFile::decodeName(path) : QString();
> +

For better code readabillity a bit-operator-based condition is often put into brackets:

  const QString fname = (event->mask & fileEvents) ? QFile::decodeName(path) : QString();

You might want to do this here as well.

REPOSITORY
  R293 Baloo

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

To: bruns, #baloo, ngraham
Cc: kossebau, apol, kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200327/7d1753df/attachment.html>


More information about the Kde-frameworks-devel mailing list