[libcalamares] More variant->python translations
- There's still 49 enumeration values not handled, leading to an annoying Clang warning, but there's just no **point** in listing them all: that's what 'default' is for.
This commit is contained in:
parent
42d00ffe38
commit
b04d59ba2e
@ -40,19 +40,25 @@ variantToPyObject( const QVariant& variant )
|
||||
|
||||
case QVariant::Int:
|
||||
return bp::object( variant.toInt() );
|
||||
case QVariant::UInt:
|
||||
return bp::object( variant.toUInt() );
|
||||
|
||||
case QVariant::LongLong:
|
||||
return bp::object( variant.toLongLong() );
|
||||
case QVariant::ULongLong:
|
||||
return bp::object( variant.toULongLong() );
|
||||
|
||||
case QVariant::Double:
|
||||
return bp::object( variant.toDouble() );
|
||||
|
||||
case QVariant::Char:
|
||||
case QVariant::String:
|
||||
return bp::object( variant.toString().toStdString() );
|
||||
|
||||
case QVariant::Bool:
|
||||
return bp::object( variant.toBool() );
|
||||
|
||||
case QVariant::Invalid:
|
||||
default:
|
||||
return bp::object();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user