vcsbase: remove facility tool buttons in EditorParameterWidget

Because diff options are VCS-specific, these methods were removed :
  VCSBaseEditorParameterWidget::addIgnoreWhiteSpaceButton()
  VCSBaseEditorParameterWidget::addIgnoreBlankLinesButton()
  Associated msg*Label() and msg*ToolTip()
This impacts cvs, hg, perforce, svn and bzr plugins

Change-Id: I8d213ed3915653b78bae9ba8b6cbbd65fa269ce2
Merge-request: 340
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/323
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
This commit is contained in:
cerf
2011-06-03 12:57:10 +00:00
committed by Tobias Hunger
parent 16ae1d7324
commit 9e5fc323ef
7 changed files with 8 additions and 46 deletions

View File

@@ -302,8 +302,8 @@ private:
BazaarDiffParameterWidget::BazaarDiffParameterWidget(const BazaarDiffParameters &p, QWidget *parent) : BazaarDiffParameterWidget::BazaarDiffParameterWidget(const BazaarDiffParameters &p, QWidget *parent) :
VCSBase::VCSBaseEditorParameterWidget(parent), m_parameters(p) VCSBase::VCSBaseEditorParameterWidget(parent), m_parameters(p)
{ {
addIgnoreWhiteSpaceButton(QLatin1String("-w")); addToggleButton(QLatin1String("-w"), tr("Ignore whitespace"));
addIgnoreBlankLinesButton(QLatin1String("-B")); addToggleButton(QLatin1String("-B"), tr("Ignore blank lines"));
connect(this, SIGNAL(argumentsChanged()), this, SLOT(triggerReRun())); connect(this, SIGNAL(argumentsChanged()), this, SLOT(triggerReRun()));
} }

View File

@@ -552,8 +552,8 @@ CvsDiffParameterWidget::CvsDiffParameterWidget(const CvsDiffParameters &p, QWidg
VCSBase::VCSBaseEditorParameterWidget(parent), m_parameters(p) VCSBase::VCSBaseEditorParameterWidget(parent), m_parameters(p)
{ {
setBaseArguments(p.arguments); setBaseArguments(p.arguments);
addIgnoreWhiteSpaceButton(QLatin1String("-w")); addToggleButton(QLatin1String("-w"), tr("Ignore whitespace"));
addIgnoreBlankLinesButton(QLatin1String("-B")); addToggleButton(QLatin1String("-B"), tr("Ignore blank lines"));
connect(this, SIGNAL(argumentsChanged()), connect(this, SIGNAL(argumentsChanged()),
this, SLOT(triggerReRun())); this, SLOT(triggerReRun()));
} }

View File

@@ -501,8 +501,8 @@ private:
MercurialDiffParameterWidget::MercurialDiffParameterWidget(const MercurialDiffParameters &p, QWidget *parent) : MercurialDiffParameterWidget::MercurialDiffParameterWidget(const MercurialDiffParameters &p, QWidget *parent) :
VCSBase::VCSBaseEditorParameterWidget(parent), m_parameters(p) VCSBase::VCSBaseEditorParameterWidget(parent), m_parameters(p)
{ {
addIgnoreWhiteSpaceButton(QLatin1String("-w")); addToggleButton(QLatin1String("-w"), tr("Ignore whitespace"));
addIgnoreBlankLinesButton(QLatin1String("-B")); addToggleButton(QLatin1String("-B"), tr("Ignore blank lines"));
connect(this, SIGNAL(argumentsChanged()), this, SLOT(triggerReRun())); connect(this, SIGNAL(argumentsChanged()), this, SLOT(triggerReRun()));
} }

View File

@@ -1244,7 +1244,7 @@ PerforceDiffParameterWidget::PerforceDiffParameterWidget(const PerforceDiffParam
VCSBase::VCSBaseEditorParameterWidget(parent), m_parameters(p) VCSBase::VCSBaseEditorParameterWidget(parent), m_parameters(p)
{ {
setBaseArguments(p.diffArguments); setBaseArguments(p.diffArguments);
addIgnoreWhiteSpaceButton(QString(QLatin1Char('w'))); addToggleButton(QLatin1String("w"), tr("Ignore whitespace"));
connect(this, SIGNAL(argumentsChanged()), this, SLOT(triggerReRun())); connect(this, SIGNAL(argumentsChanged()), this, SLOT(triggerReRun()));
} }

View File

@@ -558,7 +558,7 @@ SubversionDiffParameterWidget::SubversionDiffParameterWidget(const SubversionDif
VCSBase::VCSBaseEditorParameterWidget(parent), m_parameters(p) VCSBase::VCSBaseEditorParameterWidget(parent), m_parameters(p)
{ {
setBaseArguments(p.arguments); setBaseArguments(p.arguments);
addIgnoreWhiteSpaceButton(QString(QLatin1Char('w'))); addToggleButton(QLatin1String("w"), tr("Ignore whitespace"));
connect(this, SIGNAL(argumentsChanged()), this, SLOT(triggerReRun())); connect(this, SIGNAL(argumentsChanged()), this, SLOT(triggerReRun()));
} }

View File

@@ -121,16 +121,6 @@ QToolButton *VCSBaseEditorParameterWidget::addToggleButton(const QString &option
return tb; return tb;
} }
QToolButton *VCSBaseEditorParameterWidget::addIgnoreWhiteSpaceButton(const QString &option)
{
return addToggleButton(option, msgIgnoreWhiteSpaceLabel(), msgIgnoreWhiteSpaceToolTip());
}
QToolButton *VCSBaseEditorParameterWidget::addIgnoreBlankLinesButton(const QString &option)
{
return addToggleButton(option, msgIgnoreBlankLinesLabel(), msgIgnoreBlankLinesToolTip());
}
QComboBox *VCSBaseEditorParameterWidget::addComboBox(const QString &option, QComboBox *VCSBaseEditorParameterWidget::addComboBox(const QString &option,
const QList<ComboBoxItem> &items) const QList<ComboBoxItem> &items)
{ {
@@ -167,26 +157,6 @@ void VCSBaseEditorParameterWidget::setComboBoxOptionTemplate(const QStringList &
d->m_comboBoxOptionTemplate = optTemplate; d->m_comboBoxOptionTemplate = optTemplate;
} }
QString VCSBaseEditorParameterWidget::msgIgnoreWhiteSpaceLabel()
{
return tr("Ignore whitespace");
}
QString VCSBaseEditorParameterWidget::msgIgnoreWhiteSpaceToolTip()
{
return tr("Ignore whitespace only changes");
}
QString VCSBaseEditorParameterWidget::msgIgnoreBlankLinesLabel()
{
return tr("Ignore blank lines ");
}
QString VCSBaseEditorParameterWidget::msgIgnoreBlankLinesToolTip()
{
return tr("Ignore changes in blank lines");
}
void VCSBaseEditorParameterWidget::executeCommand() void VCSBaseEditorParameterWidget::executeCommand()
{ {
} }

View File

@@ -68,8 +68,6 @@ public:
QToolButton *addToggleButton(const QString &option, const QString &label, QToolButton *addToggleButton(const QString &option, const QString &label,
const QString &tooltip = QString()); const QString &tooltip = QString());
QToolButton *addIgnoreWhiteSpaceButton(const QString &option);
QToolButton *addIgnoreBlankLinesButton(const QString &option);
QComboBox *addComboBox(const QString &option, const QList<ComboBoxItem> &items); QComboBox *addComboBox(const QString &option, const QList<ComboBoxItem> &items);
QStringList comboBoxOptionTemplate() const; QStringList comboBoxOptionTemplate() const;
@@ -78,12 +76,6 @@ public:
// Return the effective arguments according to setting. // Return the effective arguments according to setting.
virtual QStringList arguments() const; virtual QStringList arguments() const;
// Standard texts
static QString msgIgnoreWhiteSpaceLabel();
static QString msgIgnoreWhiteSpaceToolTip();
static QString msgIgnoreBlankLinesLabel();
static QString msgIgnoreBlankLinesToolTip();
public slots: public slots:
virtual void executeCommand(); virtual void executeCommand();
virtual void handleArgumentsChanged(); virtual void handleArgumentsChanged();