summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/tabsettings.h
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2009-09-29 12:44:00 +0200
committermae <qt-info@nokia.com>2009-09-29 12:46:04 +0200
commit0ed9043c343e537c9606fc298e8fddbfbe849899 (patch)
treec8501dc4b2cf712dbdedb414fa80d5173b3e56a5 /src/plugins/texteditor/tabsettings.h
parentb1f5a40ee24e499bc46cdfe33a036ca3974b16d9 (diff)
downloadqt-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.h3
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;