D21661: add snoretoast backend for KNotifications on Windows

Hannah von Reth noreply at phabricator.kde.org
Tue Jun 11 08:22:01 BST 2019


vonreth added inline comments.

INLINE COMMENTS

> pino wrote in notifybysnore.cpp:63
> - splitRef here to not allocate strings that are not used anyway (since they are split again later on)
> - you are using a C++11 for loop on a Qt container, and this will detach it -- you need to store the container as variable:
> 
>   const auto parts = data.splitRef(...);
>   for (... : parts)
> 
> - QLatin1Char is better than QStringLiteral here (since you have a single character as separator)

splitRef

is interesting, everyone learns in a code review.
Wouldn't a `qAsConst` also prevent detaching?

REPOSITORY
  R289 KNotifications

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

To: brute4s99, broulik, sredman, vonreth, albertvaka
Cc: nicolasfella, pino, kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190611/bfde67d5/attachment.html>


More information about the Kde-frameworks-devel mailing list