forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Orgad Shaneh
parent
6d98db0d80
commit
cf8099f901
@@ -52,6 +52,7 @@
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
#include <utils/temporaryfile.h>
|
||||
#include <utils/theme/theme.h>
|
||||
|
||||
#include <vcsbase/submitfilemodel.h>
|
||||
#include <vcsbase/vcsbasediffeditorcontroller.h>
|
||||
@@ -69,8 +70,6 @@
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
@@ -603,7 +602,7 @@ public:
|
||||
mapSetting(addComboBox({}, logChoices),
|
||||
settings.intPointer(GitSettings::blameMoveDetection));
|
||||
|
||||
addButton(tr("Reload"), Utils::Icons::RELOAD.icon());
|
||||
addReloadButton();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -642,7 +641,7 @@ public:
|
||||
mapSetting(followButton, settings.boolPointer(GitSettings::followRenamesKey));
|
||||
}
|
||||
|
||||
addButton(tr("Reload"), Utils::Icons::RELOAD.icon());
|
||||
addReloadButton();
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user