[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: ispellchecking
From:       David Faure <faure () kde ! org>
Date:       2004-04-25 20:54:34
Message-ID: 200404252254.34521.faure () kde ! org
[Download RAW message or body]

On Sunday 25 April 2004 19:32, David Faure wrote:
> Strange, it seems paragraph-related (works for one, skips all words in the other \
> one). And it happens with aspell too, so it's a very different issue.
> Hmm, will try to find it :(

Found it. It seems that calling check() multiple times on the same k[oi]spell object
isn't supported ???

I'm saying this, because every call to check() connects the
readReady() signal to the check2() slot, so after the first time we get
multiple connects, with bad side effects.

This is a workaround for it, recreating the kospell object (and dialog)
between every paragraph.
But it's slow, and it makes the spell dialog flicker and move around.

Can this be fixed inside k[oi]spell instead, or does it really sound
impossible to call check() multiple times?

--- kwview.cc   17 Feb 2004 17:59:53 -0000      1.991.2.4
+++ kwview.cc   25 Apr 2004 20:48:43 -0000
@@ -5423,7 +5423,12 @@ void KWView::spellCheckerDone( const QSt
     {
         // Move on to next paragraph
         ++(*m_spell.textIterator);
-        spellCheckerReady();
+        // kspell doesn't support calling check() multiple times!!! It connects to \
the same signal/slot every time... +        delete m_spell.kospell;
+        m_spell.kospell=0;
+        startKSpell();
+        // The above used to be simply:
+        //spellCheckerReady();
     }
     else // aborted
     {


-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic