Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
37565602
Commit
37565602
authored
Jul 06, 2010
by
Christian Kamm
Browse files
C++ editor: Put the changes for indenting a selection in an edit block.
Reviewed-by: Roberto Raggi
parent
e086c67e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
37565602
...
...
@@ -1563,11 +1563,14 @@ void CPPEditor::indent(QTextDocument *doc, const QTextCursor &cursor, QChar type
CppTools
::
QtStyleCodeFormatter
codeFormatter
=
setupCodeFormatter
(
ts
);
codeFormatter
.
updateStateUntil
(
block
);
QTextCursor
tc
=
textCursor
();
tc
.
beginEditBlock
();
do
{
ts
.
indentLine
(
block
,
codeFormatter
.
indentFor
(
block
));
codeFormatter
.
updateLineStateChange
(
block
);
block
=
block
.
next
();
}
while
(
block
.
isValid
()
&&
block
!=
end
);
tc
.
endEditBlock
();
}
else
{
indentBlock
(
doc
,
cursor
.
block
(),
typedChar
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment