Fix bug#420 - "Memory leak in setText"

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
This commit is contained in:
Hugo Parente Lima 2010-10-21 18:10:54 -02:00
commit d094064ffe

View file

@ -39,7 +39,7 @@ struct Converter<QString>
return QString::fromUtf16(unicode, PyUnicode_GET_SIZE(pyObj)); return QString::fromUtf16(unicode, PyUnicode_GET_SIZE(pyObj));
#endif #endif
} else if (PyString_Check(pyObj)) { } else if (PyString_Check(pyObj)) {
return QString(Converter< char * >::toCpp(pyObj)); return QString(Converter<const char * >::toCpp(pyObj));
} else if (pyObj == Py_None) { } else if (pyObj == Py_None) {
return QString(); return QString();
} else if (Converter<QByteArray>::checkType(pyObj)) { } else if (Converter<QByteArray>::checkType(pyObj)) {