Commit 7aa075c7 authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Remove soft assert that could trigger for multi-line strings.



Change-Id: I54f451677d78d6aefe0f567888b9bbcec426fc72
Reviewed-by: default avatarChristian Kamm <christian.d.kamm@nokia.com>
parent 09cf26eb
...@@ -571,9 +571,15 @@ IAssistProposal *QmlJSCompletionAssistProcessor::perform(const IAssistInterface ...@@ -571,9 +571,15 @@ IAssistProposal *QmlJSCompletionAssistProcessor::perform(const IAssistInterface
QmlExpressionUnderCursor expressionUnderCursor; QmlExpressionUnderCursor expressionUnderCursor;
expressionUnderCursor(tc); expressionUnderCursor(tc);
QString literalText = expressionUnderCursor.text(); QString literalText = expressionUnderCursor.text();
QTC_ASSERT(!literalText.isEmpty() && (
literalText.at(0) == QLatin1Char('"') // expression under cursor only looks at one line, so multi-line strings
|| literalText.at(0) == QLatin1Char('\'')), return 0); // are handled incorrectly and are recognizable by don't starting with ' or "
if (!literalText.isEmpty()
&& literalText.at(0) != QLatin1Char('"')
&& literalText.at(0) != QLatin1Char('\'')) {
return 0;
}
literalText = literalText.mid(1); literalText = literalText.mid(1);
if (contextFinder.isInImport()) { if (contextFinder.isInImport()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment