Summary: | input box grows when canceling spellchecker dialog | ||
---|---|---|---|
Product: | [Applications] konversation | Reporter: | Niek Beernink <n.beernink> |
Component: | general | Assignee: | Konversation Developers <konversation-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Niek Beernink
2006-08-22 10:49:12 UTC
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); |