forked from qt-creator/qt-creator
DiffEditor: Fix saving diff containing new or deleted files
Fix also the case when new file was empty. Fix some const correctness. Change-Id: Ied71c3de0398914e595fbf542f1b8ec3659d69b6 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -856,7 +856,7 @@ void DiffEditor::Internal::DiffEditorPlugin::testMakePatch()
|
||||
QFETCH(bool, lastChunk);
|
||||
QFETCH(QString, patchText);
|
||||
|
||||
QString result = DiffUtils::makePatch(sourceChunk, leftFileName, rightFileName, lastChunk);
|
||||
const QString result = DiffUtils::makePatch(sourceChunk, leftFileName, rightFileName, lastChunk);
|
||||
|
||||
QCOMPARE(result, patchText);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user