aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore/qlist_conversions.h
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-10-27 11:32:27 -0200
committerHugo Lima <hugo.lima@openbossa.org>2009-10-27 11:32:27 -0200
commit568683ea4b2ff7a8209333ddf5ee5e166f4aee25 (patch)
tree9456452e899c8c090e1c836fc9a2561aee8b1350 /PySide/QtCore/qlist_conversions.h
parent5b440adbbcc6ae8468c869dfd68b25950a12abe2 (diff)
- Added isConvertible methods to all custom converters.
- Added a custom converter for QString.
Diffstat (limited to 'PySide/QtCore/qlist_conversions.h')
-rw-r--r--PySide/QtCore/qlist_conversions.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/PySide/QtCore/qlist_conversions.h b/PySide/QtCore/qlist_conversions.h
index 0f72b3ccd..8662305dd 100644
--- a/PySide/QtCore/qlist_conversions.h
+++ b/PySide/QtCore/qlist_conversions.h
@@ -1,7 +1,11 @@
template <typename qlist>
struct Converter_qlist
{
- static PyObject* toPython(qlist holder)
+ static bool isConvertible(const PyObject* pyObj) {
+ return PySequence_Check(const_cast<PyObject*>(pyObj));
+ }
+
+ static PyObject* toPython(const qlist holder)
{
PyObject* result = PyList_New(holder.size());
for (int i = 0; i < holder.size(); i++) {