aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/material/impl/qquickmaterialtextcontainer.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2024-11-28 09:01:03 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2024-12-18 10:32:31 +0000
commit5e8349245c5544492fae577e9fe3cff87fd10f6d (patch)
treeea0f051fa389581cb7d87b319d2db624420304e7 /src/quickcontrols/material/impl/qquickmaterialtextcontainer.cpp
parentb70ebab9a54aa62cca98ed2953fe53978b7c4bad (diff)
QQuickMaterialTextContainer: don't explicitly create a brush
Rely on the implicit construction, and allow for an optimized QPainter::drawBrush(QColor) to not create a brush at all. Pick-to: 6.9 6.8 Change-Id: I9a18c72f85afb1383ce9f2056830f02330cf2897 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quickcontrols/material/impl/qquickmaterialtextcontainer.cpp')
-rw-r--r--src/quickcontrols/material/impl/qquickmaterialtextcontainer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quickcontrols/material/impl/qquickmaterialtextcontainer.cpp b/src/quickcontrols/material/impl/qquickmaterialtextcontainer.cpp
index ab07c9d9b2..b134e013a5 100644
--- a/src/quickcontrols/material/impl/qquickmaterialtextcontainer.cpp
+++ b/src/quickcontrols/material/impl/qquickmaterialtextcontainer.cpp
@@ -300,7 +300,7 @@ void QQuickMaterialTextContainer::paint(QPainter *painter)
pen.setWidthF(penWidth);
painter->setPen(pen);
if (m_filled)
- painter->setBrush(QBrush(m_fillColor));
+ painter->setBrush(m_fillColor);
// Fill or stroke the container's shape.
// If not filling, the default brush will be used, which is Qt::NoBrush.