Optimize painting after changing marks

Change-Id: Ib9e225bc063df82fcb351ff1e2572aa2d663b8a7
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Daniel Teske
2012-02-17 14:59:14 +01:00
parent 9483408fec
commit 4083c11002
4 changed files with 63 additions and 31 deletions

View File

@@ -2529,6 +2529,7 @@ void BaseTextEditorWidgetPrivate::setupDocumentSignals(BaseTextDocument *documen
q->setCursorWidth(2); // Applies to the document layout
QObject::connect(documentLayout, SIGNAL(updateBlock(QTextBlock)), q, SLOT(slotUpdateBlockNotify(QTextBlock)));
QObject::connect(documentLayout, SIGNAL(updateExtraArea()), q, SLOT(slotUpdateExtraArea()));
QObject::connect(q, SIGNAL(requestBlockUpdate(QTextBlock)), documentLayout, SIGNAL(updateBlock(QTextBlock)));
QObject::connect(doc, SIGNAL(modificationChanged(bool)), q, SIGNAL(changed()));
QObject::connect(doc, SIGNAL(contentsChange(int,int,int)), q,
@@ -4113,6 +4114,11 @@ void BaseTextEditorWidget::slotUpdateBlockNotify(const QTextBlock &block)
blockRecursion = false;
}
void BaseTextEditorWidget::slotUpdateExtraArea()
{
d->m_extraArea->update();
}
void BaseTextEditorWidget::timerEvent(QTimerEvent *e)
{
if (e->timerId() == d->autoScrollTimer.timerId()) {