QmlDesigner.metaInfo: replace old NodeMetaInfo with new implementation

The new implementation is based on the QmlJS::Interpreter
meta info system and gets its info from parsing qml and qmldumper
instead of interogating QDeclarative classes.

So we share this code with the Qml TextEditor and this approach is also
way more flexible. It also work with different Qt versions.

The meta info is now bound to a document/rewriter.

The api has changed slightly.

subComponentManager: cleanup
The SubComponentManager does not have to provide meta info, anymore.

propertyParser: cleanup
Enums were never properly converted. here.

metaInfo: remove old MetaInfo classes
Removing the old MetaInfo classes and code
This commit is contained in:
Thomas Hartmann
2010-12-01 16:51:32 +01:00
parent 9055cd3e73
commit 98eee9db6b
32 changed files with 934 additions and 2051 deletions

View File

@@ -625,7 +625,7 @@ void DesignDocumentController::paste()
int offset = double(qrand()) / RAND_MAX * 20 - 10;
foreach (const ModelNode &node, selectedNodes) {
QString defaultProperty(targetNode.metaInfo().defaultProperty());
QString defaultProperty(targetNode.metaInfo().defaultPropertyName());
ModelNode pastedNode(view.insertModel(node));
pastedNodeList.append(pastedNode);
scatterItem(pastedNode, targetNode, offset);
@@ -658,7 +658,7 @@ void DesignDocumentController::paste()
targetNode = targetNode.parentProperty().parentModelNode();
QString defaultProperty(targetNode.metaInfo().defaultProperty());
QString defaultProperty(targetNode.metaInfo().defaultPropertyName());
scatterItem(pastedNode, targetNode);
if (targetNode.nodeListProperty(defaultProperty).isValid()) {