Core: IVersionControl: Introduce a setTopicCache

More flexible than passing in the constructor.

Change-Id: I7bb5b3fe02682e01ebbce246de547686ff871920
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2020-01-31 08:04:25 +01:00
parent f32605fa4a
commit ac9d05013e
5 changed files with 19 additions and 10 deletions

View File

@@ -138,13 +138,17 @@ IVersionControl::RepoUrl IVersionControl::getRepoUrl(const QString &location) co
return RepoUrl(location);
}
void IVersionControl::setTopicCache(TopicCache *topicCache)
{
m_topicCache = topicCache;
}
QString IVersionControl::vcsTopic(const QString &topLevel)
{
return m_topicCache ? m_topicCache->topic(topLevel) : QString();
}
IVersionControl::IVersionControl(IVersionControl::TopicCache *topicCache)
: m_topicCache(topicCache)
IVersionControl::IVersionControl()
{
Core::VcsManager::addVersionControl(this);
}