Skip to content

Commit 6986dba

Browse files
committed
changed to only map unicode to QByteArray in non-strict mode
1 parent 2ec8501 commit 6986dba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PythonQtConversion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ void* PythonQtConv::ConvertPythonToQt(const PythonQtMethodInfo::ParameterInfo& i
565565
{
566566
QByteArray bytes = PyObjGetBytes(obj, strict, ok);
567567
#ifdef PY3K
568-
if (!ok) {
568+
if (!ok && !strict) {
569569
// since Qt uses QByteArray in many places for identifier strings,
570570
// we need to allow implicit conversion from unicode as well:
571571
bytes = PyObjGetString(obj, strict, ok).toUtf8();

0 commit comments

Comments
 (0)