Remove unused variables

Remove unused fields and one virtual method,
rename alwaysShows -> contextChunk and revert
its logical value.

Change-Id: I11fd60202aa5b7978b772764a40c99029cac82a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
jkobus
2013-04-23 13:16:52 +02:00
committed by Jarek Kobus
parent 3ab78b3459
commit 5f5b7fa4c1
4 changed files with 10 additions and 25 deletions

View File

@@ -72,34 +72,28 @@ struct RowData {
: leftLine(l), rightLine(l), equal(true) {}
RowData(const TextLineData &l, const TextLineData &r, bool e = false)
: leftLine(l), rightLine(r), equal(e) {}
RowData(const QString &txt)
: text(txt), equal(true) {}
TextLineData leftLine;
TextLineData rightLine;
QString text; // file of context description
bool equal; // true if left and right lines are equal, taking whitespaces into account (or both invalid)
};
struct ChunkData {
ChunkData() : alwaysShown(true) {}
ChunkData() : contextChunk(false) {}
QList<RowData> rows;
bool alwaysShown;
bool contextChunk;
// <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
QString text;
};
struct FileData {
FileData() {}
FileData(const ChunkData &chunkData) { chunks.append(chunkData); }
QList<ChunkData> chunks;
QString text;
};
struct DiffData {
QList<FileData> files;
QString text;
};
class DIFFEDITOR_EXPORT DiffEditorWidget : public QWidget
@@ -110,7 +104,6 @@ public:
~DiffEditorWidget();
void setDiff(const QString &leftText, const QString &rightText);
void setDiff(const QList<Diff> &diffList);
QTextCodec *codec() const;
public slots:
@@ -128,6 +121,7 @@ private slots:
void rightDocumentSizeChanged();
private:
void setDiff(const QList<Diff> &diffList);
bool isWhitespace(const QChar &c) const;
bool isWhitespace(const Diff &diff) const;
bool isEqual(const QList<Diff> &diffList, int diffNumber) const;