diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2008-12-12 10:40:25 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2008-12-12 10:40:25 +0100 |
commit | 0145a3dea966df75afbf5c85c824d37795ad645c (patch) | |
tree | 6f30c196e2d5c1071eebdee2f2cdaa3a12e1d04a /src/plugins/cpptools/cppcodecompletion.cpp | |
parent | aed481dec8e7b666b1ff999639fed9a1632149a0 (diff) | |
download | qt-creator-0145a3dea966df75afbf5c85c824d37795ad645c.tar.gz |
Look at the signed/unsigned specifiers when checking function return types.
Diffstat (limited to 'src/plugins/cpptools/cppcodecompletion.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcodecompletion.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index a0fbe82a54..addf5301f7 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -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) { |