[calamares] Reduce warnings now that getInteger is qint64

This commit is contained in:
Adriaan de Groot 2019-08-21 11:56:49 +02:00
parent 82622373bc
commit 310a1d76cf
4 changed files with 5 additions and 5 deletions

View File

@ -48,11 +48,11 @@ windowDimensionToPixels( const Calamares::Branding::WindowDimension& u )
} }
if ( u.unit() == Calamares::Branding::WindowDimensionUnit::Pixies ) if ( u.unit() == Calamares::Branding::WindowDimensionUnit::Pixies )
{ {
return u.value(); return static_cast< int >( u.value() );
} }
if ( u.unit() == Calamares::Branding::WindowDimensionUnit::Fonties ) if ( u.unit() == Calamares::Branding::WindowDimensionUnit::Fonties )
{ {
return u.value() * CalamaresUtils::defaultFontHeight(); return static_cast< int >( u.value() * CalamaresUtils::defaultFontHeight() );
} }
return 0; return 0;
} }

View File

@ -36,7 +36,7 @@ static CommandLine
get_variant_object( const QVariantMap& m ) get_variant_object( const QVariantMap& m )
{ {
QString command = CalamaresUtils::getString( m, "command" ); QString command = CalamaresUtils::getString( m, "command" );
int timeout = CalamaresUtils::getInteger( m, "timeout", -1 ); qint64 timeout = CalamaresUtils::getInteger( m, "timeout", -1 );
if ( !command.isEmpty() ) if ( !command.isEmpty() )
{ {

View File

@ -152,7 +152,7 @@ void
ContextualProcessJob::setConfigurationMap( const QVariantMap& configurationMap ) ContextualProcessJob::setConfigurationMap( const QVariantMap& configurationMap )
{ {
bool dontChroot = CalamaresUtils::getBool( configurationMap, "dontChroot", false ); bool dontChroot = CalamaresUtils::getBool( configurationMap, "dontChroot", false );
int timeout = CalamaresUtils::getInteger( configurationMap, "timeout", 10 ); qint64 timeout = CalamaresUtils::getInteger( configurationMap, "timeout", 10 );
if ( timeout < 1 ) if ( timeout < 1 )
{ {
timeout = 10; timeout = 10;

View File

@ -69,7 +69,7 @@ void
ShellProcessJob::setConfigurationMap( const QVariantMap& configurationMap ) ShellProcessJob::setConfigurationMap( const QVariantMap& configurationMap )
{ {
bool dontChroot = CalamaresUtils::getBool( configurationMap, "dontChroot", false ); bool dontChroot = CalamaresUtils::getBool( configurationMap, "dontChroot", false );
int timeout = CalamaresUtils::getInteger( configurationMap, "timeout", 10 ); qint64 timeout = CalamaresUtils::getInteger( configurationMap, "timeout", 10 );
if ( timeout < 1 ) if ( timeout < 1 )
{ {
timeout = 10; timeout = 10;