diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2009-10-27 11:32:27 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2009-10-27 11:32:27 -0200 |
commit | 568683ea4b2ff7a8209333ddf5ee5e166f4aee25 (patch) | |
tree | 9456452e899c8c090e1c836fc9a2561aee8b1350 /PySide/QtCore/qlist_conversions.h | |
parent | 5b440adbbcc6ae8468c869dfd68b25950a12abe2 (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.h | 6 |
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++) { |