summaryrefslogtreecommitdiff
path: root/source/kde/patch/ktouch/ktouch.performance.diff
diff options
context:
space:
mode:
Diffstat (limited to 'source/kde/patch/ktouch/ktouch.performance.diff')
-rw-r--r--source/kde/patch/ktouch/ktouch.performance.diff31
1 files changed, 0 insertions, 31 deletions
diff --git a/source/kde/patch/ktouch/ktouch.performance.diff b/source/kde/patch/ktouch/ktouch.performance.diff
deleted file mode 100644
index 526294fe..00000000
--- a/source/kde/patch/ktouch/ktouch.performance.diff
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/src/declarativeitems/lessonpainter.cpp b/src/declarativeitems/lessonpainter.cpp
-index dc8fc61..2c56c0c 100644
---- a/src/declarativeitems/lessonpainter.cpp
-+++ b/src/declarativeitems/lessonpainter.cpp
-@@ -236,8 +236,7 @@ void LessonPainter::updateTrainingStatus()
- const QString referenceLine = m_trainingLineCore->referenceLine();
- const QString actualLine = m_trainingLineCore->actualLine();
- const QString preeditString = m_trainingLineCore->preeditString();
-- const QTextBlock block = m_doc->findBlockByNumber(m_currentLine + 1);
-- const int blockPosition = block.position();
-+ const int blockPosition = m_doc->findBlockByNumber(m_currentLine + 1).position();
-
- for (int linePos = 0; linePos < referenceLine.length(); linePos++)
- {
-@@ -257,8 +256,14 @@ void LessonPainter::updateTrainingStatus()
-
- cursor.setPosition(charPosition, QTextCursor::MoveAnchor);
- cursor.setPosition(charPosition + 1, QTextCursor::KeepAnchor);
-- cursor.deleteChar();
-- cursor.insertText(QString(displayedChar), charFormat);
-+
-+ /* QUICKFIX: Using the charFormat to decide whether a char must be repainted or not.
-+ * Not nice but quite efficient ... */
-+ if (cursor.charFormat() != charFormat)
-+ {
-+ cursor.deleteChar();
-+ cursor.insertText(QString(displayedChar), charFormat);
-+ }
- }
-
- invalidateImageCache();