diff options
author | renato <renato.filho@openbossa.org> | 2009-12-30 11:45:09 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-04 18:59:39 -0200 |
commit | 359c973b425db0c27675add1a330734bbd7d8dbd (patch) | |
tree | f94fb1b9d80cc2596dc911be006ba0c2584769c9 /libpyside/dynamicqmetaobject.cpp | |
parent | 0d6a8f3978188f3e343c364806e0bb6e6ac1e643 (diff) |
Implement disconnect function for Python callback.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'libpyside/dynamicqmetaobject.cpp')
-rw-r--r-- | libpyside/dynamicqmetaobject.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libpyside/dynamicqmetaobject.cpp b/libpyside/dynamicqmetaobject.cpp index 40e74ce67..083f1d666 100644 --- a/libpyside/dynamicqmetaobject.cpp +++ b/libpyside/dynamicqmetaobject.cpp @@ -39,6 +39,7 @@ #include <QObject> #include <cstring> #include <QDebug> +#include <QMetaMethod> using namespace PySide; @@ -83,6 +84,20 @@ void DynamicQMetaObject::addSlot(const char* slot) updateMetaObject(); } +void DynamicQMetaObject::removeSlot(uint index) +{ + QMetaMethod m = method(index); + if (m_slots.removeAll(m.signature())) + updateMetaObject(); +} + +void DynamicQMetaObject::removeSignal(uint index) +{ + QMetaMethod m = method(index); + if (m_signals.removeAll(m.signature())) + updateMetaObject(); +} + void DynamicQMetaObject::updateMetaObject() { // these values are from moc source code, generator.cpp:66 |