summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-06-15 16:12:26 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-06-15 17:35:17 -0300
commit2b1df1698cb6df77229fcfc9a8422bc9e28a1b62 (patch)
tree5751be1a6eaf13cdb6ca6d163673062b8c8e9c5a
parent07229012b7a3cd5f80fb944e7a4437246b65f018 (diff)
downloadpyside-2b1df1698cb6df77229fcfc9a8422bc9e28a1b62.tar.gz
pyside-2b1df1698cb6df77229fcfc9a8422bc9e28a1b62.tar.xz
pyside-2b1df1698cb6df77229fcfc9a8422bc9e28a1b62.zip
Updated PySide type systems to use the new type system variables: %ISCONVERTIBLE and %CHECKTYPE.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araujo <renato.filho@openbossa.org>
-rw-r--r--PySide/QtCore/typesystem_core.xml2
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml6
2 files changed, 4 insertions, 4 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index aff4ac1..2b997b3 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -2126,7 +2126,7 @@
Shiboken::AutoDecRef fileNo(PyObject_GetAttrString(%PYARG_1, "fileno"));
if (!fileNo.isNull()) {
Shiboken::AutoDecRef fileNoValue(PyObject_CallObject(fileNo, 0));
- if (Shiboken::Converter&lt;int>::checkType(fileNoValue))
+ if (%CHECKTYPE[int](fileNoValue))
%0 = new %TYPE(%CONVERTTOCPP[int](fileNoValue), %2, %3);
}
</inject-code>
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 602fcf0..815bf73 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -2715,14 +2715,14 @@
int size = PySequence_Fast_GET_SIZE(seq.object());
if (size > 1) {
- if (Shiboken::Converter&lt;QString>::isConvertible(PySequence_Fast_GET_ITEM(seq.object(), 1)))
+ if (%ISCONVERTIBLE[QString](PySequence_Fast_GET_ITEM(seq.object(), 1)))
%1 = %CONVERTTOCPP[QString](PySequence_Fast_GET_ITEM(seq.object(), 1));
else
qWarning("%TYPE::%FUNCTION_NAME: Second tuple element is not convertible to unicode.");
}
if (size > 2) {
- if (Shiboken::Converter&lt;int>::isConvertible(PySequence_Fast_GET_ITEM(seq.object(), 2)))
+ if (%ISCONVERTIBLE[int](PySequence_Fast_GET_ITEM(seq.object(), 2)))
%2 = %CONVERTTOCPP[int](PySequence_Fast_GET_ITEM(seq.object(), 2));
else
qWarning("%TYPE::%FUNCTION_NAME: Second tuple element is not convertible to int.");
@@ -2732,7 +2732,7 @@
}
// check retrun value
- if (Shiboken::Converter&lt;QValidator::State>::isConvertible(%PYARG_0)) {
+ if (%ISCONVERTIBLE[QValidator::State](%PYARG_0)) {
%out = %CONVERTTOCPP[QValidator::State](%PYARG_0);
} else {
PyErr_Format(PyExc_TypeError, "Invalid return value in function %s, expected %s, got %s.",