Vcs: Move annotate and annotateRevisionRequested into VcsBaseClientImpl

... and use that in the Git client.

Change-Id: Ie70ec0d5908776d11eb69613d45f565d4f0ce32b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-04-13 11:38:44 +02:00
parent ed51368979
commit a55fb4a378
6 changed files with 34 additions and 48 deletions

View File

@@ -175,6 +175,19 @@ void VcsBaseClientImpl::resetCachedVcsInfo(const QString &workingDir)
Core::VcsManager::resetVersionControlForDirectory(workingDir);
}
void VcsBaseClientImpl::annotateRevisionRequested(const QString &workingDirectory,
const QString &file, const QString &change,
int line)
{
QString changeCopy = change;
// This might be invoked with a verbose revision description
// "SHA1 author subject" from the annotation context menu. Strip the rest.
const int blankPos = changeCopy.indexOf(QLatin1Char(' '));
if (blankPos != -1)
changeCopy.truncate(blankPos);
annotate(workingDirectory, file, changeCopy, line);
}
int VcsBaseClientImpl::vcsTimeout() const
{
return settings().intValue(VcsBaseClientSettings::timeoutKey);
@@ -650,19 +663,6 @@ void VcsBaseClient::statusParser(const QString &text)
emit parsedStatus(lineInfoList);
}
void VcsBaseClient::annotateRevisionRequested(const QString &workingDirectory,
const QString &file, const QString &change,
int line)
{
QString changeCopy = change;
// This might be invoked with a verbose revision description
// "SHA1 author subject" from the annotation context menu. Strip the rest.
const int blankPos = changeCopy.indexOf(QLatin1Char(' '));
if (blankPos != -1)
changeCopy.truncate(blankPos);
annotate(workingDirectory, file, changeCopy, line);
}
} // namespace VcsBase
#include "moc_vcsbaseclient.cpp"