MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / handleAutoRequestTrigger

Method handleAutoRequestTrigger

QodeAssistClient.cpp:682–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680}
681
682void QodeAssistClient::handleAutoRequestTrigger(TextEditor::TextEditorWidget *widget)
683{
684 const QTextCursor cursor = widget->textCursor();
685 const auto &settings = Settings::codeCompletionSettings();
686 const bool smart = settings.smartContextTrigger();
687
688 if (smart && (isInsideIdentifier(cursor) || isAfterMemberAccess(cursor)))
689 return;
690
691 const bool eager = smart && (isFreshIndentedLine(cursor) || isAfterEagerTrigger(cursor));
692 const int charThreshold = settings.autoCompletionCharThreshold();
693
694 if (eager || m_recentCharCount > charThreshold)
695 scheduleRequest(widget);
696}
697
698bool QodeAssistClient::eventFilter(QObject *watched, QEvent *event)
699{

Callers

nothing calls this directly

Calls 4

isInsideIdentifierFunction · 0.85
isAfterMemberAccessFunction · 0.85
isFreshIndentedLineFunction · 0.85
isAfterEagerTriggerFunction · 0.85

Tested by

no test coverage detected