Bug 109389 - give a possibility to disable as-you-type spell checking
Summary: give a possibility to disable as-you-type spell checking
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-20 15:22 UTC by Thorsten Staerk
Modified: 2007-09-14 12:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Staerk 2005-07-20 15:22:39 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

I do not find a possibility to turn off spell-checking. Please give one under Settings | Spellchecker, e.g. a tag-box "do spell checking". See also Bug 83423 "disable spell checking per default".
Comment 1 Thorsten Staerk 2005-08-15 10:24:34 UTC
When writing a mail, there is a menu entry Options|Automatic Spellchecking. This option is supposed to be persistent. Now, this report is no longer a feature request, but a bug report, because there is a

SYMPTOM: when you start writing a mail and set Options|Automatic Spellchecking to OFF, close the mail and start a new mail, automatic spellchecking is turned ON. Verify this by writing "aoei ".

REASON: kmedit::autospellchecking cannot get effective because it is not initialized when called by KMComposeWin::KMComposeWin. You can verify this by a debug line at the beginning of kmedit::autospellchecking:
  if ( !mSpellChecker ) kdDebug(5006) << "no mspellchecker" << endl;

SOLUTION: initialize AutoSpellChecking by  a line mEditor->initializeAutoSpellChecking();
in the KMComposeWin's constructor before the first call to
mEditor->autoSpellChecking( whatever );
Comment 2 Thorsten Staerk 2005-08-19 10:21:44 UTC
SVN commit 450836 by tstaerk:

If spellcheck is toggled off, do not spellcheck from the beginning of a new
mail on.
BUGS:109389


 M  +1 -1      kmcomposewin.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmcomposewin.cpp #450835:450836
@@ -288,6 +288,7 @@
   mSplitter->moveToFirst( mEditor );
   mSplitter->setOpaqueResize( true );
 
+  mEditor->initializeAutoSpellChecking();
   mEditor->setTextFormat(Qt::PlainText);
   mEditor->setAcceptDrops( true );
 
@@ -4015,7 +4016,6 @@
       QString text = mEditor->text();
       mEditor->setText(text); // otherwise the text still looks formatted
       mEditor->setModified(true);
-      mEditor->initializeAutoSpellChecking();
       slotAutoSpellCheckingToggled(true);
     }
   }
Comment 3 Thorsten Staerk 2006-05-20 13:47:39 UTC
SVN commit 542801 by tstaerk:

Give a possibility to disable SpellChecking already in KDE
3.5.3. To do it, set KSpell_DoSpellChecking=0 in the [KSpell] section of
kdeglobals.
BUGS:83423
CCBUGS:109389


 M  +24 -20    ksyntaxhighlighter.cpp  


--- branches/KDE/3.5/kdelibs/kdeui/ksyntaxhighlighter.cpp #542800:542801
@@ -334,28 +334,32 @@
 void KDictSpellingHighlighter::slotSpellReady( KSpell *spell )
 {
     kdDebug(0) << "KDictSpellingHighlighter::slotSpellReady( " << spell << " )" << endl;
-    if ( d->globalConfig ) {
-        connect( d->sDictionaryMonitor, SIGNAL( destroyed()),
-                 this, SLOT( slotDictionaryChanged() ));
-    }
-    if ( spell != d->spell )
+    KConfigGroup cg( KGlobal::config(),"KSpell" );
+    if ( cg.readEntry("KSpell_DoSpellChecking") != "0" )
     {
-        delete d->spell;
-        d->spell = spell;
+      if ( d->globalConfig ) {
+          connect( d->sDictionaryMonitor, SIGNAL( destroyed()),
+                   this, SLOT( slotDictionaryChanged() ));
+      }
+      if ( spell != d->spell )
+      {
+          delete d->spell;
+          d->spell = spell;
+      }
+      d->spellReady = true;
+      const QStringList l = KSpellingHighlighter::personalWords();
+      for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+          d->spell->addPersonal( *it );
+      }
+      connect( spell, SIGNAL( misspelling( const QString &, const QStringList &, unsigned int )),
+	       this, SLOT( slotMisspelling( const QString &, const QStringList &, unsigned int )));
+      connect( spell, SIGNAL( corrected( const QString &, const QString &, unsigned int )),
+               this, SLOT( slotCorrected( const QString &, const QString &, unsigned int )));
+      d->checksRequested = 0;
+      d->checksDone = 0;
+      d->completeRehighlightRequired = true;
+      d->rehighlightRequest->start( 0, true );
     }
-    d->spellReady = true;
-    const QStringList l = KSpellingHighlighter::personalWords();
-    for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
-        d->spell->addPersonal( *it );
-    }
-    connect( spell, SIGNAL( misspelling( const QString &, const QStringList &, unsigned int )),
-	     this, SLOT( slotMisspelling( const QString &, const QStringList &, unsigned int )));
-    connect( spell, SIGNAL( corrected( const QString &, const QString &, unsigned int )),
-	     this, SLOT( slotCorrected( const QString &, const QString &, unsigned int )));
-    d->checksRequested = 0;
-    d->checksDone = 0;
-    d->completeRehighlightRequired = true;
-    d->rehighlightRequest->start( 0, true );
 }
 
 bool KDictSpellingHighlighter::isMisspelled( const QString &word )
Comment 4 Johannes Wolter 2006-10-31 12:23:41 UTC
I just merged to 3.5.5 (Debian unstable) and konqueror now seems to ignore KSpell_DoSpellChecking=0; i.e. multi-line inputs in web-forms are terribly slow again, because of autom. spell-checking. It worked for me in 3.5.4. Does anybody experience the same behavior?