aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/textdocument.h
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2019-01-28 08:11:20 +0100
committerIvan Donchevskii <ivan.donchevskii@qt.io>2019-01-31 10:25:18 +0000
commit1dee275f58e9f9df2e2719325157cfdec42fe1cf (patch)
treeb5d3480d9484a9d0347de6d3d8219f31d70b602e /src/plugins/texteditor/textdocument.h
parent80fb0178fdd9ee82acfb22aa512c7514868e89d1 (diff)
ClangFormat: Add cursor position to the indenter interface
Sometimes it's imnportant where the cursor currently is to properly format the code without affecting the current line. Change-Id: I8b1fb11d2303adb5f960c7cb80a0ed2e6e45010f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'src/plugins/texteditor/textdocument.h')
-rw-r--r--src/plugins/texteditor/textdocument.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/texteditor/textdocument.h b/src/plugins/texteditor/textdocument.h
index f71922f2d2..b7c771e748 100644
--- a/src/plugins/texteditor/textdocument.h
+++ b/src/plugins/texteditor/textdocument.h
@@ -87,8 +87,10 @@ public:
void setIndenter(Indenter *indenter);
Indenter *indenter() const;
- void autoIndent(const QTextCursor &cursor, QChar typedChar = QChar::Null);
- void autoReindent(const QTextCursor &cursor);
+ void autoIndent(const QTextCursor &cursor,
+ QChar typedChar = QChar::Null,
+ int currentCursorPosition = -1);
+ void autoReindent(const QTextCursor &cursor, int currentCursorPosition = -1);
void autoFormatOrIndent(const QTextCursor &cursor);
QTextCursor indent(const QTextCursor &cursor, bool blockSelection = false, int column = 0,
int *offset = nullptr);