Merge remote-tracking branch 'origin/4.6' into 4.7

Change-Id: I5ffa9febea2ced10892a145aa0b930d45d84aea5
This commit is contained in:
Eike Ziller
2018-06-11 14:31:54 +02:00

View File

@@ -595,6 +595,10 @@ void QmlJSEditorDocumentPrivate::updateOutlineModel()
static void cleanMarks(QVector<TextEditor::TextMark *> *marks, TextEditor::TextDocument *doc)
{
// if doc is null, this method is improperly called, so better do nothing that leave an
// inconsistent state where marks are cleared but not removed from doc.
if (!marks || !doc)
return;
for (TextEditor::TextMark *mark : *marks) {
doc->removeMark(mark);
delete mark;