From 2c6adc1e747575af5198cc7ea2277b9a70366d3c Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 24 Aug 2015 13:39:40 +0200 Subject: 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 Reviewed-by: Jarek Kobus --- src/plugins/bazaar/bazaarclient.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/plugins/bazaar/bazaarclient.cpp') diff --git a/src/plugins/bazaar/bazaarclient.cpp b/src/plugins/bazaar/bazaarclient.cpp index 3fad78d6ee..e843a5ea1d 100644 --- a/src/plugins/bazaar/bazaarclient.cpp +++ b/src/plugins/bazaar/bazaarclient.cpp @@ -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() -- cgit v1.2.1