QmlJS: Refactor LookupContext creation for speed.

* If possible, create LookupContexts through SemanticInfo; it caches the
  linked Context and will be faster.
* Contexts now own their Engine.

Reviewed-by: Lasse Holmstedt
This commit is contained in:
Christian Kamm
2010-08-26 10:50:00 +02:00
parent af46c3d947
commit 87e04df257
15 changed files with 141 additions and 96 deletions

View File

@@ -30,8 +30,8 @@ class QuickToolBar : public QmlJS::IContextPane
public:
QuickToolBar(QObject *parent = 0);
~QuickToolBar();
void apply(TextEditor::BaseTextEditorEditable *editor, QmlJS::Document::Ptr doc, const QmlJS::Snapshot &snapshot, QmlJS::AST::Node *node, bool update, bool force = 0);
bool isAvailable(TextEditor::BaseTextEditorEditable *editor, QmlJS::Document::Ptr doc, const QmlJS::Snapshot &snapshot, QmlJS::AST::Node *node);
void apply(TextEditor::BaseTextEditorEditable *editor, QmlJS::LookupContext::Ptr lookupContext, QmlJS::AST::Node *node, bool update, bool force = 0);
bool isAvailable(TextEditor::BaseTextEditorEditable *editor, QmlJS::LookupContext::Ptr lookupContext, QmlJS::AST::Node *node);
void setProperty(const QString &propertyName, const QVariant &value);
void removeProperty(const QString &propertyName);
void setEnabled(bool);