Refactored the QML/JS completer

This commit is contained in:
Roberto Raggi
2010-01-24 14:27:20 +01:00
parent 659b2a7ee3
commit feab07de81
3 changed files with 71 additions and 30 deletions

View File

@@ -1400,9 +1400,6 @@ void Engine::initializePrototypes()
const ObjectValue *Engine::newQmlObject(const QString &name)
{
if (const ObjectValue *object = _qmlObjects.value(name))
return object;
#ifndef NO_DECLARATIVE_BACKEND
if (name == QLatin1String("QmlGraphicsAnchors")) {
QmlObjectValue *object = new QmlObjectValue(&QmlGraphicsAnchors::staticMetaObject, this);
@@ -1418,7 +1415,6 @@ const ObjectValue *Engine::newQmlObject(const QString &name)
if (QmlType *qmlType = QmlMetaType::qmlType(componentName.toUtf8(), 4, 6)) {
QmlObjectValue *object = new QmlObjectValue(qmlType->metaObject(), this);
_qmlObjects.insert(name, object);
_objects.append(object);
return object;
}

View File

@@ -502,7 +502,6 @@ private:
BooleanValue _booleanValue;
StringValue _stringValue;
QList<ObjectValue *> _objects;
QHash<QString, const ObjectValue *> _qmlObjects;
ConvertToNumber _convertToNumber;
ConvertToString _convertToString;