mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
avoid QBrush construction in QPen::setColor()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8900484209
commit
1e2a6c2888
1 changed files with 3 additions and 4 deletions
|
@ -663,13 +663,12 @@ QColor QPen::color() const
|
|||
\sa setBrush(), color()
|
||||
*/
|
||||
|
||||
void QPen::setColor(const QColor &c)
|
||||
void QPen::setColor(const QColor &color)
|
||||
{
|
||||
QBrush brush(c);
|
||||
if (d->brush == brush)
|
||||
if (d->brush.color() == color)
|
||||
return;
|
||||
qAtomicDetach(d);
|
||||
d->brush = brush;
|
||||
d->brush.setColor(color);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue