From 77abd027876b79eddeabed36317ff57e8bbdcb1d Mon Sep 17 00:00:00 2001 From: jkobus Date: Tue, 9 Apr 2013 10:26:31 +0200 Subject: Get rid of QChar::LineSeparator It was causing troubles while scrolling. Replace it with \n and hack selection. Simplify the code. Now every line is a separate block. Prepare for expanding skipped lines. Change-Id: I8d305681c575abdaaf9cdbf26de864dd3a906d3a Reviewed-by: David Schulz Reviewed-by: hjk --- src/plugins/diffeditor/diffeditorwidget.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/plugins/diffeditor/diffeditorwidget.h') diff --git a/src/plugins/diffeditor/diffeditorwidget.h b/src/plugins/diffeditor/diffeditorwidget.h index cd12947adb..84503b31b1 100644 --- a/src/plugins/diffeditor/diffeditorwidget.h +++ b/src/plugins/diffeditor/diffeditorwidget.h @@ -81,11 +81,9 @@ struct RowData { }; struct ChunkData { - ChunkData() : skippedLinesBefore(0), leftOffset(0), rightOffset(0) {} + ChunkData() : alwaysShown(true) {} QList rows; - int skippedLinesBefore; // info for text - int leftOffset; - int rightOffset; + bool alwaysShown; // QMap changedLeftPositions; // counting from the beginning of the chunk QMap changedRightPositions; // counting from the beginning of the chunk @@ -96,7 +94,6 @@ struct FileData { FileData() {} FileData(const ChunkData &chunkData) { chunks.append(chunkData); } QList chunks; - QList chunkOffset; QString text; }; @@ -150,8 +147,6 @@ private: ChunkData m_originalChunkData; FileData m_contextFileData; - int m_leftSafePosHack; - int m_rightSafePosHack; }; } // namespace DiffEditor -- cgit v1.2.1