aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/qobjectconnect.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-02-28 16:24:29 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-02-28 19:49:04 +0100
commitad70c1a75af6cd7dbed4c43202c16e65481a2d7d (patch)
tree466151bc657bdf925d38af53aafed9e6267a8fd5 /sources/pyside6/libpyside/qobjectconnect.cpp
parent91d0ec1e864c5c657e351c32af1f8d78a26c543d (diff)
Fix connecting signals by QMetaMethod
The old implementation was calling the string-based overload, but did not add the '1'/'2' markers added by SIGNAL/SLOT. Call the QObject overload directly. Fixes: PYSIDE-1277 Pick-to: 6.8 Change-Id: I912f46c33959b622301b0a75e771057c8874f7e3 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/qobjectconnect.cpp')
-rw-r--r--sources/pyside6/libpyside/qobjectconnect.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/pyside6/libpyside/qobjectconnect.cpp b/sources/pyside6/libpyside/qobjectconnect.cpp
index 03644ed84..568e248dd 100644
--- a/sources/pyside6/libpyside/qobjectconnect.cpp
+++ b/sources/pyside6/libpyside/qobjectconnect.cpp
@@ -182,8 +182,10 @@ QMetaObject::Connection qobjectConnect(QObject *source, QMetaMethod signal,
QObject *receiver, QMetaMethod slot,
Qt::ConnectionType type)
{
- return qobjectConnect(source, signal.methodSignature().constData(),
- receiver, slot.methodSignature().constData(), type);
+ PySide::SignalManager::registerMetaMethod(receiver,
+ slot.methodSignature().constData(),
+ slot.methodType());
+ return QObject::connect(source, signal, receiver, slot, type);
}
QMetaObject::Connection qobjectConnectCallback(QObject *source, const char *signal,