diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-01-24 13:12:11 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-01-24 19:41:07 +0100 |
commit | 703f922b18110ed90018bd05526661937c3067f6 (patch) | |
tree | 68b2cca7b90c841339dd8152e173935c754fc435 | |
parent | 97bb0ecfe628b5bb78e798563212adf02129c6f6 (diff) |
Inline one qDrawPlainRoundedRect overload
Don't export both, the one is just calling the other, so make it inline.
Give parameters descriptive names that match the documentation.
Found in header review.
Pick-to: 6.7
Change-Id: I48b221a4fcc476483fee2842ec0a5cadd628b803
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
-rw-r--r-- | src/widgets/styles/qdrawutil.cpp | 7 | ||||
-rw-r--r-- | src/widgets/styles/qdrawutil.h | 9 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/widgets/styles/qdrawutil.cpp b/src/widgets/styles/qdrawutil.cpp index fd76291401..41b4886f2f 100644 --- a/src/widgets/styles/qdrawutil.cpp +++ b/src/widgets/styles/qdrawutil.cpp @@ -909,13 +909,6 @@ void qDrawPlainRect(QPainter *p, const QRect &r, const QColor &c, \sa qDrawShadeRect(), QStyle */ -void qDrawPlainRoundedRect(QPainter *p, const QRect &r, qreal rx, qreal ry, - const QColor &c, int lineWidth, const QBrush *fill) -{ - qDrawPlainRoundedRect(p, r.x(), r.y(), r.width(), r.height(), rx, ry, c, - lineWidth, fill); -} - /*! \class QTileRules \since 4.6 diff --git a/src/widgets/styles/qdrawutil.h b/src/widgets/styles/qdrawutil.h index a4732e014e..26d8d5075f 100644 --- a/src/widgets/styles/qdrawutil.h +++ b/src/widgets/styles/qdrawutil.h @@ -75,8 +75,13 @@ Q_WIDGETS_EXPORT void qDrawPlainRoundedRect(QPainter *p, int x, int y, int w, in qreal rx, qreal ry, const QColor &, int lineWidth = 1, const QBrush *fill = nullptr); -Q_WIDGETS_EXPORT void qDrawPlainRoundedRect(QPainter *p, const QRect& r, qreal rx, qreal ry, - const QColor &, int lineWidth = 1, const QBrush *fill = nullptr); +inline void qDrawPlainRoundedRect(QPainter *painter, const QRect& rect, qreal rx, qreal ry, + const QColor &lineColor, int lineWidth = 1, + const QBrush *fill = nullptr) +{ + qDrawPlainRoundedRect(painter, rect.x(), rect.y(), rect.width(), rect.height(), + rx, ry, lineColor, lineWidth, fill); +} struct QTileRules |