summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/texteditoractionhandler.h
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2012-03-27 23:18:46 +0400
committerhjk <qthjk@ovi.com>2012-03-28 08:38:41 +0200
commit7ae82b9f9453251861394ce9bec95d704353f83b (patch)
tree2bfc313abb7e1b0570664d2b9c976c362bdb74e5 /src/plugins/texteditor/texteditoractionhandler.h
parentaa722e6a608d04a943267514f1f043e37b19e874 (diff)
downloadqt-creator-7ae82b9f9453251861394ce9bec95d704353f83b.tar.gz
Added TextEditor commands FollowSymbol and JumpToFile.
Most of editors have "jump to file" or "follow symbol" actions. This patch reduces amount of related boilerplate code. New actions are made optional to prevent shortcut clash (both use F2). Change-Id: I2af580ed9d6789df25f4487ba001f3b83887c504 Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/texteditor/texteditoractionhandler.h')
-rw-r--r--src/plugins/texteditor/texteditoractionhandler.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/texteditor/texteditoractionhandler.h b/src/plugins/texteditor/texteditoractionhandler.h
index d0a41e0e74..27f0d485ca 100644
--- a/src/plugins/texteditor/texteditoractionhandler.h
+++ b/src/plugins/texteditor/texteditoractionhandler.h
@@ -63,7 +63,9 @@ public:
None = 0,
Format = 1,
UnCommentSelection = 2,
- UnCollapseAll = 4
+ UnCollapseAll = 4,
+ FollowSymbolUnderCursor = 8,
+ JumpToFileUnderCursor = 16
};
explicit TextEditorActionHandler(const char *context, uint optionalActions = None);
@@ -141,6 +143,7 @@ private slots:
void updateCurrentEditor(Core::IEditor *editor);
void indent();
void unindent();
+ void openLinkUnderCursor();
void gotoLineStart();
void gotoLineStartWithSelection();
@@ -212,6 +215,8 @@ private:
QAction *m_lowerCaseSelectionAction;
QAction *m_indentAction;
QAction *m_unindentAction;
+ QAction *m_followSymbolAction;
+ QAction *m_jumpToFileAction;
QList<QAction *> m_modifyingActions;
uint m_optionalActions;