VCS: Replace QToolButtons in VCS toolbar with QActions

Change VcsBaseEditorParameterWidget to add actions/widgets to an
existing toolbar, instead of being a widget itself.

The class is renamed in a follow-up commit.

Task-number: QTCREATORBUG-14934
Change-Id: I473a439d12a096f4cbb64f06faa0598ee72000de
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Jarek Kobus
2015-08-24 13:39:40 +02:00
committed by Orgad Shaneh
parent 6cd68d5401
commit 2c6adc1e74
14 changed files with 163 additions and 143 deletions

View File

@@ -56,8 +56,8 @@ class SubversionLogParameterWidget : public VcsBaseEditorParameterWidget
{
Q_OBJECT
public:
SubversionLogParameterWidget(VcsBaseClientSettings &settings, QWidget *parent = 0) :
VcsBaseEditorParameterWidget(parent)
SubversionLogParameterWidget(VcsBaseClientSettings &settings, QToolBar *toolBar) :
VcsBaseEditorParameterWidget(toolBar)
{
mapSetting(addToggleButton(QLatin1String("--verbose"), tr("Verbose"),
tr("Show files changed in each revision")),
@@ -67,7 +67,9 @@ public:
SubversionClient::SubversionClient() : VcsBaseClient(new SubversionSettings)
{
setLogParameterWidgetCreator([this] { return new SubversionLogParameterWidget(settings()); });
setLogParameterWidgetCreator([this](QToolBar *toolBar) {
return new SubversionLogParameterWidget(settings(), toolBar);
});
}
VcsCommand *SubversionClient::createCommitCmd(const QString &repositoryRoot,