diff options
author | mae <qt-info@nokia.com> | 2009-09-29 12:44:00 +0200 |
---|---|---|
committer | mae <qt-info@nokia.com> | 2009-09-29 12:46:04 +0200 |
commit | 0ed9043c343e537c9606fc298e8fddbfbe849899 (patch) | |
tree | c8501dc4b2cf712dbdedb414fa80d5173b3e56a5 /src/plugins/texteditor/tabsettings.h | |
parent | b1f5a40ee24e499bc46cdfe33a036ca3974b16d9 (diff) | |
download | qt-creator-0ed9043c343e537c9606fc298e8fddbfbe849899.tar.gz |
tune auto-indentation of pasted text
auto-indentation of pasted text now only happens when complete
lines including a trailing paragraph separator are copied and pasted.
In addition, the reindent() functions ensures that the relative indentation
within the pasted block is preserved. This mechanism is now also used for
moving lines up/down.
Done with thorbjorn
Diffstat (limited to 'src/plugins/texteditor/tabsettings.h')
-rw-r--r-- | src/plugins/texteditor/tabsettings.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/texteditor/tabsettings.h b/src/plugins/texteditor/tabsettings.h index f26e0bb5ad..ad6c1cd6d8 100644 --- a/src/plugins/texteditor/tabsettings.h +++ b/src/plugins/texteditor/tabsettings.h @@ -66,7 +66,10 @@ struct TEXTEDITOR_EXPORT TabSettings QString indentationString(const QString &text) const; int indentationColumn(const QString &text) const; + bool cursorIsAtBeginningOfLine(const QTextCursor &cursor) const; + void indentLine(QTextBlock block, int newIndent) const; + void reindentLine(QTextBlock block, int delta) const; int trailingWhitespaces(const QString &text) const; bool isIndentationClean(const QString &text) const; |