[libcalamares] Add an "integer-like" predicate for variants
This commit is contained in:
parent
69e3e493de
commit
7842d03ef6
@ -45,6 +45,13 @@ const auto ULongLongVariantType = QMetaType::Type::ULongLong;
|
|||||||
const auto DoubleVariantType = QMetaType::Type::Double;
|
const auto DoubleVariantType = QMetaType::Type::Double;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
inline bool
|
||||||
|
isIntegerVariantType( const QVariant& v )
|
||||||
|
{
|
||||||
|
const auto t = typeOf( v );
|
||||||
|
return t == IntVariantType || t == UIntVariantType || t == LongLongVariantType || t == ULongLongVariantType;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Calamares
|
} // namespace Calamares
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user