diff --git a/src/plugins/qmljseditor/qmljshoverhandler.cpp b/src/plugins/qmljseditor/qmljshoverhandler.cpp index 59c940d03858dd9c909f7ae64d4799b10c1c28f4..4f0f94c32a0fc8c3179eb5e757104d2b6a543d3e 100644 --- a/src/plugins/qmljseditor/qmljshoverhandler.cpp +++ b/src/plugins/qmljseditor/qmljshoverhandler.cpp @@ -461,10 +461,11 @@ bool HoverHandler::setQmlHelpItem(const ScopeChain &scopeChain, if (const ObjectValue *scope = isMember(scopeChain, node, &name)) { // maybe it's a type? if (!name.isEmpty() && name.at(0).isUpper()) { - AST::UiQualifiedId *qualifiedId = AST::cast<AST::UiQualifiedId *>(node); - const ObjectValue *value = scopeChain.context()->lookupType(qmlDocument.data(), qualifiedId); - if (setQmlTypeHelp(scopeChain, qmlDocument, value, QStringList(qualifiedId->name.toString()))) - return true; + if (AST::UiQualifiedId *qualifiedId = AST::cast<AST::UiQualifiedId *>(node)) { + const ObjectValue *value = scopeChain.context()->lookupType(qmlDocument.data(), qualifiedId); + if (setQmlTypeHelp(scopeChain, qmlDocument, value, QStringList(qualifiedId->name.toString()))) + return true; + } } // otherwise, it's probably a property