aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/typesystem_templates.xml
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/PySide2/typesystem_templates.xml')
-rw-r--r--sources/pyside2/PySide2/typesystem_templates.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/typesystem_templates.xml b/sources/pyside2/PySide2/typesystem_templates.xml
index 1715c0253..11a384263 100644
--- a/sources/pyside2/PySide2/typesystem_templates.xml
+++ b/sources/pyside2/PySide2/typesystem_templates.xml
@@ -286,6 +286,12 @@
<template name="return_QString">
%PYARG_0 = %CONVERTTOPYTHON[QString](%1);
</template>
+ <template name="return_QString_native">
+ if (%ISCONVERTIBLE[QString](%PYARG_0))
+ %1 = %CONVERTTOCPP[QString](%PYARG_0);
+ else
+ qWarning("%TYPE::%FUNCTION_NAME: Argument is not convertible to unicode.");
+ </template>
<template name="return_tuple_QValidator_QString_int">
%BEGIN_ALLOW_THREADS