forked from qt-creator/qt-creator
QmlJS: Add more value_casts.
And switch all existing dynamic_casts to value_casts. Change-Id: I93b89358e4802080f40b332074c64f4e91a2bc4c Reviewed-on: http://codereview.qt-project.org/6311 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
@@ -525,7 +525,7 @@ protected:
|
||||
if ((!_name.isEmpty()) && _name.at(0).isUpper()) {
|
||||
// a possible type
|
||||
_targetValue = _scopeChain->lookup(_name, &_scope);
|
||||
if (value_cast<const ObjectValue*>(_targetValue))
|
||||
if (value_cast<ObjectValue>(_targetValue))
|
||||
_typeKind = TypeKind;
|
||||
}
|
||||
}
|
||||
@@ -851,7 +851,7 @@ static void find_helper(QFutureInterface<FindReferences::Usage> &future,
|
||||
FindReferences::Usage searchStarting(replacement, name, 0, 0, 0);
|
||||
|
||||
if (findTarget.typeKind() == findTarget.TypeKind){
|
||||
const ObjectValue *typeValue = value_cast<const ObjectValue*>(findTarget.targetValue());
|
||||
const ObjectValue *typeValue = value_cast<ObjectValue>(findTarget.targetValue());
|
||||
if (!typeValue)
|
||||
return;
|
||||
future.reportResult(searchStarting);
|
||||
|
||||
Reference in New Issue
Block a user