diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-15 14:46:30 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-17 18:17:13 -0300 |
commit | 781bdbe6321298e7bb567a717a8b0fca4cd0e7e2 (patch) | |
tree | 6eb7b4ab029f566d6aba94113cc16a579a9cdfef /PySide/QtCore/qvariant_conversions.h | |
parent | b53b9e49ba3b277913b970df758b75b36cc253a4 (diff) |
Fixed PySide custom conversions to work with newer versions of shiboken generator.
Diffstat (limited to 'PySide/QtCore/qvariant_conversions.h')
-rw-r--r-- | PySide/QtCore/qvariant_conversions.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/PySide/QtCore/qvariant_conversions.h b/PySide/QtCore/qvariant_conversions.h index 4834c08ce..fc3f96f5c 100644 --- a/PySide/QtCore/qvariant_conversions.h +++ b/PySide/QtCore/qvariant_conversions.h @@ -30,6 +30,7 @@ struct QMetaTypeId< PyObjectHolder > QT_END_NAMESPACE namespace Shiboken { + // all types are convertible to QVariant inline bool Converter<QVariant>::isConvertible(PyObject* pyobj) { @@ -84,4 +85,10 @@ inline QVariant Converter<QVariant>::toCpp(PyObject* pyobj) return QVariant(typeCode, reinterpret_cast<SbkBaseWrapper*>(pyobj)->cptr); } } + +inline PyObject* Converter<QVariant>::toPython(const QVariant& cppObj) +{ + return ValueTypeConverter<QVariant>::toPython(cppObj); +} + } |