From b02da0e034d32e4fd3598ad3ab68bb2504df07aa Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 1 Dec 2009 12:59:44 +0100 Subject: [PATCH 1/3] Removed stray apostrophe. Reviewed by: con --- share/qtcreator/translations/qtcreator_de.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index 84573a75699..0e6464dcf89 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -12334,7 +12334,7 @@ Installiere Anwendung auf '%2'... No Qt installed - Qt ist nicht installiert' + Qt ist nicht installiert From 405d9367e70d9f0d3acd60733d9d1d3f24c50092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Tue, 1 Dec 2009 15:21:09 +0100 Subject: [PATCH 2/3] Patch the paths in lrelease for Qt 4.6.1 Necessary because lrelease is built statically now. Reviewed-by: Oswald Buddenhagen --- src/tools/qpatch/files-to-patch-linux | 1 + src/tools/qpatch/files-to-patch-windows | 1 + 2 files changed, 2 insertions(+) diff --git a/src/tools/qpatch/files-to-patch-linux b/src/tools/qpatch/files-to-patch-linux index 2cf70c97291..33e5eeef7d8 100644 --- a/src/tools/qpatch/files-to-patch-linux +++ b/src/tools/qpatch/files-to-patch-linux @@ -1,4 +1,5 @@ bin/qmake +bin/lrelease lib/libQtCore.so %% lib/libQtCore.la diff --git a/src/tools/qpatch/files-to-patch-windows b/src/tools/qpatch/files-to-patch-windows index 62dafff80d8..a85411409b5 100644 --- a/src/tools/qpatch/files-to-patch-windows +++ b/src/tools/qpatch/files-to-patch-windows @@ -1,4 +1,5 @@ bin/qmake.exe +bin/lrelease.exe bin/QtCore4.dll bin/QtCored4.dll %% From 7fa8574d98bec3f0e9250bc9487f9b8f9ef1f792 Mon Sep 17 00:00:00 2001 From: mae Date: Tue, 1 Dec 2009 15:55:55 +0100 Subject: [PATCH 3/3] fix extra area drawing with multi-line blocks when line wrap is enabled The extra area only updated the current *line* when the cursor moved, not the entire paragraph. This left bold line numbers behind. The fix adds the required update region when the cursor position changes blocks. --- src/plugins/texteditor/basetexteditor.cpp | 19 ++++++++++++++++++- src/plugins/texteditor/basetexteditor_p.h | 1 + 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 8471ec947b9..db0fb807351 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -1479,7 +1479,8 @@ BaseTextEditorPrivate::BaseTextEditorPrivate() m_inBlockSelectionMode(false), m_lastEventWasBlockSelectionEvent(false), m_blockSelectionExtraX(0), - m_moveLineUndoHack(false) + m_moveLineUndoHack(false), + m_cursorBlockNumber(-1) { } @@ -2781,6 +2782,22 @@ void BaseTextEditor::updateCurrentLineHighlight() } setExtraSelections(CurrentLineSelection, extraSelections); + + + // the extra area shows information for the entire current block, not just the currentline. + // This is why we must force a bigger update region. + int cursorBlockNumber = textCursor().blockNumber(); + if (cursorBlockNumber != d->m_cursorBlockNumber) { + QPointF offset = contentOffset(); + QTextBlock block = document()->findBlockByNumber(d->m_cursorBlockNumber); + if (block.isValid()) + d->m_extraArea->update(blockBoundingGeometry(block).translated(offset).toAlignedRect()); + block = document()->findBlockByNumber(cursorBlockNumber); + if (block.isValid()) + d->m_extraArea->update(blockBoundingGeometry(block).translated(offset).toAlignedRect()); + d->m_cursorBlockNumber = cursorBlockNumber; + } + } void BaseTextEditor::slotCursorPositionChanged() diff --git a/src/plugins/texteditor/basetexteditor_p.h b/src/plugins/texteditor/basetexteditor_p.h index a1829e70f81..70fa38c759f 100644 --- a/src/plugins/texteditor/basetexteditor_p.h +++ b/src/plugins/texteditor/basetexteditor_p.h @@ -243,6 +243,7 @@ public: QTimer *m_highlightBlocksTimer; QPointer m_animator; + int m_cursorBlockNumber; };