More convenient text completion in KDE UIs
Jaros?aw Staniek
staniek at kde.org
Fri Oct 21 23:29:30 BST 2011
David Faure wrote:
> On Friday 07 October 2011 01:02:50 Jonathan Schmidt-Domine wrote:
>> Hi!
>>
>> Where is it implemented? Is there a clever search index?
>
> Hi, please keep some context when replying to an email. I can't remember
> what "it" is without re-reading the previous mail.
>
> [Context: substring completion]
>
> KCompletion::substringCompletion in kdelibs/kdeui/util/kcompletion.cpp
> might be what you're looking for.
>
> It calls KCompletion::extractStringsFromNode which iterates over all
> completion nodes, so I guess the answer is no, there is no clever search
> index. But since it's called on a (specific) keypress, this hasn't been a
> problem until now. It might become a problem if it happens during normal
> typing though...
Update: I forked QCompleter and added full-text search to get quick and
relatively clean result. Code is in
calligra/kexi/kexiutils/completer. I gave up with KCompletion for now, it's
nice class (and has prefix tree) but QCompleter is younger and has better
model/view concepts.
Who knows maybe Qt5's QCompleter will be improved [Greetings to people that
made qt-project.org possible!]
--
regards / pozdrawiam, Jaroslaw Staniek
http://www.linkedin.com/in/jstaniek
Kexi & Calligra (kexi-project.org, identi.ca/kexi, calligra-suite.org)
KDE Software Development Platform on MS Windows (windows.kde.org)
More information about the kde-core-devel
mailing list