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
0145a3de
Commit
0145a3de
authored
Dec 12, 2008
by
Roberto Raggi
Browse files
Look at the signed/unsigned specifiers when checking function return types.
parent
aed481de
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppcodecompletion.cpp
View file @
0145a3de
...
...
@@ -966,8 +966,10 @@ void CppCodeCompletion::complete(const TextEditor::CompletionItem &item)
if
(
Function
*
function
=
symbol
->
type
()
->
asFunction
())
{
// If the member is a function, automatically place the opening parenthesis,
// except when it might take template parameters.
if
(
!
function
->
returnType
().
isValid
()
&&
(
function
->
identity
()
&&
!
function
->
identity
()
->
isDestructorNameId
()))
{
const
bool
hasReturnType
=
function
->
returnType
().
isValid
()
||
function
->
returnType
().
isSigned
()
||
function
->
returnType
().
isUnsigned
();
if
(
!
hasReturnType
&&
(
function
->
identity
()
&&
!
function
->
identity
()
->
isDestructorNameId
()))
{
// Don't insert any magic, since the user might have just wanted to select the class
}
else
if
(
function
->
templateParameterCount
()
!=
0
)
{
...
...
Write
Preview
Markdown
is supported
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