mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 11:22:58 +00:00
use static stops list in QGradient::stops()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
6969e2412c
commit
7d1130337b
1 changed files with 4 additions and 3 deletions
|
@ -1323,9 +1323,10 @@ void QGradient::setStops(const QGradientStops &stops)
|
|||
QGradientStops QGradient::stops() const
|
||||
{
|
||||
if (m_stops.isEmpty()) {
|
||||
QGradientStops tmp;
|
||||
tmp << QGradientStop(0, Qt::black) << QGradientStop(1, Qt::white);
|
||||
return tmp;
|
||||
static const QGradientStops stops = QGradientStops()
|
||||
<< QGradientStop(0, Qt::black)
|
||||
<< QGradientStop(1, Qt::white);
|
||||
return stops;
|
||||
}
|
||||
return m_stops;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue