OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6969e24
)
use static stops list in QGradient::stops()
author
Ivailo Monev
<xakepa10@laimg.moc>
Thu, 9 Jul 2020 12:12:05 +0000
(12:12 +0000)
committer
Ivailo Monev
<xakepa10@laimg.moc>
Thu, 9 Jul 2020 12:12:05 +0000
(12:12 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/gui/painting/qbrush.cpp
patch
|
blob
|
history
diff --git
a/src/gui/painting/qbrush.cpp
b/src/gui/painting/qbrush.cpp
index
8f487b2
..
78dc81b
100644
(file)
--- a/
src/gui/painting/qbrush.cpp
+++ b/
src/gui/painting/qbrush.cpp
@@
-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;
}