forked from qt-creator/qt-creator
VCS: Replace QToolButtons in VCS toolbar with QActions
Change VcsBaseEditorParameterWidget to add actions/widgets to an existing toolbar, instead of being a widget itself. The class is renamed in a follow-up commit. Task-number: QTCREATORBUG-14934 Change-Id: I473a439d12a096f4cbb64f06faa0598ee72000de Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
6cd68d5401
commit
2c6adc1e74
@@ -565,7 +565,7 @@ public:
|
||||
QString m_annotateRevisionTextFormat;
|
||||
QString m_annotatePreviousRevisionTextFormat;
|
||||
QString m_copyRevisionTextFormat;
|
||||
VcsBaseEditorParameterWidget *m_configurationWidget = nullptr;
|
||||
bool m_configurationAdded = false;
|
||||
QList<AbstractTextCursorHandler *> m_textCursorHandlers;
|
||||
QPointer<VcsCommand> m_command;
|
||||
QObject *m_describeReceiver = nullptr;
|
||||
@@ -1390,20 +1390,14 @@ QString VcsBaseEditor::getTitleId(const QString &workingDirectory,
|
||||
return rc;
|
||||
}
|
||||
|
||||
bool VcsBaseEditorWidget::setConfigurationWidget(VcsBaseEditorParameterWidget *w)
|
||||
void VcsBaseEditorWidget::setConfigurationAdded()
|
||||
{
|
||||
if (d->m_configurationWidget)
|
||||
return false;
|
||||
|
||||
d->m_configurationWidget = w;
|
||||
insertExtraToolBarWidget(TextEditorWidget::Right, w);
|
||||
|
||||
return true;
|
||||
d->m_configurationAdded = true;
|
||||
}
|
||||
|
||||
VcsBaseEditorParameterWidget *VcsBaseEditorWidget::configurationWidget() const
|
||||
bool VcsBaseEditorWidget::configurationAdded() const
|
||||
{
|
||||
return d->m_configurationWidget;
|
||||
return d->m_configurationAdded;
|
||||
}
|
||||
|
||||
void VcsBaseEditorWidget::setCommand(VcsCommand *command)
|
||||
|
||||
Reference in New Issue
Block a user