QmlJS: Rename Interpreter::Engine -> ValueOwner

Also move to a separate file.

Change-Id: I05910e8cf04a533b5d09a1c16e612e3b99b1d606
Reviewed-on: http://codereview.qt.nokia.com/1039
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Christian Kamm
2011-07-01 12:11:02 +02:00
parent 852d84dae5
commit 8b778b266b
19 changed files with 1291 additions and 1186 deletions

View File

@@ -612,7 +612,7 @@ IAssistProposal *QmlJSCompletionAssistProcessor::perform(const IAssistInterface
if (expression != 0 && ! isLiteral(expression)) {
// Evaluate the expression under cursor.
Interpreter::Engine *interp = lookupContext->engine();
Interpreter::ValueOwner *interp = lookupContext->valueOwner();
const Interpreter::Value *value =
interp->convertToObject(lookupContext->evaluate(expression));
//qDebug() << "type:" << interp.typeId(value);

View File

@@ -39,6 +39,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/helpmanager.h>
#include <extensionsystem/pluginmanager.h>
#include <qmljs/qmljsvalueowner.h>
#include <qmljs/qmljsinterpreter.h>
#include <qmljs/parser/qmljsast_p.h>
#include <qmljs/parser/qmljsastfwd_p.h>
@@ -290,7 +291,7 @@ void HoverHandler::prettyPrintTooltip(const QmlJS::Interpreter::Value *value,
}
if (toolTip().isEmpty()) {
QString typeId = context->engine()->typeId(value);
QString typeId = context->valueOwner()->typeId(value);
if (typeId != QLatin1String("undefined"))
setToolTip(typeId);
}

View File

@@ -34,6 +34,7 @@
#include "qmljseditor.h"
#include <qmljs/parser/qmljsastvisitor_p.h>
#include <qmljs/qmljsvalueowner.h>
#include <qmljs/qmljsinterpreter.h>
#include <qmljs/qmljslookupcontext.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
@@ -111,7 +112,7 @@ QString QmlOutlineItem::prettyPrint(const Interpreter::Value *value, const Inter
}
}
const QString typeId = context->engine()->typeId(value);
const QString typeId = context->valueOwner()->typeId(value);
if (typeId == QLatin1String("undefined")) {
return QString();
}