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:
Adriaan de Groot 2020-06-17 17:32:19 +02:00 committed by GitHub
commit 2cad90d9ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;