forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.7'
Change-Id: I762dbddb0f337e9a5fc4b113c7876813e9f45c9c
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user