D22147: Better use of Qt APIs in Plasma::Theme

Tomaz Canabrava noreply at phabricator.kde.org
Mon Jul 1 15:13:23 BST 2019


tcanabrava added inline comments.

INLINE COMMENTS

> svg.cpp:342-349
> +            for (const QSize &hint : elementSizeHints) {
>  
>                  if (hint.width() >= s.width() * ratio && hint.height() >= s.height() * ratio &&
>                          (!bestFit.isValid() ||
>                           (bestFit.width() * bestFit.height()) > (hint.width() * hint.height()))) {
>                      bestFit = hint;
>                  }

looks a good example of code that could be written with an std::find_if

REPOSITORY
  R242 Plasma Framework (Library)

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

To: apol, #plasma, #frameworks, fvogt
Cc: tcanabrava, fvogt, broulik, kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190701/4e919e60/attachment.html>


More information about the Kde-frameworks-devel mailing list