summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <[email protected]>2024-01-24 13:12:11 +0100
committerVolker Hilsheimer <[email protected]>2024-01-24 19:41:07 +0100
commit703f922b18110ed90018bd05526661937c3067f6 (patch)
tree68b2cca7b90c841339dd8152e173935c754fc435
parent97bb0ecfe628b5bb78e798563212adf02129c6f6 (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 <[email protected]>
-rw-r--r--src/widgets/styles/qdrawutil.cpp7
-rw-r--r--src/widgets/styles/qdrawutil.h9
2 files changed, 7 insertions, 9 deletions
diff --git a/src/widgets/styles/qdrawutil.cpp b/src/widgets/styles/qdrawutil.cpp
index fd76291401e..41b4886f2f9 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 a4732e014ef..26d8d5075f3 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