summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-03-30 10:52:24 +0200
committerLars Knoll <lars.knoll@qt.io>2020-03-31 15:28:23 +0200
commited2e091d0dded1033911a433bafc4660d8687b5d (patch)
tree23eda6f07c8718afe9471d10dab63a78776b8aa0 /src/widgets/styles
parente0b89899e3c505edbdece60d6a2d2368a7ef9a01 (diff)
Don't keep a reference into the hash while modifying it
Change-Id: I8c7e180a3bc640a63c183f460918914265a2a31b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index b07abe4f51..2b97b4d5ee 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -1818,7 +1818,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, int element, quint6
cacheIt = cache.constFind(state & stateMask);
if (cacheIt != cache.constEnd()) {
- const QRenderRule &newRule = cacheIt.value();
+ QRenderRule newRule = cacheIt.value();
cache[state] = newRule;
return newRule;
}