From 742a07ece1c99db964617015c06a05b4cb0dd995 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 25 Mar 2019 15:27:39 +0100 Subject: Use QScopedValueRollback more as a reentrancy guard It is documented for the use, but we were rarely using it. Change-Id: I812b9e6c8fbf204aba43ce2b79eca308ca75de88 Reviewed-by: Thiago Macieira --- src/gui/painting/qoutlinemapper.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gui/painting/qoutlinemapper.cpp') diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp index b2d02182c3..2074f98069 100644 --- a/src/gui/painting/qoutlinemapper.cpp +++ b/src/gui/painting/qoutlinemapper.cpp @@ -42,6 +42,7 @@ #include "qbezier_p.h" #include "qmath.h" #include "qpainterpath_p.h" +#include "qscopedvaluerollback.h" #include @@ -354,7 +355,7 @@ void QOutlineMapper::clipElements(const QPointF *elements, // instead of going through convenience functionallity, but since // this part of code hardly every used, it shouldn't matter. - m_in_clip_elements = true; + QScopedValueRollback in_clip_elements(m_in_clip_elements, true); QPainterPath path; @@ -397,8 +398,6 @@ void QOutlineMapper::clipElements(const QPointF *elements, convertPath(clippedPath); m_transform = oldTransform; } - - m_in_clip_elements = false; } QT_END_NAMESPACE -- cgit v1.2.3