forked from qt-creator/qt-creator
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:
@@ -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"
|
||||
|
Reference in New Issue
Block a user