forked from qt-creator/qt-creator
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 <david.schulz@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -81,11 +81,9 @@ struct RowData {
|
||||
};
|
||||
|
||||
struct ChunkData {
|
||||
ChunkData() : skippedLinesBefore(0), leftOffset(0), rightOffset(0) {}
|
||||
ChunkData() : alwaysShown(true) {}
|
||||
QList<RowData> rows;
|
||||
int skippedLinesBefore; // info for text
|
||||
int leftOffset;
|
||||
int rightOffset;
|
||||
bool alwaysShown;
|
||||
// <absolute position in the file, absolute position in the file>
|
||||
QMap<int, int> changedLeftPositions; // counting from the beginning of the chunk
|
||||
QMap<int, int> changedRightPositions; // counting from the beginning of the chunk
|
||||
@@ -96,7 +94,6 @@ struct FileData {
|
||||
FileData() {}
|
||||
FileData(const ChunkData &chunkData) { chunks.append(chunkData); }
|
||||
QList<ChunkData> chunks;
|
||||
QList<int> chunkOffset;
|
||||
QString text;
|
||||
};
|
||||
|
||||
@@ -150,8 +147,6 @@ private:
|
||||
|
||||
ChunkData m_originalChunkData;
|
||||
FileData m_contextFileData;
|
||||
int m_leftSafePosHack;
|
||||
int m_rightSafePosHack;
|
||||
};
|
||||
|
||||
} // namespace DiffEditor
|
||||
|
||||
Reference in New Issue
Block a user