forked from qt-creator/qt-creator
DiffEditor: do not show reload prompt
for text document, after reverting some change in diff editor Change-Id: I3511f00e52beffba1cce67fb6940d1b580ef99cd Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -27,8 +27,9 @@
|
||||
#include "diffeditorconstants.h"
|
||||
#include "diffeditordocument.h"
|
||||
|
||||
#include <coreplugin/patchtool.h>
|
||||
#include <coreplugin/documentmanager.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/patchtool.h>
|
||||
|
||||
#include <texteditor/fontsettings.h>
|
||||
|
||||
@@ -92,6 +93,8 @@ void DiffEditorWidgetController::patch(bool revert)
|
||||
if (patch.isEmpty())
|
||||
return;
|
||||
|
||||
const QString absFileName = QFileInfo(workingDirectory + '/' + fileName).absoluteFilePath();
|
||||
FileChangeBlocker fileChangeBlocker(absFileName);
|
||||
if (PatchTool::runPatch(EditorManager::defaultTextCodec()->fromUnicode(patch),
|
||||
workingDirectory, strip, revert))
|
||||
m_document->reload();
|
||||
|
||||
Reference in New Issue
Block a user