DiffEditor: Support patch with new/deleted file

Change-Id: I669564355e27dc06464fc8d8641b2f4255c8965e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
This commit is contained in:
Orgad Shaneh
2014-06-08 23:31:46 +03:00
committed by Orgad Shaneh
parent 67561efd29
commit 5e883e5b4d
2 changed files with 45 additions and 5 deletions

View File

@@ -613,8 +613,8 @@ static QList<ChunkData> readChunks(const QString &patch,
const QRegExp chunkRegExp(QLatin1String(
// beginning of the line
"((?:\\n|^)"
// @@ -leftPos,leftCount +rightPos,rightCount @@
"@@ -(\\d+),\\d+ \\+(\\d+),\\d+ @@"
// @@ -leftPos[,leftCount] +rightPos[,rightCount] @@
"@@ -(\\d+)(?:,\\d+)? \\+(\\d+)(?:,\\d+)? @@"
// optional hint (e.g. function name)
"(?:\\ +[^\\n]*)?"
// end of line (need to be followed by text line)