forked from qt-creator/qt-creator
TextEditor: Introduce shortcut for forcing a function hint proposal
... and support it in the ClangCodeModel. This allows users to get function signature(s) displayed regardless of where exactly the cursor is on the function call. Fixes: QTCREATORBUG-19394 Change-Id: I033e8774db93680bfc3ee52610b817e0ef8ccc76 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1017,8 +1017,11 @@ void CppEditorWidget::updateSemanticInfo(const SemanticInfo &semanticInfo,
|
||||
|
||||
AssistInterface *CppEditorWidget::createAssistInterface(AssistKind kind, AssistReason reason) const
|
||||
{
|
||||
if (kind == Completion) {
|
||||
if (CppCompletionAssistProvider *cap = cppEditorDocument()->completionAssistProvider()) {
|
||||
if (kind == Completion || kind == FunctionHint) {
|
||||
CppCompletionAssistProvider * const cap = kind == Completion
|
||||
? cppEditorDocument()->completionAssistProvider()
|
||||
: cppEditorDocument()->functionHintAssistProvider();
|
||||
if (cap) {
|
||||
LanguageFeatures features = LanguageFeatures::defaultFeatures();
|
||||
if (Document::Ptr doc = d->m_lastSemanticInfo.doc)
|
||||
features = doc->languageFeatures();
|
||||
|
||||
Reference in New Issue
Block a user