diff --git a/src/plugins/qmleditor/qmlhoverhandler.cpp b/src/plugins/qmleditor/qmlhoverhandler.cpp index b34bec450a86d4f7ec879828b4f8b29668024ebf..4c155a571fbdeb29e12838566a72971ab2ce7f4f 100644 --- a/src/plugins/qmleditor/qmlhoverhandler.cpp +++ b/src/plugins/qmleditor/qmlhoverhandler.cpp @@ -132,7 +132,7 @@ static QString buildHelpId(QmlSymbol *symbol) if (!symbol) return QString(); - const QString idTemplate(QLatin1String("QML %1 Element Reference")); + const QString idTemplate(QLatin1String("QML.%1")); return idTemplate.arg(symbol->name()); } diff --git a/src/plugins/qmleditor/qmllookupcontext.cpp b/src/plugins/qmleditor/qmllookupcontext.cpp index f846f19403cd789fa05ebea9ae2f9ea1661e1aef..5cd065bff66d727fff81bd531091b8846f610746 100644 --- a/src/plugins/qmleditor/qmllookupcontext.cpp +++ b/src/plugins/qmleditor/qmllookupcontext.cpp @@ -110,9 +110,91 @@ QmlSymbol *QmlLookupContext::resolveType(const QString &name, const QString &fil return resolveBuildinType(name); } +// FIXME: use a REAL mete-type system here! +static QSet<QString> qmlMetaTypes = QSet<QString>() + << QLatin1String("AnchorChanges") + << QLatin1String("AnimatedImage") + << QLatin1String("Animation") + << QLatin1String("Behavior") + << QLatin1String("Binding") + << QLatin1String("BorderImage") + << QLatin1String("ColorAnimation") + << QLatin1String("Column") + << QLatin1String("Component") + << QLatin1String("Connection") + << QLatin1String("DateTimeFormatter") + << QLatin1String("EaseFollow") + << QLatin1String("Flickable") + << QLatin1String("Flipable") + << QLatin1String("FocusPanel") + << QLatin1String("FocusScope") + << QLatin1String("FolderListModel") + << QLatin1String("FontLoader") + << QLatin1String("Gradient") + << QLatin1String("GradientStop") + << QLatin1String("GraphicsObjectContainer") + << QLatin1String("Grid") + << QLatin1String("GridView") + << QLatin1String("Image") + << QLatin1String("Item") + << QLatin1String("KeyEvent") + << QLatin1String("Keys") + << QLatin1String("LayoutItem") + << QLatin1String("ListModel") + << QLatin1String("ListView") + << QLatin1String("Loader") + << QLatin1String("MouseEvent") + << QLatin1String("MouseRegion") + << QLatin1String("NumberAnimation") + << QLatin1String("NumberFormatter") + << QLatin1String("ParallelAnimation") + << QLatin1String("ParentAction") + << QLatin1String("ParentChange") + << QLatin1String("ParticleMotionGravity") + << QLatin1String("ParticleMotionLinear") + << QLatin1String("ParticleMotionWander") + << QLatin1String("Particles") + << QLatin1String("Path") + << QLatin1String("PathAttribute") + << QLatin1String("PathCubic") + << QLatin1String("PathElement") + << QLatin1String("PathLine") + << QLatin1String("PathPercent") + << QLatin1String("PathQuad") + << QLatin1String("PathView") + << QLatin1String("PauseAnimation") + << QLatin1String("PropertyAction") + << QLatin1String("PropertyAnimation") + << QLatin1String("PropertyChanges") + << QLatin1String("Rectangle") + << QLatin1String("Repeater") + << QLatin1String("Rotation") + << QLatin1String("Row") + << QLatin1String("Scale") + << QLatin1String("Script") + << QLatin1String("ScriptAction") + << QLatin1String("SequentialAnimation") + << QLatin1String("SpringFollow") + << QLatin1String("SqlBind") + << QLatin1String("SqlConnection") + << QLatin1String("SqlQuery") + << QLatin1String("State") + << QLatin1String("StateChangeScript") + << QLatin1String("SystemPalette") + << QLatin1String("Text") + << QLatin1String("TextEdit") + << QLatin1String("TextInput") + << QLatin1String("Timer") + << QLatin1String("Transform") + << QLatin1String("Transition") + << QLatin1String("VisualItemModel") + << QLatin1String("WebView") + << QLatin1String("XmlListModel") + << QLatin1String("XmlRole"); + QmlSymbol *QmlLookupContext::resolveBuildinType(const QString &name) { - // FIXME: use a mete-type system here! + // FIXME: use a REAL mete-type system here! if (name == "Rectangle") { QmlBuildInSymbol *rectSymbol = new QmlBuildInSymbol(name); @@ -121,11 +203,8 @@ QmlSymbol *QmlLookupContext::resolveBuildinType(const QString &name) rectSymbol->addMember(new QmlBuildInSymbol("height")); rectSymbol->addMember(new QmlBuildInSymbol("width")); return rectSymbol; - } else if (name == "Item") { + } else if (qmlMetaTypes.contains(name)) { return new QmlBuildInSymbol(name); - } else if (name == "Text") { - QmlBuildInSymbol *textSymbol = new QmlBuildInSymbol(name); - return textSymbol; } else { return 0; }