VCS[Bazaar, Mercurial]: Add diff formatting, revert chunk.

Add toolbar controls for ignore-whitespace to editors
and wire 'Revert Chunk' context menus.

Fix Bazaar diff interaction (find the file on doubleclick).

Introduce initializeDiffEditor to BaseClient and wire the editors
there.
This commit is contained in:
Friedemann Kleint
2011-03-28 11:59:26 +02:00
parent 82ce382ffc
commit d7cddd4e17
10 changed files with 246 additions and 34 deletions

View File

@@ -700,6 +700,8 @@ DiffChunk VCSBaseEditorWidget::diffChunk(QTextCursor cursor) const
return rc;
// Concatenate chunk and convert
QString unicode = block.text();
if (!unicode.endsWith(QLatin1Char('\n'))) // Missing in case of hg.
unicode.append(QLatin1Char('\n'));
for (block = block.next() ; block.isValid() ; block = block.next()) {
const QString line = block.text();
if (checkChunkLine(line, &chunkStart)) {