forked from qt-creator/qt-creator
QmlJS: Remove soft assert that could trigger for multi-line strings.
Change-Id: I54f451677d78d6aefe0f567888b9bbcec426fc72 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
@@ -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()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user