QmlJSEditor: Move ownership of QmlJSTextMarks to document

Task-number: QTCREATORBUG-19607
Change-Id: I65fa11b43dcbe3c28ab100a1636ad592cfff5a4d
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2018-01-22 10:45:04 +01:00
parent 63e47f903f
commit f9c959cee2
4 changed files with 69 additions and 70 deletions

View File

@@ -32,6 +32,8 @@
#include <QTextLayout>
#include <QTimer>
namespace TextEditor { class TextMark; }
namespace QmlJSEditor {
class QmlJSEditorDocument;
@@ -57,6 +59,11 @@ public:
void acceptNewSemanticInfo(const QmlJSTools::SemanticInfo &semanticInfo);
void updateOutlineModel();
void createTextMarks(const QList<QmlJS::DiagnosticMessage> &diagnostics);
void cleanDiagnosticMarks();
void createTextMarks(const QmlJSTools::SemanticInfo &info);
void cleanSemanticMarks();
public:
QmlJSEditorDocument *q = nullptr;
QTimer m_updateDocumentTimer; // used to compress multiple document changes
@@ -71,6 +78,8 @@ public:
bool m_firstSementicInfo = true;
QTimer m_updateOutlineModelTimer;
Internal::QmlOutlineModel *m_outlineModel = nullptr;
QVector<TextEditor::TextMark *> m_diagnosticMarks;
QVector<TextEditor::TextMark *> m_semanticMarks;
};
} // Internal