summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2023-09-13 10:34:30 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2023-09-14 11:58:17 +0200
commit5ac97a38e840da4dad0d5b0e1acbf2ecb46ecf74 (patch)
tree94c821f57457adf03697c85b23b772d8923ec96a /src/corelib/kernel/qobject.cpp
parente49d8444dc5a9c038dd4048db09634232843b833 (diff)
QObject: do not copy a ConnectionList object
The semantics of copying a ConnectionList are not defined; the type is copiable by accident. Use a reference to the list instead (like done in other places in the code). Change-Id: Ifbc5d3baca992f3eb13e3781378e79ed1feb4e1c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index b7474321d3..e5e1b7a7d1 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -5455,7 +5455,7 @@ QObjectPrivate::getPropertyAdaptorSlotObject(const QMetaProperty &property)
int signal_index = methodIndexToSignalIndex(&metaObject, property.notifySignalIndex());
if (signal_index >= conns->signalVectorCount())
return nullptr;
- const auto connectionList = conns->connectionsForSignal(signal_index);
+ const auto &connectionList = conns->connectionsForSignal(signal_index);
for (auto c = connectionList.first.loadRelaxed(); c;
c = c->nextConnectionList.loadRelaxed()) {
if (c->isSlotObject) {