diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-10-19 17:20:10 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-10-19 17:20:10 -0200 |
commit | 4a638ed6347ebe82c9093b1bb229f062a703a6a8 (patch) | |
tree | dd8ef83dc3874ecc7d459343d75a08cdd5e37c30 /PySide | |
parent | ae942fd5dae9e59cae78a32ed598001bf70e523e (diff) | |
parent | c86a509af1a1a44d449aeb68858e17007e53e12a (diff) |
Merge remote branch 'mainline/1.0'
Conflicts:
CMakeLists.txt
Diffstat (limited to 'PySide')
-rw-r--r-- | PySide/QtCore/typesystem_core.xml | 62 | ||||
-rw-r--r-- | PySide/QtNetwork/typesystem_network.xml | 3 |
2 files changed, 24 insertions, 41 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index 6f9524be0..9b95f6d7b 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -1962,42 +1962,28 @@ timer->setSingleShot(true); timer->connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater())); - Shiboken::AutoDecRef result( - PyObject_CallMethod(pyTimer, - const_cast<char*>("connect"), - const_cast<char*>("OsO"), - pyTimer, - SIGNAL(timeout()), - pyargs[1]) - ); - Shiboken::BindingManager::instance().destroyWrapper((Shiboken::SbkBaseWrapper *)pyTimer); - timer->start(%1); - </inject-code> - </add-function> - <!-- Second argument is a PySide.QtCore.Signal. See bug #362. --> - <add-function signature="singleShot(int, PyObject*)" static="yes"> - <inject-code class="target" position="beginning"> - if (!PyObject_TypeCheck(%2, &PySide::SignalInstance_Type)) - goto Sbk%TYPEFunc_%FUNCTION_NAME_TypeError; - - // %FUNCTION_NAME() - disable generation of c++ function call - Shiboken::AutoDecRef emptyTuple(PyTuple_New(0)); - PyObject* pyTimer = Shiboken::SbkType<QTimer>()->tp_new(Shiboken::SbkType<QTimer>(), emptyTuple, 0); - Shiboken::SbkType<QTimer>()->tp_init(pyTimer, emptyTuple, 0); - QTimer* timer = Converter<QTimer*>::toCpp(pyTimer); - timer->setSingleShot(true); - timer->connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater())); - PySide::SignalInstanceData* signalInstance = reinterpret_cast<PySide::SignalInstanceData*>(%2); - Shiboken::AutoDecRef signalSignature(PyString_FromFormat("2%s", signalInstance->signature)); - Shiboken::AutoDecRef result( - PyObject_CallMethod(pyTimer, - const_cast<char*>("connect"), - const_cast<char*>("OsOO"), - pyTimer, - SIGNAL(timeout()), - signalInstance->source, - signalSignature.object()) - ); + if (PyObject_TypeCheck(%2, &PySideSignalInstanceType)) { + PySideSignalInstanceData* signalInstance = reinterpret_cast<PySideSignalInstanceData*>(%2); + Shiboken::AutoDecRef signalSignature(PyString_FromFormat("2%s", signalInstance->signature)); + Shiboken::AutoDecRef result( + PyObject_CallMethod(pyTimer, + const_cast<char*>("connect"), + const_cast<char*>("OsOO"), + pyTimer, + SIGNAL(timeout()), + signalInstance->source, + signalSignature.object()) + ); + } else { + Shiboken::AutoDecRef result( + PyObject_CallMethod(pyTimer, + const_cast<char*>("connect"), + const_cast<char*>("OsO"), + pyTimer, + SIGNAL(timeout()), + pyargs[1]) + ); + } Shiboken::BindingManager::instance().destroyWrapper((Shiboken::SbkBaseWrapper *)pyTimer); timer->start(%1); </inject-code> @@ -2698,9 +2684,9 @@ // since it refers to a name very tied to the generator implementation. // Check bug #362 for more information on this // http://bugs.openbossa.org/show_bug.cgi?id=362 - if (!PyObject_TypeCheck(%1, &PySide::SignalInstance_Type)) + if (!PyObject_TypeCheck(%1, &PySideSignalInstanceType)) goto Sbk%TYPEFunc_%FUNCTION_NAME_TypeError; - PySide::SignalInstanceData* signalInstance = reinterpret_cast<PySide::SignalInstanceData*>(%1); + PySideSignalInstanceData* signalInstance = reinterpret_cast<PySideSignalInstanceData*>(%1); QObject* sender = %CONVERTTOCPP[QObject*](signalInstance->source); %PYARG_0 = %CONVERTTOPYTHON[QSignalTransition*](%CPPSELF->%FUNCTION_NAME(sender, signalInstance->signature, %2)); </inject-code> diff --git a/PySide/QtNetwork/typesystem_network.xml b/PySide/QtNetwork/typesystem_network.xml index 0321a6514..e60878665 100644 --- a/PySide/QtNetwork/typesystem_network.xml +++ b/PySide/QtNetwork/typesystem_network.xml @@ -200,9 +200,6 @@ <object-type name="QNetworkCookieJar"/> <object-type name="QNetworkReply"> <enum-type name="NetworkError"/> - <modify-function signature="error()const"> - <rename to="errorCode" /> - </modify-function> </object-type> <value-type name="QHostAddress" hash-function="qHash"> |