Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2017-06

WideString <-> UnicodeString

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Juha Manninen

Zeljko, shouldn't the QT binding code use UnicodeString instead of WideString. WideString is meant for Windows OLE programming where the OS takes care of memory management.

I realized this issue after my commit r55233.

Juha

P.S.
For some reason I see Zeljko's posts in this list but not in Lazarus-dev list.

Reply by email

zeljko
to Juha Manninen
Juha Manninen wrote 5 lines
Zeljko, shouldn't the QT binding code use UnicodeString instead of WideString. WideString is meant for Windows OLE programming where the OS takes care of memory management. I realized this issue after my commit r55233.

Feel free to change it (mean C part of bindings) and test.

z.

Reply by email

Juha Manninen
to zeljko
zeljko wrote
Feel free to change it (mean C part of bindings) and test.

C part of bindings?
I meant qtwidgets.pas and other bindings code.
The OLE specific WideString should not be needed anywhere AFAIK.

I am not sure how exactly it affects. It seems to work with WideString but FPC devels (like Marco) have recommended using UnicodeString instead (almost) everywhere.

Juha

Reply by email

Zeljko
to Juha Manninen
Juha Manninen wrote 6 lines
On Tue, Jun 6, 2017 at 9:43 AM, zeljko wrote: > Feel free to change it (mean C part of bindings) and test. C part of bindings? I meant qtwidgets.pas and other bindings code. The OLE specific WideString should not be needed anywhere AFAIK.

You cannot just change usage of widestring to unicodestring in pas files, you have to make complete change in C bindings too, since PWideString conversion is used there.

I am not sure how exactly it affects. It seems to work with WideString but FPC devels (like Marco) have recommended using UnicodeString instead (almost) everywhere.

It's true, but do not forget that we still support fpc-2.6.4.

zeljko

Reply by email