QmlJSEditor: Move outline model to document

Also the updating of the model is now done only once in the document,
and delayed till an editor is visible if necessary.

Change-Id: I69b1abebc2b691b37a618db7d1f5ebbbc8e75bca
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Eike Ziller
2014-01-30 17:18:35 +01:00
parent 1e6bc2758d
commit 58b717fbb8
5 changed files with 60 additions and 50 deletions

View File

@@ -40,6 +40,7 @@ namespace QmlJSEditor {
namespace Internal {
class QmlJSEditorDocumentPrivate;
class QmlOutlineModel;
class QmlJSEditorDocument : public TextEditor::BaseTextDocument
{
@@ -52,6 +53,7 @@ public:
bool isSemanticInfoOutdated() const;
QVector<QTextLayout::FormatRange> diagnosticRanges() const;
void setDiagnosticRanges(const QVector<QTextLayout::FormatRange> &ranges);
Internal::QmlOutlineModel *outlineModel() const;
signals:
void updateCodeWarnings(QmlJS::Document::Ptr doc);