diff options
| author | Sergey Shambir <sergey.shambir.auto@gmail.com> | 2012-07-10 20:30:31 +0400 |
|---|---|---|
| committer | Eike Ziller <eike.ziller@nokia.com> | 2012-07-17 10:19:43 +0200 |
| commit | edabcb40faceca2b3dfd2ebc4e1ce5e6ac02c7c5 (patch) | |
| tree | bbda4635224149b1bc3c45ce74a0e0e530278d92 /src/plugins/cpptools/cppcompletionassist.cpp | |
| parent | f43c02d12f1ae70ef5af7eb0445c7f6b508c3277 (diff) | |
| download | qt-creator-edabcb40faceca2b3dfd2ebc4e1ce5e6ac02c7c5.tar.gz | |
Added tooltips on completions proposals
Change-Id: Ic22b99e25159edfa4977e13c98f334ce75809af7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/cpptools/cppcompletionassist.cpp')
| -rw-r--r-- | src/plugins/cpptools/cppcompletionassist.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp index 5e4e3d1e86..4eaafc6e30 100644 --- a/src/plugins/cpptools/cppcompletionassist.cpp +++ b/src/plugins/cpptools/cppcompletionassist.cpp @@ -536,7 +536,10 @@ public: ConvertToCompletionItem() : _item(0) , _symbol(0) - { } + { + overview.setShowReturnTypes(true); + overview.setShowArgumentNames(true); + } BasicProposalItem *operator()(Symbol *symbol) { @@ -575,7 +578,12 @@ protected: } virtual void visit(const Identifier *name) - { _item = newCompletionItem(name); } + { + _item = newCompletionItem(name); + if (!_symbol->isScope() || _symbol->isFunction()) { + _item->setDetail(overview.prettyType(_symbol->type(), name)); + } + } virtual void visit(const TemplateNameId *name) { @@ -587,7 +595,10 @@ protected: { _item = newCompletionItem(name); } virtual void visit(const OperatorNameId *name) - { _item = newCompletionItem(name); } + { + _item = newCompletionItem(name); + _item->setDetail(overview.prettyType(_symbol->type(), name)); + } virtual void visit(const ConversionNameId *name) { _item = newCompletionItem(name); } |
