forked from qt-creator/qt-creator
Gerrit: Add topic in Push to Gerrit dialog
Change-Id: I4f2df0d40d7518b1a88595ad2ff52fd50b8ac92d Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
8f3a8d47c1
commit
711315f383
@@ -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>&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>
|
||||
|
||||
Reference in New Issue
Block a user