void GitSubmitEditorWidget::initialize(CommitType commitType, const QString &repository, const GitSubmitEditorPanelData &data, const GitSubmitEditorPanelInfo &info, bool enablePush) { if (m_isInitialized) return; m_isInitialized = true; if (commitType == FixupCommit) { auto logChangeGroupBox = new QGroupBox(tr("Select Change")); auto logChangeLayout = new QVBoxLayout; logChangeGroupBox->setLayout(logChangeLayout); m_logChangeWidget = new LogChangeWidget; m_logChangeWidget->init(repository); connect(m_logChangeWidget, &LogChangeWidget::activated, this, &GitSubmitEditorWidget::show); logChangeLayout->addWidget(m_logChangeWidget); insertTopWidget(logChangeGroupBox); m_gitSubmitPanelUi.editGroup->hide(); hideDescription(); } insertTopWidget(m_gitSubmitPanel); setPanelData(data); setPanelInfo(info); if (enablePush) { auto menu = new QMenu(this); menu->addAction(tr("&Commit only"), this, SLOT(commitOnlySlot())); menu->addAction(tr("Commit and &Push"), this, SLOT(commitAndPushSlot())); addSubmitButtonMenu(menu); } }
void GitSubmitEditorWidget::initialize(CommitType commitType, const QString &repository, const GitSubmitEditorPanelData &data, const GitSubmitEditorPanelInfo &info, bool enablePush) { if (m_isInitialized) return; m_isInitialized = true; if (commitType == FixupCommit) { QGroupBox *logChangeGroupBox = new QGroupBox(tr("Select Change")); QVBoxLayout *logChangeLayout = new QVBoxLayout; logChangeGroupBox->setLayout(logChangeLayout); m_logChangeWidget = new LogChangeWidget; m_logChangeWidget->init(repository, QString(), false); connect(m_logChangeWidget, SIGNAL(doubleClicked(QString)), this, SIGNAL(show(QString))); logChangeLayout->addWidget(m_logChangeWidget); insertTopWidget(logChangeGroupBox); m_gitSubmitPanelUi.editGroup->hide(); hideDescription(); } insertTopWidget(m_gitSubmitPanel); setPanelData(data); setPanelInfo(info); if (enablePush && commitType != FixupCommit) { QMenu *menu = new QMenu(this); menu->addAction(tr("&Commit only"), this, SLOT(commitOnlySlot())); menu->addAction(tr("Commit and &Push"), this, SLOT(commitAndPushSlot())); menu->addAction(tr("Commit and Push to &Gerrit"), this, SLOT(commitAndPushToGerritSlot())); addSubmitButtonMenu(menu); } }
MercurialCommitWidget::MercurialCommitWidget() : mercurialCommitPanel(new QWidget) { mercurialCommitPanelUi.setupUi(mercurialCommitPanel); insertTopWidget(mercurialCommitPanel); new MercurialSubmitHighlighter(descriptionEdit()); }
PerforceSubmitEditorWidget::PerforceSubmitEditorWidget(QWidget *parent) : Utils::SubmitEditorWidget(parent), m_submitPanel(new QGroupBox) { m_submitPanelUi.setupUi(m_submitPanel); insertTopWidget(m_submitPanel); }
BazaarCommitWidget::BazaarCommitWidget(QWidget *parent) : Utils::SubmitEditorWidget(parent), m_bazaarCommitPanel(new QWidget) { m_bazaarCommitPanelUi.setupUi(m_bazaarCommitPanel); insertTopWidget(m_bazaarCommitPanel); new BazaarSubmitHighlighter(descriptionEdit()); }
// ------------------ GitSubmitEditorWidget::GitSubmitEditorWidget(QWidget *parent) : Utils::SubmitEditorWidget(parent), m_gitSubmitPanel(new QWidget) { m_gitSubmitPanelUi.setupUi(m_gitSubmitPanel); insertTopWidget(m_gitSubmitPanel); new GitSubmitHighlighter(descriptionEdit()); }
MercurialCommitWidget::MercurialCommitWidget(QWidget *parent) : Utils::SubmitEditorWidget(parent), mercurialCommitPanel(new QWidget) { mercurialCommitPanelUi.setupUi(mercurialCommitPanel); insertTopWidget(mercurialCommitPanel); new MercurialSubmitHighlighter(descriptionEdit()); }
// ------------------ GitSubmitEditorWidget::GitSubmitEditorWidget(QWidget *parent) : Utils::SubmitEditorWidget(parent), m_gitSubmitPanel(new QWidget) { m_gitSubmitPanelUi.setupUi(m_gitSubmitPanel); insertTopWidget(m_gitSubmitPanel); new GitSubmitHighlighter(descriptionEdit()); m_emailValidator = new QRegExpValidator(QRegExp(QLatin1String("[^@ ]+@[^@ ]+\\.[a-zA-Z]+")), this); connect(m_gitSubmitPanelUi.authorLineEdit, SIGNAL(textChanged(QString)), this, SLOT(authorInformationChanged())); connect(m_gitSubmitPanelUi.emailLineEdit, SIGNAL(textChanged(QString)), this, SLOT(authorInformationChanged())); }
PerforceSubmitEditorWidget::PerforceSubmitEditorWidget() : m_submitPanel(new QGroupBox) { m_submitPanelUi.setupUi(m_submitPanel); insertTopWidget(m_submitPanel); }