[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:
|
case QVariant::Int:
|
||||||
return bp::object( variant.toInt() );
|
return bp::object( variant.toInt() );
|
||||||
|
case QVariant::UInt:
|
||||||
|
return bp::object( variant.toUInt() );
|
||||||
|
|
||||||
case QVariant::LongLong:
|
case QVariant::LongLong:
|
||||||
return bp::object( variant.toLongLong() );
|
return bp::object( variant.toLongLong() );
|
||||||
|
case QVariant::ULongLong:
|
||||||
|
return bp::object( variant.toULongLong() );
|
||||||
|
|
||||||
case QVariant::Double:
|
case QVariant::Double:
|
||||||
return bp::object( variant.toDouble() );
|
return bp::object( variant.toDouble() );
|
||||||
|
|
||||||
|
case QVariant::Char:
|
||||||
case QVariant::String:
|
case QVariant::String:
|
||||||
return bp::object( variant.toString().toStdString() );
|
return bp::object( variant.toString().toStdString() );
|
||||||
|
|
||||||
case QVariant::Bool:
|
case QVariant::Bool:
|
||||||
return bp::object( variant.toBool() );
|
return bp::object( variant.toBool() );
|
||||||
|
|
||||||
|
case QVariant::Invalid:
|
||||||
default:
|
default:
|
||||||
return bp::object();
|
return bp::object();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user