summaryrefslogtreecommitdiffstats
path: root/PySide/QtCore/glue/qobject_connect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'PySide/QtCore/glue/qobject_connect.cpp')
-rw-r--r--PySide/QtCore/glue/qobject_connect.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/PySide/QtCore/glue/qobject_connect.cpp b/PySide/QtCore/glue/qobject_connect.cpp
index cf78779..b98a411 100644
--- a/PySide/QtCore/glue/qobject_connect.cpp
+++ b/PySide/QtCore/glue/qobject_connect.cpp
@@ -32,7 +32,8 @@ static bool qobjectConnect(QObject* source, const char* signal, QObject* receive
return false;
signal++;
- PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal);
+ if (!PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal))
+ return false;
bool isSignal = PySide::isSignal(slot);
slot++;
@@ -46,7 +47,9 @@ static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject
return false;
signal++;
- PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal);
+ if (!PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal))
+ return false;
+
int signalIndex = source->metaObject()->indexOfMethod(signal);
PySide::SignalManager& signalManager = PySide::SignalManager::instance();
@@ -70,7 +73,8 @@ static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject
if (usingGlobalReceiver) {
signalManager.addGlobalSlot(slot, callback);
} else {
- PySide::SignalManager::registerMetaMethod(receiver, slot, QMetaMethod::Slot);
+ if (!PySide::SignalManager::registerMetaMethod(receiver, slot, QMetaMethod::Slot))
+ return false;
}
slotIndex = metaObject->indexOfSlot(slot);
}