summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-08-04 10:13:17 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2020-08-04 11:21:15 +0200
commita311d5c6f9988ae523a333e0ed25838693089acc (patch)
tree76b0f5ab9a116eb3bc15decff8f6363b54372087 /src/gui
parent4d37454e93856ba3785f52f4ae380b05893ee3fa (diff)
Reintroduce QGradientData for BC purposes
It was public and thus exported in 5.15.0 but was reverted in ba74bd6c3837d2cdabb7c73a9fa7a041323bfa45. The removal unfortunately causes some BiC test failures, so let's just keep it public and exported. Fixes: QTBUG-85829 Change-Id: I992af40b19dda93aa2319a62b7f09e0ae9c687c1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qbrush.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h
index ab777417a4..3a01248c57 100644
--- a/src/gui/painting/qbrush.h
+++ b/src/gui/painting/qbrush.h
@@ -405,16 +405,7 @@ public:
inline bool operator!=(const QGradient &other) const
{ return !operator==(other); }
-private:
- friend class QLinearGradient;
- friend class QRadialGradient;
- friend class QConicalGradient;
- friend class QBrush;
-
- Type m_type;
- Spread m_spread;
- QGradientStops m_stops;
- union {
+ union QGradientData {
struct {
qreal x1, y1, x2, y2;
} linear;
@@ -424,7 +415,18 @@ private:
struct {
qreal cx, cy, angle;
} conical;
- } m_data;
+ };
+
+private:
+ friend class QLinearGradient;
+ friend class QRadialGradient;
+ friend class QConicalGradient;
+ friend class QBrush;
+
+ Type m_type;
+ Spread m_spread;
+ QGradientStops m_stops;
+ QGradientData m_data;
void *dummy; // ### Qt 6: replace with actual content (CoordinateMode, InterpolationMode, ...)
};