Skip to content
GitLab
Menu
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
ddfd46b3
Commit
ddfd46b3
authored
Dec 11, 2008
by
mae
Browse files
nicer (un)comment selection, avoid C-style selections when you can do C++ style.
parent
6adb3f61
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
ddfd46b3
...
...
@@ -744,7 +744,8 @@ void CPPEditor::unCommentSelection()
QString
endText
=
endBlock
.
text
();
int
endPos
=
end
-
endBlock
.
position
();
bool
hasTrailingCharacters
=
!
endText
.
mid
(
endPos
).
trimmed
().
isEmpty
();
bool
hasTrailingCharacters
=
!
endText
.
left
(
endPos
).
remove
(
QLatin1String
(
"//"
)).
trimmed
().
isEmpty
()
&&
!
endText
.
mid
(
endPos
).
trimmed
().
isEmpty
();
if
((
endPos
<=
endText
.
length
()
-
2
&&
endText
.
at
(
endPos
)
==
QLatin1Char
(
'*'
)
&&
endText
.
at
(
endPos
+
1
)
==
QLatin1Char
(
'/'
)))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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