Commit 711315f3 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Gerrit: Add topic in Push to Gerrit dialog



Change-Id: I4f2df0d40d7518b1a88595ad2ff52fd50b8ac92d
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 8f3a8d47
......@@ -380,8 +380,12 @@ void GerritPlugin::push()
QStringList args;
args << dialog->selectedRemoteName();
args << QLatin1String("HEAD:refs/") + dialog->selectedPushType() +
QString target = QLatin1String("HEAD:refs/") + dialog->selectedPushType() +
QLatin1Char('/') + dialog->selectedRemoteBranchName();
const QString topic = dialog->selectedTopic();
if (!topic.isEmpty())
target += QLatin1Char('/') + topic;
args << target;
Git::Internal::GitPlugin::instance()->gitClient()->synchronousPush(topLevel, args);
......
......@@ -197,5 +197,10 @@ QString GerritPushDialog::selectedPushType() const
return m_ui->publicRadioButton->isChecked() ? QLatin1String("for") : QLatin1String("draft");
}
QString GerritPushDialog::selectedTopic() const
{
return m_ui->topicLineEdit->text().trimmed();
}
} // namespace Internal
} // namespace Gerrit
......@@ -50,6 +50,7 @@ public:
QString selectedRemoteName() const;
QString selectedRemoteBranchName() const;
QString selectedPushType() const;
QString selectedTopic() const;
bool localChangesFound() const;
private slots:
......
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>306</width>
<height>304</height>
<height>331</height>
</rect>
</property>
<property name="windowTitle">
......@@ -89,6 +89,19 @@
<item row="2" column="1">
<widget class="QComboBox" name="branchComboBox"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="topicLabel">
<property name="text">
<string>&amp;Topic</string>
</property>
<property name="buddy">
<cstring>topicLineEdit</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="topicLineEdit"/>
</item>
</layout>
</widget>
</item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment