forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/7.0'
Change-Id: Iab67dffe64bee391bd921ed8832bb17b36ec861b
This commit is contained in:
@@ -1333,7 +1333,17 @@ static bool isIntegerValue(const Value *value)
|
||||
if (value->asNumberValue() || value->asIntValue())
|
||||
return true;
|
||||
if (auto obj = value->asObjectValue())
|
||||
return obj->className() == "Number";
|
||||
return obj->className() == "Number" || obj->className() == "int";
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool isStringValue(const Value *value)
|
||||
{
|
||||
if (value->asStringValue())
|
||||
return true;
|
||||
if (auto obj = value->asObjectValue())
|
||||
return obj->className() == "QString" || obj->className() == "string";
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1349,6 +1359,8 @@ static bool strictCompareConstant(const Value *lhs, const Value *rhs)
|
||||
return false;
|
||||
if (isIntegerValue(lhs) && isIntegerValue(rhs))
|
||||
return false;
|
||||
if (isStringValue(lhs) && isStringValue(rhs))
|
||||
return false;
|
||||
if (lhs->asBooleanValue() && !rhs->asBooleanValue())
|
||||
return true;
|
||||
if (lhs->asNumberValue() && !rhs->asNumberValue())
|
||||
|
Reference in New Issue
Block a user