diff options
author | Andreas Hartmetz <andreas@ixgreen.de> | 2021-03-05 12:41:06 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-03-11 09:23:57 +0000 |
commit | e6fa55ca6462f07ed994b51900fe3c08e9be92f0 (patch) | |
tree | 518b06323e68643facb8a9b5193d8f5261cf8786 /src/quick/items/qquickitem.cpp | |
parent | e3428a1d4e1d05922ba632f0b47cb5f0e631e8e9 (diff) |
QQuickWindow: don't leak old screenChanged connections
Connections could accumulate. Because the newest one was invoked
last due to how signal-slot invocations are ordered, rendering
was correct, but the stale connections caused unnecessary updates
(and wasted a small amount of memory).
This comes from a misunderstanding I had at the time about how
QMetaObject::Connection works. Destroying or overwriting one does
not affect the actual connection.
While at it, also modernize the connect().
Change-Id: Idde81bdbff8947ed517bf2740d623a395c0acb74
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 9f8292d48913c5bc50377749c2b3e030cf16d703)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
0 files changed, 0 insertions, 0 deletions