From c358a68557b421ff823a7f9ddb064691482acbe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= <thorbjorn.lindeijer@nokia.com> Date: Tue, 26 May 2009 12:01:57 +0200 Subject: [PATCH] Do still pass the typed character to the indenter Some indenters need this information. If the C++ indenter misbehaves based on the typed character, then that should be fixed there. This reverts part of commit 4c07de50b2347bc876c7fe60eb7e82f20d273f4b. Reviewed-by: Roberto Raggi --- src/plugins/texteditor/basetexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index eac61f480a0..6dca8ee169a 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -992,7 +992,7 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e) QTextCursor cursor = textCursor(); const QString text = e->text(); cursor.insertText(text); - indent(document(), cursor, QChar::Null); + indent(document(), cursor, text.at(0)); #if 0 TextEditDocumentLayout *documentLayout = qobject_cast<TextEditDocumentLayout*>(document()->documentLayout()); QTC_ASSERT(documentLayout, return); -- GitLab