Move git specific stuff out of diff editor plugin

Move it to the git plugin.

Change-Id: I8151573ed50df70776f7ebf0475dd41fb84fae83
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Jarek Kobus
2018-02-16 12:53:35 +01:00
parent 24db24734d
commit da2c66b1d0
13 changed files with 370 additions and 186 deletions

View File

@@ -65,12 +65,6 @@ bool DiffEditorController::ignoreWhitespace() const
return m_document->ignoreWhitespace();
}
QString DiffEditorController::revisionFromDescription() const
{
// TODO: This is specific for git and does not belong here at all!
return m_document->description().mid(7, 12);
}
QString DiffEditorController::makePatch(int fileIndex, int chunkIndex,
PatchOptions options) const
{
@@ -105,18 +99,9 @@ void DiffEditorController::setDescription(const QString &description)
m_document->setDescription(description);
}
void DiffEditorController::branchesReceived(const QString &branches)
QString DiffEditorController::description() const
{
QString tmp = m_document->description();
tmp.replace(Constants::EXPAND_BRANCHES, branches);
m_document->setDescription(tmp);
}
void DiffEditorController::requestMoreInformation()
{
const QString rev = revisionFromDescription();
if (!rev.isEmpty())
emit requestInformationForCommit(rev);
return m_document->description();
}
/**