forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
6cd68d5401
commit
2c6adc1e74
@@ -50,8 +50,8 @@ class BazaarDiffParameterWidget : public VcsBaseEditorParameterWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BazaarDiffParameterWidget(VcsBaseClientSettings &settings, QWidget *parent = 0) :
|
||||
VcsBaseEditorParameterWidget(parent)
|
||||
BazaarDiffParameterWidget(VcsBaseClientSettings &settings, QToolBar *toolBar) :
|
||||
VcsBaseEditorParameterWidget(toolBar)
|
||||
{
|
||||
mapSetting(addToggleButton(QLatin1String("-w"), tr("Ignore Whitespace")),
|
||||
settings.boolPointer(BazaarSettings::diffIgnoreWhiteSpaceKey));
|
||||
@@ -77,8 +77,8 @@ class BazaarLogParameterWidget : public VcsBaseEditorParameterWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BazaarLogParameterWidget(VcsBaseClientSettings &settings, QWidget *parent = 0) :
|
||||
VcsBaseEditorParameterWidget(parent)
|
||||
BazaarLogParameterWidget(VcsBaseClientSettings &settings, QToolBar *toolBar) :
|
||||
VcsBaseEditorParameterWidget(toolBar)
|
||||
{
|
||||
mapSetting(addToggleButton(QLatin1String("--verbose"), tr("Verbose"),
|
||||
tr("Show files changed in each revision.")),
|
||||
@@ -102,8 +102,12 @@ public:
|
||||
|
||||
BazaarClient::BazaarClient() : VcsBaseClient(new BazaarSettings)
|
||||
{
|
||||
setDiffParameterWidgetCreator([this] { return new BazaarDiffParameterWidget(settings()); });
|
||||
setLogParameterWidgetCreator([this] { return new BazaarLogParameterWidget(settings()); });
|
||||
setDiffParameterWidgetCreator([this](QToolBar *toolBar) {
|
||||
return new BazaarDiffParameterWidget(settings(), toolBar);
|
||||
});
|
||||
setLogParameterWidgetCreator([this](QToolBar *toolBar) {
|
||||
return new BazaarLogParameterWidget(settings(), toolBar);
|
||||
});
|
||||
}
|
||||
|
||||
bool BazaarClient::synchronousSetUserId()
|
||||
|
Reference in New Issue
Block a user