[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kmail
From: Don Sanders <don () sanders ! org>
Date: 2003-02-08 10:37:25
[Download RAW message or body]
CVS commit by sanders:
Optimization.
M +10 -2 syntaxhighlighter.cpp 1.3
M +1 -0 syntaxhighlighter.h 1.3
--- kdepim/kmail/syntaxhighlighter.h #1.2:1.3
@@ -89,4 +89,5 @@ private:
static QObject *sDictionaryMonitor;
KSpell *mSpell;
+ bool mRehighlightRequested;
};
--- kdepim/kmail/syntaxhighlighter.cpp #1.2:1.3
@@ -174,4 +174,5 @@ DictSpellChecker::DictSpellChecker( QTex
: SpellChecker( textEdit )
{
+ mRehighlightRequested = false;
mSpell = 0;
if (!sDictionaryMonitor)
@@ -196,5 +197,8 @@ void DictSpellChecker::slotSpellReady( K
connect( spell, SIGNAL( misspelling (const QString &, const QStringList &, unsigned int) ),
this, SLOT( slotMisspelling (const QString &, const QStringList &, unsigned int)));
+ if (!mRehighlightRequested) {
+ mRehighlightRequested = true;
QTimer::singleShot(0, this, SLOT(slotRehighlight()));
+ }
}
@@ -225,5 +229,8 @@ void DictSpellChecker::slotMisspelling (
// this is slow but since kspell is async this will have to do for now
+ if (!mRehighlightRequested) {
+ mRehighlightRequested = true;
QTimer::singleShot(0, this, SLOT(slotRehighlight()));
+ }
}
@@ -238,4 +245,5 @@ void DictSpellChecker::dictionaryChanged
void DictSpellChecker::slotRehighlight()
{
+ mRehighlightRequested = false;
rehighlight();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic