forked from qt-creator/qt-creator
VCS: Remove unused unregisterActions functions
Change-Id: I4c7a0dfc93f27f93cdbd84d7e027e63db05341e8 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
6e59d31095
commit
f1f506b479
@@ -250,37 +250,6 @@ void SubmitEditorWidget::registerActions(QAction *editorUndoAction, QAction *edi
|
||||
}
|
||||
}
|
||||
|
||||
void SubmitEditorWidget::unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction,
|
||||
QAction *submitAction, QAction *diffAction)
|
||||
{
|
||||
if (editorUndoAction) {
|
||||
disconnect(d->m_ui.description, &CompletingTextEdit::undoAvailable,
|
||||
editorUndoAction, &QAction::setEnabled);
|
||||
disconnect(editorUndoAction, &QAction::triggered,
|
||||
d->m_ui.description, &CompletingTextEdit::undo);
|
||||
}
|
||||
if (editorRedoAction) {
|
||||
disconnect(d->m_ui.description, &CompletingTextEdit::redoAvailable,
|
||||
editorRedoAction, &QAction::setEnabled);
|
||||
disconnect(editorRedoAction, &QAction::triggered,
|
||||
d->m_ui.description, &CompletingTextEdit::redo);
|
||||
}
|
||||
|
||||
if (submitAction) {
|
||||
disconnect(this, &SubmitEditorWidget::submitActionEnabledChanged,
|
||||
submitAction, &QAction::setEnabled);
|
||||
// Just deactivate the QActionSetTextSlotHelper on the action
|
||||
disconnect(this, &SubmitEditorWidget::submitActionTextChanged, 0, 0);
|
||||
}
|
||||
|
||||
if (diffAction) {
|
||||
disconnect(this, &SubmitEditorWidget::fileSelectionChanged,
|
||||
diffAction, &QAction::setEnabled);
|
||||
disconnect(diffAction, &QAction::triggered,
|
||||
this, &SubmitEditorWidget::triggerDiffSelected);
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure we have one terminating NL. Do not trim front as leading space might be
|
||||
// required for some formattings.
|
||||
void SubmitEditorWidget::trimDescription()
|
||||
|
@@ -60,8 +60,6 @@ public:
|
||||
// be updated.
|
||||
void registerActions(QAction *editorUndoAction, QAction *editorRedoAction,
|
||||
QAction *submitAction = nullptr, QAction *diffAction = nullptr);
|
||||
void unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction,
|
||||
QAction *submitAction = nullptr, QAction *diffAction = nullptr);
|
||||
|
||||
QString descriptionText() const;
|
||||
void setDescriptionText(const QString &text);
|
||||
|
@@ -310,13 +310,6 @@ void VcsBaseSubmitEditor::registerActions(QAction *editorUndoAction, QAction *ed
|
||||
d->m_submitAction = submitAction;
|
||||
}
|
||||
|
||||
void VcsBaseSubmitEditor::unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction,
|
||||
QAction *submitAction, QAction *diffAction)
|
||||
{
|
||||
d->m_widget->unregisterActions(editorUndoAction, editorRedoAction, submitAction, diffAction);
|
||||
d->m_diffAction = d->m_submitAction = 0;
|
||||
}
|
||||
|
||||
QAbstractItemView::SelectionMode VcsBaseSubmitEditor::fileListSelectionMode() const
|
||||
{
|
||||
return d->m_widget->fileListSelectionMode();
|
||||
|
@@ -74,8 +74,6 @@ public:
|
||||
// Register the actions with the submit editor widget.
|
||||
void registerActions(QAction *editorUndoAction, QAction *editorRedoAction,
|
||||
QAction *submitAction = nullptr, QAction *diffAction = nullptr);
|
||||
void unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction,
|
||||
QAction *submitAction = nullptr, QAction *diffAction = nullptr);
|
||||
|
||||
~VcsBaseSubmitEditor() override;
|
||||
|
||||
|
Reference in New Issue
Block a user