forked from qt-creator/qt-creator
QmlJS tooltips: Avoid unhelpful tooltips.
Saying 'unknown' or 'undefined' isn't very useful. Change-Id: I130013a8f025ebc5eb984358f269fdf8a23aae92 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -305,11 +305,12 @@ void HoverHandler::prettyPrintTooltip(const QmlJS::Value *value,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (toolTip().isEmpty()) {
|
if (toolTip().isEmpty()) {
|
||||||
QString typeId = context->valueOwner()->typeId(value);
|
if (!value->asUndefinedValue() && !value->asUnknownValue()) {
|
||||||
if (typeId != QLatin1String("undefined"))
|
const QString typeId = context->valueOwner()->typeId(value);
|
||||||
setToolTip(typeId);
|
setToolTip(typeId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if node refers to a property, its name and defining object are returned - otherwise zero
|
// if node refers to a property, its name and defining object are returned - otherwise zero
|
||||||
static const ObjectValue *isMember(const ScopeChain &scopeChain,
|
static const ObjectValue *isMember(const ScopeChain &scopeChain,
|
||||||
|
|||||||
Reference in New Issue
Block a user