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 height returned by QFontMetrics. And...?
Well, ultimately the height of the character rect comes from
QScriptLine::height(). Here is how it is calculated (simplified):
height = ascent + descent + 1 (leadingIncluded ? leading : QFixed())
While QFontMetrics does not use 'leading' to compute 'height' (simplified):
height = ascent + descent + 1
Which leads to a few questions:
1. Is this meant to be like that or is either class implementation incorrect?
2. If this is correct, then is the test erroneusly assuming that
QFontMetrics::height() == QScriptLine::height() for every use case? Or...
3. Should the 'leading' be '0' in the context of the test (what happens in Qt
built for Linux, but not for QNX)?
Well, I will continue to investigate it, but since I do not know much about
this corner of Qt, I thought it wouldn't hurt to ask :)
Thanks a lot in advance,
Rafael
--
** Qt Developer Conference: http://qtconference.kdab.com/ **
Rafael Roquetto | [email protected] | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
