Re: [Development] QFontMetrics and QScriptLine height calculation

2012-10-10 Thread Saether Jan-Arve
ther=digia@qt-project.org] > On Behalf Of Rafael Roquetto > Sent: 4. oktober 2012 22:23 > To: development@qt-project.org > Subject: [Development] QFontMetrics and QScriptLine height calculation > Hello, > > I am trying to fix tst_QAccessibility for QNX, and I h

Re: [Development] QFontMetrics and QScriptLine height calculation

2012-10-05 Thread Konstantin Ritt
Yes, backporting QAccessibleTextWidget::characterRect() implementation from 5.0 is seems to be safe. I don't know for sure if this won't break some other tests, though. You'll probably need to discuss this with Eskil Abrahamsen Blomfeldt and/or Jan Arve Sæther first (eskil and jan-arve at IRC, resp

Re: [Development] QFontMetrics and QScriptLine height calculation

2012-10-05 Thread Rafael Roquetto
Hi there, Thanks for the prompty reply. I am indeed talking about 4.8. Should I maybe then backport the 5.0 implementation of QAccessibleTextWidget, should this ever be possible or make sense? Or even better, fix the test to use QFontMetrics::lineSpacing()? Any other suggestions? As I said, this

Re: [Development] QFontMetrics and QScriptLine height calculation

2012-10-04 Thread Konstantin Ritt
First of all, which Qt version you're talking about? I assume it is 4.8 since QAccessibleTextWidget has been reworked alot in 5.0 and the problem you've described seems to gone there (see QAccessibleTextWidget::characterRect() impl). If it is 5.0, then you're probably subclassing the accessibility

[Development] QFontMetrics and QScriptLine height calculation

2012-10-04 Thread Rafael Roquetto
Hello, I am trying to fix tst_QAccessibility for QNX, and I have a problem on line 2750: QCOMPARE(iface->textInterface()->characterRect(0, QAccessible2::RelativeToParent).size(), QSize(fm.width("h"), fm.height())); This comparison is failing, because the caracter rect height is bigger than the h