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
Tobias Hunger
qt-creator
Commits
d018cfd5
Commit
d018cfd5
authored
Feb 09, 2009
by
Roberto Raggi
Browse files
Fixes: Possible crash when completing a function with (void) argument.
parent
0504fdd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppcodecompletion.cpp
View file @
d018cfd5
...
...
@@ -1113,7 +1113,8 @@ void CppCodeCompletion::complete(const TextEditor::CompletionItem &item)
toInsert
.
append
(
QLatin1Char
(
'('
));
// If the function takes no arguments, automatically place the closing parenthesis
if
(
function
->
argumentCount
()
==
0
||
(
function
->
argumentCount
()
==
1
&&
if
(
function
->
argumentCount
()
==
0
||
(
function
->
argumentCount
()
==
1
&&
function
->
argumentAt
(
0
)
->
type
()
&&
function
->
argumentAt
(
0
)
->
type
()
->
isVoidType
()))
{
toInsert
.
append
(
QLatin1Char
(
')'
));
...
...
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