[Konversation-devel] [Bug 132790] input box grows when canceling spellchecker dialog

Eike Hein sho at eikehein.com
Sat Aug 26 17:26:57 CEST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=132790         
sho eikehein com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From sho eikehein com  2006-08-26 17:26 -------
SVN commit 577398 by hein:

Add workaround against KSpell handing us trailing newlines.
Boils down to a forgotten FIXME in KSpell::chec. Sigh.
BUG:132790


 M  +13 -0     ircinput.cpp  
 M  +1 -0      ircinput.h  


--- trunk/extragear/network/konversation/src/ircinput.cpp #577397:577398
 @ -112,7 +112,20  @
 {
     setCheckSpellingEnabled(false);
 }
+void IRCInput::slotSpellCheckDone(const QString& s)
+{
+    // NOTE: kdelibs 3.5's KSpell stupidly adds newlines to its
+    // buffer at some point for god-knows-what-reason, and for-
+    // gets to remove them again before handing the result back.
+    // There's a FIXME to the effect in KSpell::check. This is
+    // a workaround.
 
+    if (s == text() || s == (text() + '\n'+'\n'))
+        return;
+
+    setText(s.simplifyWhiteSpace());
+}
+
 void IRCInput::updateAppearance()
 {
     m_multiRow = Preferences::useMultiRowInputBox();
--- trunk/extragear/network/konversation/src/ircinput.h #577397:577398
 @ -65,6 +65,7  @
         void getHistory(bool up);
         void insertCompletion(const QString& nick);
         void disableSpellChecking();
+        virtual void slotSpellCheckDone(const QString& s);
 
     protected:
         bool eventFilter(QObject *object,QEvent *event);


More information about the Konversation-devel mailing list