forked from qt-creator/qt-creator
TextEditor: Fix default context menu
Text editor implementations that did not do anything special with invoking their context menu, including our plain text editor, only had Qt's default context menu, without Qt Creator's clipboard history and BOM actions. Make the default actions in our custom context menu more similar to Qt's default actions by adding Undo, Redo and Select All, and not hiding disabled actions, and use that by default in all text editor implementations. Change-Id: Idd5fb276dcd652223d96536dacde8110f9eb576f Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -476,6 +476,7 @@ protected:
|
||||
QTextBlock blockForVisibleRow(int row) const;
|
||||
QTextBlock blockForVerticalOffset(int offset) const;
|
||||
bool event(QEvent *e) override;
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
void inputMethodEvent(QInputMethodEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
void wheelEvent(QWheelEvent *e) override;
|
||||
|
||||
Reference in New Issue
Block a user