diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-05-17 18:56:00 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-05-17 19:55:09 -0300 |
commit | 3f6c11762e55942f530737b6ed6528680fb675b5 (patch) | |
tree | 11ce19b5b66fcd0289c4f209ffce652f6a75a7c0 /libpyside | |
parent | 089cce5dbbcaeb32b14fc561ce0d723dbb80d6e1 (diff) |
Implemented support to connection type.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'libpyside')
-rw-r--r-- | libpyside/qsignal.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libpyside/qsignal.cpp b/libpyside/qsignal.cpp index 9274c483d..7cfa9f99d 100644 --- a/libpyside/qsignal.cpp +++ b/libpyside/qsignal.cpp @@ -348,9 +348,9 @@ void signal_instance_initialize(PyObject* instance, PyObject* name, SignalData* PyObject* signal_instance_connect(PyObject* self, PyObject* args, PyObject* kwds) { - PyObject *slot; - PyObject *type; - static const char *kwlist[] = {"type", 0}; + PyObject *slot = 0; + PyObject *type = 0; + static const char *kwlist[] = {"slot", "type", 0}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:"SIGNAL_CLASS_NAME, (char**) kwlist, &slot, &type)) @@ -384,6 +384,9 @@ PyObject* signal_instance_connect(PyObject* self, PyObject* args, PyObject* kwds match = true; } + if (type) + PyList_Append(pyArgs, type); + if (match) { Shiboken::AutoDecRef tupleArgs(PyList_AsTuple(pyArgs)); Shiboken::AutoDecRef pyMethod(PyObject_GetAttrString(source->source, "connect")); |