forked from qt-creator/qt-creator
Git: Set remote-tracking branch
Task-number: QTCREATORBUG-8863 Change-Id: I06df735d85e2f9ed17c71385fed5057f8fc67d55 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
51a9d5065a
commit
062b8f5d31
@@ -623,6 +623,18 @@ QModelIndex BranchModel::addBranch(const QString &name, bool track, const QModel
|
||||
return nodeToIndex(newNode);
|
||||
}
|
||||
|
||||
void BranchModel::setRemoteTracking(const QModelIndex &trackingIndex)
|
||||
{
|
||||
QModelIndex current = currentBranch();
|
||||
QTC_ASSERT(current.isValid(), return);
|
||||
const QString currentName = fullName(current);
|
||||
const QString shortTracking = fullName(trackingIndex);
|
||||
const QString tracking = fullName(trackingIndex, true);
|
||||
m_client->synchronousSetTrackingBranch(m_workingDirectory, currentName, tracking);
|
||||
m_currentBranch->tracking = shortTracking;
|
||||
emit dataChanged(current, current);
|
||||
}
|
||||
|
||||
void BranchModel::parseOutputLine(const QString &line)
|
||||
{
|
||||
if (line.size() < 3)
|
||||
|
||||
Reference in New Issue
Block a user