summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurélien Brooke <aurelien@bahiasoft.fr>2024-01-12 13:29:23 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-01-13 17:17:33 +0000
commit183eac3d34ee6688dbe9dc3e18622020d798eb4e (patch)
treebf52eb17bb453930a477ebf906e92ebbc296c72e
parentb43aab46f9a319821c0c93a7f718a61a9304c5ff (diff)
QEntity: fix a std::move-from-const in destructor
The quadratic fix proposed by commit cbffb898fc3625a04a9569e232c0f6231d4d3505 was actually not doing anything because std::move() was applied to a const variable. Change-Id: Ieff6341493fd026ad45e0c3e26f0cdb4797b4a6a Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 4721805c04ef2acdb87f8b339f125b9a2ee7b392) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2cf30109688fdfc420b85324ad417462a427fa9b)
-rw-r--r--src/core/nodes/qentity.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/nodes/qentity.cpp b/src/core/nodes/qentity.cpp
index f26da3bea..a77ec09ca 100644
--- a/src/core/nodes/qentity.cpp
+++ b/src/core/nodes/qentity.cpp
@@ -139,7 +139,7 @@ QEntity::QEntity(QEntityPrivate &dd, QNode *parent)
QEntity::~QEntity()
{
// remove all component aggregations
- Q_D(const QEntity);
+ Q_D(QEntity);
// to avoid hammering m_components by repeated removeComponent()
// calls below, move all contents out, so the removeOne() calls in
// removeComponent() don't actually remove something: