aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/typesystem_templates.xml
diff options
context:
space:
mode:
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r--PySide/typesystem_templates.xml13
1 files changed, 13 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index 613a2b9ae..8d5390b53 100644
--- a/PySide/typesystem_templates.xml
+++ b/PySide/typesystem_templates.xml
@@ -346,6 +346,19 @@
<template name="ObjectDescription.fromIndex">
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%RETURN_TYPE::fromIndex(%1));
</template>
+ <template name="convertFromMultiMap">
+ %RETURN_NAME = PyDict_New();
+ foreach(%KEY_TYPE _key, %MAP_NAME.keys()) {
+ Shiboken::AutoDecRef _pyValueList(PyList_New(0));
+ foreach(%VALUE_TYPE _value, %MAP_NAME.values(_key)) {
+ Shiboken::AutoDecRef _pyValue(%CONVERTTOPYTHON[%VALUE_TYPE](_value));
+ PyList_Append(_pyValueList, _pyValue);
+ }
+
+ Shiboken::AutoDecRef _pyKey(%CONVERTTOPYTHON[%KEY_TYPE](_key));
+ PyDict_SetItem(%RETURN_NAME, _pyKey, _pyValueList);
+ }
+ </template>
</typesystem>