diff options
| author | David Schulz <david.schulz@qt.io> | 2021-01-22 09:53:50 +0100 |
|---|---|---|
| committer | David Schulz <david.schulz@qt.io> | 2021-01-26 05:41:40 +0000 |
| commit | 71c2443bb0a7f4b75a6798e05f1d60de50ffc613 (patch) | |
| tree | 2de2f1ba224b1e484593b2564618b8b7c1bda6f1 /src/plugins/languageclient/languageclientfunctionhint.cpp | |
| parent | c5ba98b0edb5cc9b2e78f3ea16a5acbd784fd1e2 (diff) | |
| download | qt-creator-71c2443bb0a7f4b75a6798e05f1d60de50ffc613.tar.gz | |
LanguageClient: Fix dynamic registered signature help
Change-Id: Ie7427f4a0aede5c933995610d03791e837ad39e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/languageclient/languageclientfunctionhint.cpp')
| -rw-r--r-- | src/plugins/languageclient/languageclientfunctionhint.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/languageclient/languageclientfunctionhint.cpp b/src/plugins/languageclient/languageclientfunctionhint.cpp index 41de7a2f80..076bd44cf0 100644 --- a/src/plugins/languageclient/languageclientfunctionhint.cpp +++ b/src/plugins/languageclient/languageclientfunctionhint.cpp @@ -149,10 +149,11 @@ bool FunctionHintAssistProvider::isContinuationChar(const QChar &/*c*/) const return true; } -void FunctionHintAssistProvider::setTriggerCharacters(QList<QString> triggerChars) +void FunctionHintAssistProvider::setTriggerCharacters( + const Utils::optional<QList<QString>> &triggerChars) { - m_triggerChars = triggerChars; - for (const QString &trigger : triggerChars) { + m_triggerChars = triggerChars.value_or(QList<QString>()); + for (const QString &trigger : qAsConst(m_triggerChars)) { if (trigger.length() > m_activationCharSequenceLength) m_activationCharSequenceLength = trigger.length(); } |
