Hide some diff editor controls when diff editor is bound to a file.

Remove unnecessary anymore "ignoreWhitespace" argument
from functions which read a patch file.

Transfer the ownership of reloader into controller.

Task-number: QTCREATORBUG-13250
Change-Id: I68183005b845d6ece9ea2be9888abc8597310426
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
jkobus
2014-10-24 14:11:12 +02:00
committed by Jarek Kobus
parent f406a38ca7
commit 2a9c9f2d70
12 changed files with 52 additions and 68 deletions

View File

@@ -64,7 +64,7 @@ DiffEditorController::DiffEditorController(QObject *parent)
DiffEditorController::~DiffEditorController()
{
delete m_reloader;
}
QString DiffEditorController::clearMessage() const
@@ -137,20 +137,20 @@ DiffEditorReloader *DiffEditorController::reloader() const
return m_reloader;
}
// The ownership of reloader is passed to the controller
void DiffEditorController::setReloader(DiffEditorReloader *reloader)
{
if (m_reloader == reloader)
return; // nothing changes
if (m_reloader)
m_reloader->setController(0);
delete m_reloader;
m_reloader = reloader;
if (m_reloader)
m_reloader->setController(this);
reloaderChanged(m_reloader);
emit reloaderChanged(m_reloader);
}
void DiffEditorController::clear()