The original code is here: https://github.com/graemeg/lazarus/blob/upstream/lcl/interfaces/qt5/cbindings/src/pascalbind.h
The problematic code:
Code: Select all
inline void copyQStringToPWideString(const QString &qs, PWideString ps)
{
if (qs!=0 && ps) copyUnicodeToPWideString(qs.unicode(), ps, qs.length());
}
inline void copyPWideStringToQString(PWideString ps, QString &qs)
{
qs.setUtf16((ushort *)unicodeOfPWideString(ps),
lengthOfPWideString(ps));
}
Code: Select all
inline void copyQStringToPWideString(const QString &qs, PWideString ps)
{
if (qs!=0 && ps) copyUnicodeToPWideString(qs.constData(), ps, qs.length());
}
inline void copyPWideStringToQString(PWideString ps, QString &qs)
{
qs.fromUtf16((ushort *)unicodeOfPWideString(ps),
lengthOfPWideString(ps));
}