Merge pull request #1437 from gportay/handle-integers-with-octal-or-hexa-prefix
[libcalamares] Handle integers prefixed with 0 or 0x
This commit is contained in:
commit
2cad90d9ca
@ -72,14 +72,7 @@ getInteger( const QVariantMap& map, const QString& key, qint64 d )
|
|||||||
if ( map.contains( key ) )
|
if ( map.contains( key ) )
|
||||||
{
|
{
|
||||||
auto v = map.value( key );
|
auto v = map.value( key );
|
||||||
if ( v.type() == QVariant::Int )
|
result = v.toString().toLongLong(nullptr, 0);
|
||||||
{
|
|
||||||
result = v.toInt();
|
|
||||||
}
|
|
||||||
else if ( v.type() == QVariant::LongLong )
|
|
||||||
{
|
|
||||||
result = v.toLongLong();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user