forked from qt-creator/qt-creator
Editor: enable optional actions per editor
Use an additional action mask to enable actions like find usage and rename symbol per editor instance. Change-Id: Iabee1820d0f3c156ad30ba760bfce9f6181045e6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -628,6 +628,7 @@ public:
|
||||
QComboBox *m_fileLineEnding = nullptr;
|
||||
QAction *m_fileLineEndingAction = nullptr;
|
||||
|
||||
uint m_optionalActionMask = TextEditorActionHandler::None;
|
||||
bool m_contentsChanged = false;
|
||||
bool m_lastCursorChangeWasInteresting = false;
|
||||
|
||||
@@ -7827,6 +7828,16 @@ void TextEditorWidget::appendStandardContextMenuActions(QMenu *menu)
|
||||
}
|
||||
}
|
||||
|
||||
uint TextEditorWidget::optionalActionMask()
|
||||
{
|
||||
return d->m_optionalActionMask;
|
||||
}
|
||||
|
||||
void TextEditorWidget::addOptionalActions(uint optionalActionMask)
|
||||
{
|
||||
d->m_optionalActionMask |= optionalActionMask;
|
||||
emit optionalActionMaskChanged();
|
||||
}
|
||||
|
||||
BaseTextEditor::BaseTextEditor()
|
||||
: d(new BaseTextEditorPrivate)
|
||||
|
||||
Reference in New Issue
Block a user