kspell2 reorganization

Zack Rusin zack at kde.org
Mon Apr 10 20:00:08 BST 2006


On Monday 10 April 2006 19:52, David Faure wrote:
> Hmm, so to avoid actually discussing changes to your code, you just
> dropped it and created something else entirely? This seems a little
> messy to me :(

Nah, the reason I moved is because I don't have good enough machine to 
hold both KDE 3 and 4 development environments. And running KDE 4 apps 
requires using a different account right now, which is not a big 
problem when you're testing sessions but it's uncomfortable for small 
apps/tests. So I just went with only QtCore with qmake as the build 
system because it allowed me to do what I really wanted in my spare 
time (meaning to just write code that is testable without jumping 
through any hoops)

> So if you want to "upgrade" kspell2 to QSpell that'd be great...
> Just a few questions:
> - do you want to keep it non-kde? 

It simply comes down to "is there anything that it needs from KDE". If 
the answer is "yes" than of course forcing non-kde would be silly. From 
the other side linking to some KDE libraries just to make it officially 
KDE dependent is equally silly. So I guess the answer is, my preference 
is to have it naturally evolve. 

> kspell2 used KLineEdit and other  kde things in its config dialog. 

Not at the moment. Well, like I mentioned I wanted to have Sonnet 
completely gui free to make it just that, lingustic framework that can 
be used by everyone. Then I'd like to have a "binding" layer that 
actually does the GUI stuff. 
The config handling in KSpell2 is the most messy part because it 
propagates this custom config object through all classes even though 
none of them really uses it. 
So something like KSpell2::DefaultDictionary doesn't exist in Sonnet 
right now. I wanted to actually fix the concept of DefaultDictionary. 
But things like:
- DefaultDictionary,
- background checker
- configuration dialog 
are things I'd like to have in the "binding" part. The reason is that 
they all require desktop wide logic and because I didn't have time to 
somehow fix all the issues to at least allow me to run KDE4 apps on 
KDE3 I haven't tackled that.

> (does qspell provide a config dialog?). 

No, because in its current state there's nothing to configure. It's just 
a loader with a speller.  

> This also raises the question on how plugins are found by 
> the loader, I guess that part should be ported to at least
> KStandardDirs (if not ktrader)? 

They're all Qt plugins. In the same way that styles, or image formats 
are. Off the top of my mind I'm not sure if there's anything I'm 
missing from kstandarddirs/ktrader combo that would mandate a change to 
that.

> - does it come with aspell+hspell+ispell plugins?

It comes with aspell/enchant/hspell/hunspell. Ispell plugin that I had 
was lifted from enchant and never worked because they required a small 
change in the dictionary files which causes a lot of confusion (ispell 
plugin is there but it doesn't detect my ispell dictionary). The 
combination of aspell/enchant/hspell/hunspell covers every language 
that ispell supported in a lot better way (hunspell is myspell 
replacement for openoffice).

So, yeah, that's the run down as to how it all looks. Now if we're to 
use Sonnet, I'm not sure whether it makes seperating just the spelling 
lib from the rest of it. IMHO text segmentation, thesaurus and 
dictionary should at least go with it.

z

-- 
It is dangerous to be right when the government is wrong. - Voltaire 
(1694 - 1778)




More information about the kde-core-devel mailing list