aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/vcsbase
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2019-11-23 22:55:37 +0200
committerOrgad Shaneh <orgads@gmail.com>2019-11-24 16:22:27 +0000
commitcf8099f9018081f5e37ac7f4ca05dcf01b217124 (patch)
tree5d3d833b4a807f2f14d6ddd96bbeb4f2467d20ab /src/plugins/vcsbase
parent6d98db0d8095c225669ec65f9e5405eb1976a39b (diff)
VCS: Replace addButton with addReloadButton
It's the only use, and this is a special option that deserves its own function. Change-Id: Ic69be5973b452d3a1d506fab3623d4a9b84f8452 Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src/plugins/vcsbase')
-rw-r--r--src/plugins/vcsbase/vcsbaseeditorconfig.cpp6
-rw-r--r--src/plugins/vcsbase/vcsbaseeditorconfig.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/vcsbase/vcsbaseeditorconfig.cpp b/src/plugins/vcsbase/vcsbaseeditorconfig.cpp
index ee40e2649a..5aa88dacf6 100644
--- a/src/plugins/vcsbase/vcsbaseeditorconfig.cpp
+++ b/src/plugins/vcsbase/vcsbaseeditorconfig.cpp
@@ -25,6 +25,8 @@
#include "vcsbaseeditorconfig.h"
+#include <utils/utilsicons.h>
+
#include <QComboBox>
#include <QAction>
#include <QHBoxLayout>
@@ -132,9 +134,9 @@ void VcsBaseEditorConfig::setBaseArguments(const QStringList &b)
d->m_baseArguments = b;
}
-QAction *VcsBaseEditorConfig::addButton(const QString &label, const QIcon &icon)
+QAction *VcsBaseEditorConfig::addReloadButton()
{
- auto action = new QAction(icon, label, d->m_toolBar);
+ auto action = new QAction(Utils::Icons::RELOAD.icon(), tr("Reload"), d->m_toolBar);
connect(action, &QAction::triggered, this, &VcsBaseEditorConfig::argumentsChanged);
addAction(action);
return action;
diff --git a/src/plugins/vcsbase/vcsbaseeditorconfig.h b/src/plugins/vcsbase/vcsbaseeditorconfig.h
index d8f5d4fe44..31f62af4d0 100644
--- a/src/plugins/vcsbase/vcsbaseeditorconfig.h
+++ b/src/plugins/vcsbase/vcsbaseeditorconfig.h
@@ -63,7 +63,7 @@ public:
QStringList baseArguments() const;
void setBaseArguments(const QStringList &);
- QAction *addButton(const QString &label, const QIcon &icon);
+ QAction *addReloadButton();
QAction *addToggleButton(const QString &option, const QString &label,
const QString &tooltip = QString());
QAction *addToggleButton(const QStringList &options, const QString &label,