KFind and QTextDocument

Thomas Zander zander at kde.org
Wed Jul 11 07:41:00 BST 2007


Recently I made KOffice use the KFindDialog for KoText finding (at least 
visible in KWord right now).  What I noticed is that the KFind API is not 
very useful for finding stuff in your document if that document happens 
to use the QTextDocument as a backend; which most of Qt does.

I wrote a KoFind (koffice/libs/kotext/KoFind.*) which does what I want, 
but I feel bad for not being able (time, mostly) to suggest a better 
solution that allows others that use QTextDocument based data-store to 
use a kdelibs class.

At minimum I think its useful to have a static method that maps the 
options from KFind::Options to QTextDocument::FindFlags. As well as a way 
to get a QRegExp out of the KFindDialog, if thats possible.
Which would help people doing a similar find.  But if someone here knows 
KFind better and is willing to look through the above mentioned KoFind 
files (~150 lines) that would be great.

As an aside; most of the KoText code is planned to move to the kODFlibrary 
module after KOffice 2.0 (and KDE 4.0) are released.

Thanks!
-- 
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070711/01a21a56/attachment.sig>


More information about the kde-core-devel mailing list