forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.6' into 4.7
Change-Id: I5ffa9febea2ced10892a145aa0b930d45d84aea5
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