RichMemo method GetStyleRange fails on Qt5
Original Reporter info from Mantis: dbannon @davidbannon
-
Reporter name: David
Original Reporter info from Mantis: dbannon @davidbannon
- Reporter name: David
Description:
Under Qt5 the GetStyleRange method determines that every single char is a style 'block'.
In qt5richmemo.pas, #260 class function TQtWSCustomRichMemo.GetStyleRange() appears to be missing a line, one that populates the rng array. The code uses an undocumented function QTextBlock_textFormatsCount(), implemented as cpp code in libQt5Pas and right next to that function is QTextBlock_textFormatsRanges() that looks like its associated and does in fact populate an array with appropriate data.
So, still guessing, I added a line using that latter function and GetStyleRange now works as expected.
Patch enclosed.
Mantis conversion info:
- Mantis ID: 37894
- OS: U18.04 (Qt5.9)
- Platform: Linux
- Monitored by: » @davidbannon (David)