D13591: Set complete vectors instead of creting them at runtime

Vlad Zagorodniy noreply at phabricator.kde.org
Mon Jun 18 16:53:01 UTC 2018


zzag added inline comments.

INLINE COMMENTS

> breezesizegrip.cpp:54
>          // mask
> -        QPolygon p;
> -        p << QPoint( 0, GripSize )
> -            << QPoint( GripSize, 0 )
> -            << QPoint( GripSize, GripSize )
> -            << QPoint( 0, GripSize );
> +        QPolygon p = QVector<QPoint>{
> +            QPoint( 0, GripSize ),

Can be const.

> breezesizegrip.cpp:150
>          // polygon
> -        QPolygon p;
> -        p << QPoint( 0, GripSize )
> -            << QPoint( GripSize, 0 )
> -            << QPoint( GripSize, GripSize )
> -            << QPoint( 0, GripSize );
> +        QPolygon p = QVector<QPoint> {
> +            QPoint( 0, GripSize ),

Can be const.

> breezeshadowhelper.cpp:461-464
> +        const quint32 topSize = margins.top();
> +        const quint32 bottomSize = margins.bottom();
> +        const quint32 leftSize( margins.left() );
> +        const quint32 rightSize( margins.right() );

Not the best thing. But shadows in Breeze have positive margins so that's okay.

REPOSITORY
  R31 Breeze

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

To: tcanabrava, #breeze
Cc: ngraham, zzag, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180618/9ddce214/attachment-0001.html>


More information about the Plasma-devel mailing list