diff --git a/kdecoration/breezebutton.cpp b/kdecoration/breezebutton.cpp --- a/kdecoration/breezebutton.cpp +++ b/kdecoration/breezebutton.cpp @@ -206,27 +206,27 @@ pen.setJoinStyle( Qt::RoundJoin ); painter->setPen( pen ); - painter->drawPolygon( QPolygonF() - << QPointF( 4, 9 ) - << QPointF( 9, 4 ) - << QPointF( 14, 9 ) - << QPointF( 9, 14 ) ); + painter->drawPolygon( QVector{ + QPointF( 4, 9 ), + QPointF( 9, 4 ), + QPointF( 14, 9 ), + QPointF( 9, 14 )} ); } else { - painter->drawPolyline( QPolygonF() - << QPointF( 4, 11 ) - << QPointF( 9, 6 ) - << QPointF( 14, 11 ) ); + painter->drawPolyline( QVector{ + QPointF( 4, 11 ), + QPointF( 9, 6 ), + QPointF( 14, 11 )}); } break; } case DecorationButtonType::Minimize: { - painter->drawPolyline( QPolygonF() - << QPointF( 4, 7 ) - << QPointF( 9, 12 ) - << QPointF( 14, 7 ) ); + painter->drawPolyline( QVector{ + QPointF( 4, 7 ), + QPointF( 9, 12 ), + QPointF( 14, 7 ) }); break; } @@ -254,11 +254,11 @@ } else { - painter->drawPolygon( QPolygonF() - << QPointF( 6.5, 8.5 ) - << QPointF( 12, 3 ) - << QPointF( 15, 6 ) - << QPointF( 9.5, 11.5 ) ); + painter->drawPolygon( QVector { + QPointF( 6.5, 8.5 ), + QPointF( 12, 3 ), + QPointF( 15, 6 ), + QPointF( 9.5, 11.5 )} ); painter->setPen( pen ); painter->drawLine( QPointF( 5.5, 7.5 ), QPointF( 10.5, 12.5 ) ); @@ -274,18 +274,18 @@ { painter->drawLine( 4, 5, 14, 5 ); - painter->drawPolyline( QPolygonF() - << QPointF( 4, 8 ) - << QPointF( 9, 13 ) - << QPointF( 14, 8 ) ); + painter->drawPolyline( QVector { + QPointF( 4, 8 ), + QPointF( 9, 13 ), + QPointF( 14, 8 )} ); } else { painter->drawLine( 4, 5, 14, 5 ); - painter->drawPolyline( QPolygonF() - << QPointF( 4, 13 ) - << QPointF( 9, 8 ) - << QPointF( 14, 13 ) ); + painter->drawPolyline( QVector { + QPointF( 4, 13 ), + QPointF( 9, 8 ), + QPointF( 14, 13 ) }); } break; @@ -295,30 +295,30 @@ case DecorationButtonType::KeepBelow: { - painter->drawPolyline( QPolygonF() - << QPointF( 4, 5 ) - << QPointF( 9, 10 ) - << QPointF( 14, 5 ) ); + painter->drawPolyline( QVector { + QPointF( 4, 5 ), + QPointF( 9, 10 ), + QPointF( 14, 5 ) }); - painter->drawPolyline( QPolygonF() - << QPointF( 4, 9 ) - << QPointF( 9, 14 ) - << QPointF( 14, 9 ) ); + painter->drawPolyline( QVector { + QPointF( 4, 9 ), + QPointF( 9, 14 ), + QPointF( 14, 9 ) }); break; } case DecorationButtonType::KeepAbove: { - painter->drawPolyline( QPolygonF() - << QPointF( 4, 9 ) - << QPointF( 9, 4 ) - << QPointF( 14, 9 ) ); - - painter->drawPolyline( QPolygonF() - << QPointF( 4, 13 ) - << QPointF( 9, 8 ) - << QPointF( 14, 13 ) ); + painter->drawPolyline( QVector { + QPointF( 4, 9 ), + QPointF( 9, 4 ), + QPointF( 14, 9 ) }); + + painter->drawPolyline( QVector { + QPointF( 4, 13 ), + QPointF( 9, 8 ), + QPointF( 14, 13 ) }); break; } diff --git a/kdecoration/breezesizegrip.cpp b/kdecoration/breezesizegrip.cpp --- a/kdecoration/breezesizegrip.cpp +++ b/kdecoration/breezesizegrip.cpp @@ -51,11 +51,11 @@ setFixedSize( QSize( GripSize, GripSize ) ); // mask - QPolygon p; - p << QPoint( 0, GripSize ) - << QPoint( GripSize, 0 ) - << QPoint( GripSize, GripSize ) - << QPoint( 0, GripSize ); + QPolygon p = QVector{ + QPoint( 0, GripSize ), + QPoint( GripSize, 0 ), + QPoint( GripSize, GripSize ), + QPoint( 0, GripSize )}; setMask( QRegion( p ) ); @@ -147,13 +147,12 @@ painter.setBrush( backgroundColor ); // polygon - QPolygon p; - p << QPoint( 0, GripSize ) - << QPoint( GripSize, 0 ) - << QPoint( GripSize, GripSize ) - << QPoint( 0, GripSize ); + QPolygon p = QVector { + QPoint( 0, GripSize ), + QPoint( GripSize, 0 ), + QPoint( GripSize, GripSize ), + QPoint( 0, GripSize )}; painter.drawPolygon( p ); - } //_____________________________________________ diff --git a/kstyle/breezehelper.cpp b/kstyle/breezehelper.cpp --- a/kstyle/breezehelper.cpp +++ b/kstyle/breezehelper.cpp @@ -1302,10 +1302,10 @@ QPolygonF arrow; switch( orientation ) { - case ArrowUp: arrow << QPointF( -4, 2 ) << QPointF( 0, -2 ) << QPointF( 4, 2 ); break; - case ArrowDown: arrow << QPointF( -4, -2 ) << QPointF( 0, 2 ) << QPointF( 4, -2 ); break; - case ArrowLeft: arrow << QPointF( 2, -4 ) << QPointF( -2, 0 ) << QPointF( 2, 4 ); break; - case ArrowRight: arrow << QPointF( -2, -4 ) << QPointF( 2, 0 ) << QPointF( -2, 4 ); break; + case ArrowUp: arrow = QVector{QPointF( -4, 2 ), QPointF( 0, -2 ), QPointF( 4, 2 )}; break; + case ArrowDown: arrow = QVector{QPointF( -4, -2 ), QPointF( 0, 2 ), QPointF( 4, -2 )}; break; + case ArrowLeft: arrow = QVector{QPointF( 2, -4 ), QPointF( -2, 0 ), QPointF( 2, 4 )}; break; + case ArrowRight: arrow = QVector{QPointF( -2, -4 ), QPointF( 2, 0 ), QPointF( -2, 4 )}; break; default: break; } @@ -1367,32 +1367,32 @@ case ButtonMaximize: { - painter->drawPolyline( QPolygonF() - << QPointF( 4, 11 ) - << QPointF( 9, 6 ) - << QPointF( 14, 11 ) ); + painter->drawPolyline( QVector{ + QPointF( 4, 11 ), + QPointF( 9, 6 ), + QPointF( 14, 11 )}); break; } case ButtonMinimize: { - painter->drawPolyline( QPolygonF() - << QPointF( 4, 7 ) - << QPointF( 9, 12 ) - << QPointF( 14, 7 ) ); + painter->drawPolyline(QVector{ + QPointF( 4, 7 ), + QPointF( 9, 12 ), + QPointF( 14, 7 )} ); break; } case ButtonRestore: { pen.setJoinStyle( Qt::RoundJoin ); painter->setPen( pen ); - painter->drawPolygon( QPolygonF() - << QPointF( 4.5, 9 ) - << QPointF( 9, 4.5 ) - << QPointF( 13.5, 9 ) - << QPointF( 9, 13.5 ) ); + painter->drawPolygon( QVector{ + QPointF( 4.5, 9 ), + QPointF( 9, 4.5 ), + QPointF( 13.5, 9 ), + QPointF( 9, 13.5 )}); break; } diff --git a/kstyle/breezeshadowhelper.cpp b/kstyle/breezeshadowhelper.cpp --- a/kstyle/breezeshadowhelper.cpp +++ b/kstyle/breezeshadowhelper.cpp @@ -455,18 +455,16 @@ // create data // add pixmap handles - QVector data; - foreach( const quint32& value, pixmaps ) - { data.append( value ); } + QVector data = pixmaps; const QMargins margins = shadowMargins( widget ); - const int topSize = margins.top(); - const int bottomSize = margins.bottom(); - const int leftSize( margins.left() ); - const int rightSize( margins.right() ); + const quint32 topSize = margins.top(); + const quint32 bottomSize = margins.bottom(); + const quint32 leftSize( margins.left() ); + const quint32 rightSize( margins.right() ); // assign to data and xcb property - data << topSize << rightSize << bottomSize << leftSize; + data << QVector{topSize, rightSize, bottomSize, leftSize}; xcb_change_property( Helper::connection(), XCB_PROP_MODE_REPLACE, widget->winId(), _atom, XCB_ATOM_CARDINAL, 32, data.size(), data.constData() ); xcb_flush( Helper::connection() );