aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore/qpair_conversions.h
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-09-15 17:00:19 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-09-15 17:00:44 -0300
commit50678706032259f37942eea03429e86af685eedb (patch)
tree396f7f0149f2bf50b99bbb16a6000c549ae932ec /PySide/QtCore/qpair_conversions.h
parentd9b029098c0aee475310841f2d2746c3739b99f7 (diff)
added conversion rules for QVector and QMap containers
Diffstat (limited to 'PySide/QtCore/qpair_conversions.h')
-rw-r--r--PySide/QtCore/qpair_conversions.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/PySide/QtCore/qpair_conversions.h b/PySide/QtCore/qpair_conversions.h
index 4d9f21351..de9904630 100644
--- a/PySide/QtCore/qpair_conversions.h
+++ b/PySide/QtCore/qpair_conversions.h
@@ -1,22 +1,22 @@
-template <typename StdPair>
+template <typename qpair>
struct Converter_qpair
{
- static PyObject* toPython(StdPair holder)
+ static PyObject* toPython(qpair holder)
{
- typename StdPair::first_type first(holder.first);
- typename StdPair::second_type second(holder.second);
+ typename qpair::first_type first(holder.first);
+ typename qpair::second_type second(holder.second);
PyObject* tuple = PyTuple_New(2);
- PyTuple_SET_ITEM(tuple, 0, Converter<typename StdPair::first_type>::toPython(first));
- PyTuple_SET_ITEM(tuple, 1, Converter<typename StdPair::second_type>::toPython(second));
+ PyTuple_SET_ITEM(tuple, 0, Converter<typename qpair::first_type>::toPython(first));
+ PyTuple_SET_ITEM(tuple, 1, Converter<typename qpair::second_type>::toPython(second));
return tuple;
}
- static StdPair toCpp(PyObject* pyobj)
+ static qpair toCpp(PyObject* pyobj)
{
- StdPair result;
+ qpair result;
PyObject* pyFirst = PySequence_GetItem(pyobj, 0);
PyObject* pySecond = PySequence_GetItem(pyobj, 1);
- result.first = Converter<typename StdPair::first_type>::toCpp(pyFirst);
- result.second = Converter<typename StdPair::second_type>::toCpp(pySecond);
+ result.first = Converter<typename qpair::first_type>::toCpp(pyFirst);
+ result.second = Converter<typename qpair::second_type>::toCpp(pySecond);
return result;
}
};