Changeset View
Changeset View
Standalone View
Standalone View
git/pushdialog.cpp
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | 113 | foreach (const QString& branch, branches) { | |||
---|---|---|---|---|---|
114 | if (branch.startsWith(QLatin1String("remotes/"))) { | 114 | if (branch.startsWith(QLatin1String("remotes/"))) { | ||
115 | const QString remote = branch.section('/', 1, 1); | 115 | const QString remote = branch.section('/', 1, 1); | ||
116 | const QString name = branch.section('/', 2); | 116 | const QString name = branch.section('/', 2); | ||
117 | m_remoteBranches[remote] << name; | 117 | m_remoteBranches[remote] << name; | ||
118 | } else { | 118 | } else { | ||
119 | m_localBranchComboBox->addItem(branch); | 119 | m_localBranchComboBox->addItem(branch); | ||
120 | } | 120 | } | ||
121 | } | 121 | } | ||
122 | if (currentBranchIndex >= 0) { | ||||
122 | m_localBranchComboBox->setCurrentText(branches.at(currentBranchIndex)); | 123 | m_localBranchComboBox->setCurrentText(branches.at(currentBranchIndex)); | ||
124 | } | ||||
123 | remoteSelectionChanged(m_remoteComboBox->currentText()); | 125 | remoteSelectionChanged(m_remoteComboBox->currentText()); | ||
124 | 126 | | |||
125 | //Signals | 127 | //Signals | ||
126 | connect(m_remoteComboBox, SIGNAL(currentIndexChanged(QString)), | 128 | connect(m_remoteComboBox, SIGNAL(currentIndexChanged(QString)), | ||
127 | this, SLOT(remoteSelectionChanged(QString))); | 129 | this, SLOT(remoteSelectionChanged(QString))); | ||
128 | connect(m_localBranchComboBox, SIGNAL(currentIndexChanged(QString)), | 130 | connect(m_localBranchComboBox, SIGNAL(currentIndexChanged(QString)), | ||
129 | this, SLOT(localBranchSelectionChanged(QString))); | 131 | this, SLOT(localBranchSelectionChanged(QString))); | ||
130 | } | 132 | } | ||
Show All 39 Lines |