diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-08-06 14:26:03 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-08-06 21:31:35 +0200 |
| commit | e9b81b9ae69555330766ed92df59048eb5d665c9 (patch) | |
| tree | c31ce9bf9ee25aaec5ec1b71e63ca44aa837d11e /sources/pyside6/libpyside/qobjectconnect.cpp | |
| parent | 217a87e1307efd842d9ab16d24bf4a65fe51d410 (diff) | |
libpyside: Fix QObject.disconnectNotify()
Complements 225e18558f37e2b228be5da60f27ec8186a26bc7.
Just like QObject::connectNotify(), QObject.disconnectNotify() is
meant to be called with the signal method. Fix it to use the signal
instead of the slot.
Task-number: PYSIDE-2810
Change-Id: I2b1903a2c870768760e24b903ef16499d8d5d1a5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/qobjectconnect.cpp')
| -rw-r--r-- | sources/pyside6/libpyside/qobjectconnect.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/pyside6/libpyside/qobjectconnect.cpp b/sources/pyside6/libpyside/qobjectconnect.cpp index 3f7933c5c..04a191ea1 100644 --- a/sources/pyside6/libpyside/qobjectconnect.cpp +++ b/sources/pyside6/libpyside/qobjectconnect.cpp @@ -319,8 +319,8 @@ bool qobjectDisconnectCallback(QObject *source, const char *signal, PyObject *ca return false; Q_ASSERT(receiver.receiver); - const QMetaMethod slotMethod = receiver.receiver->metaObject()->method(slotIndex); - static_cast<FriendlyQObject *>(source)->disconnectNotify(slotMethod); + const QMetaMethod signalMethod = source->metaObject()->method(signalIndex); + static_cast<FriendlyQObject *>(source)->disconnectNotify(signalMethod); if (receiver.usingGlobalReceiver) { // might delete the receiver PySide::SignalManager &signalManager = PySide::SignalManager::instance(); |
