forked from qt-creator/qt-creator
QmlDesigner: Use isInteger, isFloat in isNumber
Change-Id: I20b81b54c0f7758e9e864ff50174ac2d7527fb38 Reviewed-by: Knud Dollereder <knud.dollereder@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
@@ -2600,10 +2600,7 @@ bool NodeMetaInfo::isNumber() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto type = simplifiedTypeName();
|
return isFloat() || isInteger();
|
||||||
|
|
||||||
return type == "int" || type == "uint" || type == "float" || type == "double"
|
|
||||||
|| type == "real";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3079,7 +3076,7 @@ bool NodeMetaInfo::isInteger() const
|
|||||||
|
|
||||||
auto type = simplifiedTypeName();
|
auto type = simplifiedTypeName();
|
||||||
|
|
||||||
return type == "int" || type == "integer";
|
return type == "int" || type == "integer" || type == "uint";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3101,7 +3098,7 @@ bool NodeMetaInfo::isFloat() const
|
|||||||
|
|
||||||
auto type = simplifiedTypeName();
|
auto type = simplifiedTypeName();
|
||||||
|
|
||||||
return type == "qreal" || type == "double" || type == "float";
|
return type == "qreal" || type == "double" || type == "float" || type == "real";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user