summaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-19 17:20:10 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-10-19 17:20:10 -0200
commit4a638ed6347ebe82c9093b1bb229f062a703a6a8 (patch)
treedd8ef83dc3874ecc7d459343d75a08cdd5e37c30 /PySide
parentae942fd5dae9e59cae78a32ed598001bf70e523e (diff)
parentc86a509af1a1a44d449aeb68858e17007e53e12a (diff)
downloadpyside-4a638ed6347ebe82c9093b1bb229f062a703a6a8.tar.gz
pyside-4a638ed6347ebe82c9093b1bb229f062a703a6a8.tar.xz
pyside-4a638ed6347ebe82c9093b1bb229f062a703a6a8.zip
Merge remote branch 'mainline/1.0'
Conflicts: CMakeLists.txt
Diffstat (limited to 'PySide')
-rw-r--r--PySide/QtCore/typesystem_core.xml62
-rw-r--r--PySide/QtNetwork/typesystem_network.xml3
2 files changed, 24 insertions, 41 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 6f9524b..9b95f6d 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&lt;char*>("connect"),
- const_cast&lt;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, &amp;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&lt;QTimer>()->tp_new(Shiboken::SbkType&lt;QTimer>(), emptyTuple, 0);
- Shiboken::SbkType&lt;QTimer>()->tp_init(pyTimer, emptyTuple, 0);
- QTimer* timer = Converter&lt;QTimer*>::toCpp(pyTimer);
- timer->setSingleShot(true);
- timer->connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater()));
- PySide::SignalInstanceData* signalInstance = reinterpret_cast&lt;PySide::SignalInstanceData*&gt;(%2);
- Shiboken::AutoDecRef signalSignature(PyString_FromFormat("2%s", signalInstance->signature));
- Shiboken::AutoDecRef result(
- PyObject_CallMethod(pyTimer,
- const_cast&lt;char*>("connect"),
- const_cast&lt;char*>("OsOO"),
- pyTimer,
- SIGNAL(timeout()),
- signalInstance->source,
- signalSignature.object())
- );
+ if (PyObject_TypeCheck(%2, &amp;PySideSignalInstanceType)) {
+ PySideSignalInstanceData* signalInstance = reinterpret_cast&lt;PySideSignalInstanceData*&gt;(%2);
+ Shiboken::AutoDecRef signalSignature(PyString_FromFormat("2%s", signalInstance->signature));
+ Shiboken::AutoDecRef result(
+ PyObject_CallMethod(pyTimer,
+ const_cast&lt;char*>("connect"),
+ const_cast&lt;char*>("OsOO"),
+ pyTimer,
+ SIGNAL(timeout()),
+ signalInstance->source,
+ signalSignature.object())
+ );
+ } else {
+ Shiboken::AutoDecRef result(
+ PyObject_CallMethod(pyTimer,
+ const_cast&lt;char*>("connect"),
+ const_cast&lt;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, &amp;PySide::SignalInstance_Type))
+ if (!PyObject_TypeCheck(%1, &amp;PySideSignalInstanceType))
goto Sbk%TYPEFunc_%FUNCTION_NAME_TypeError;
- PySide::SignalInstanceData* signalInstance = reinterpret_cast&lt;PySide::SignalInstanceData*&gt;(%1);
+ PySideSignalInstanceData* signalInstance = reinterpret_cast&lt;PySideSignalInstanceData*&gt;(%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 0321a65..e608786 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">