Replace old svn diff editor with the new one

Change-Id: I4137b709be718603cdc221ac938e139326c88835
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
jkobus
2014-11-06 13:23:40 +01:00
committed by Jarek Kobus
parent 07e3a032ff
commit 8d1940a796
12 changed files with 347 additions and 185 deletions

View File

@@ -48,6 +48,7 @@ DiffEditorController::DiffEditorController(QObject *parent)
m_chunkIndex(-1),
m_descriptionEnabled(false),
m_contextLinesNumber(3),
m_contextLinesNumberEnabled(true),
m_ignoreWhitespace(true),
m_reloader(0)
{
@@ -97,6 +98,11 @@ int DiffEditorController::contextLinesNumber() const
return m_contextLinesNumber;
}
bool DiffEditorController::isContextLinesNumberEnabled() const
{
return m_contextLinesNumberEnabled;
}
bool DiffEditorController::isIgnoreWhitespace() const
{
return m_ignoreWhitespace;
@@ -150,7 +156,7 @@ void DiffEditorController::setReloader(DiffEditorReloader *reloader)
if (m_reloader)
m_reloader->setController(this);
emit reloaderChanged(m_reloader);
emit reloaderChanged();
}
void DiffEditorController::clear()
@@ -180,10 +186,6 @@ void DiffEditorController::setDescription(const QString &description)
return;
m_description = description;
// Empty line before headers and commit message
const int emptyLine = m_description.indexOf(QLatin1String("\n\n"));
if (emptyLine != -1)
m_description.insert(emptyLine, QLatin1Char('\n') + QLatin1String(Constants::EXPAND_BRANCHES));
emit descriptionChanged(m_description);
}
@@ -250,6 +252,15 @@ void DiffEditorController::setContextLinesNumber(int lines)
emit contextLinesNumberChanged(l);
}
void DiffEditorController::setContextLinesNumberEnabled(bool on)
{
if (m_contextLinesNumberEnabled == on)
return;
m_contextLinesNumberEnabled = on;
emit contextLinesNumberEnablementChanged(on);
}
void DiffEditorController::setIgnoreWhitespace(bool ignore)
{
if (m_ignoreWhitespace == ignore)