khtml - render_text: Q3PtrVector->QVector

David Faure faure at kde.org
Wed Jun 28 09:28:01 BST 2006


On Wednesday 28 June 2006 08:55, Peter Kümmel wrote:
> But I don't understand where I should use qSort,
> in the old code
I don't know the code either (maybe we should discuss this on kfm-devel to get
input from khtml developers...)

> int InlineTextBoxArray::compareItems( Item d1, Item d2 )
> was never used because always the Q3GVector version is used:
compareItems is called automatically by Q3PtrVector whenever
find() or sort() is called. Maybe I was wrong and the vector was never sorted;
then it's only for find()/contains() calls that the special comparison must be used.

But it's very strange that the binary search compares pointers and not Y values...
Might be a good idea to check the kde3 version of this code, the previous porting
might have broken it already.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).





More information about the kde-core-devel mailing list