forked from qt-creator/qt-creator
Added Insert Line Above/Below actions to BaseTextEditor
The actions perform exactly like their counterparts in Eclipse: a new, indented line is inserted above or below the current line and the text cursor is moved to the start of the new line. The line where the cursor was before the action was triggered remains unchanged. The shortcuts are also like in Eclipse: "Ctrl+Shift+Return" inserts a line above the current, "Shift+Return" inserts a line below the current. Merge-request: 140 Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
This commit is contained in:
committed by
Thorbjørn Lindeijer
parent
b61e656493
commit
32ab9878fe
@@ -116,6 +116,8 @@ private slots:
|
||||
void copyLineUp();
|
||||
void copyLineDown();
|
||||
void joinLines();
|
||||
void insertLineAbove();
|
||||
void insertLineBelow();
|
||||
void updateCurrentEditor(Core::IEditor *editor);
|
||||
|
||||
private:
|
||||
@@ -153,6 +155,8 @@ private:
|
||||
QAction *m_copyLineUpAction;
|
||||
QAction *m_copyLineDownAction;
|
||||
QAction *m_joinLinesAction;
|
||||
QAction *m_insertLineAboveAction;
|
||||
QAction *m_insertLineBelowAction;
|
||||
|
||||
uint m_optionalActions;
|
||||
QPointer<BaseTextEditor> m_currentEditor;
|
||||
|
||||
Reference in New Issue
Block a user