QComboBox *VCSBaseEditorParameterWidget::addComboBox(const QString &option,
                                                     const QList<ComboBoxItem> &items)
{
    QComboBox *cb = new QComboBox;
    foreach (const ComboBoxItem &item, items)
        cb->addItem(item.displayText, item.value);
    connect(cb, SIGNAL(currentIndexChanged(int)), this, SIGNAL(argumentsChanged()));
    d->m_layout->addWidget(cb);
    d->m_optionMappings.append(OptionMapping(option, cb));
    return cb;
}
QToolButton *VcsBaseEditorParameterWidget::addToggleButton(const QStringList &options, const QString &label, const QString &tooltip)
{
    auto tb = new QToolButton;
    tb->setText(label);
    tb->setToolTip(tooltip);
    tb->setCheckable(true);
    connect(tb, &QToolButton::toggled, this, &VcsBaseEditorParameterWidget::argumentsChanged);
    d->m_layout->addWidget(tb);
    d->m_optionMappings.append(OptionMapping(options, tb));
    return tb;
}
QComboBox *VcsBaseEditorParameterWidget::addComboBox(const QStringList &options,
        const QList<ComboBoxItem> &items)
{
    auto cb = new QComboBox;
    foreach (const ComboBoxItem &item, items)
        cb->addItem(item.displayText, item.value);
    connect(cb, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
            this, &VcsBaseEditorParameterWidget::argumentsChanged);
    d->m_layout->addWidget(cb);
    d->m_optionMappings.append(OptionMapping(options, cb));
    return cb;
}
QToolButton *VCSBaseEditorParameterWidget::addToggleButton(const QString &option,
                                                           const QString &label,
                                                           const QString &toolTip)
{
    QToolButton *tb = new QToolButton;
    tb->setText(label);
    tb->setToolTip(toolTip);
    tb->setCheckable(true);
    connect(tb, SIGNAL(toggled(bool)), this, SIGNAL(argumentsChanged()));
    d->m_layout->addWidget(tb);
    d->m_optionMappings.append(OptionMapping(option, tb));
    return tb;
}