mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 18:35:37 -04:00
[libcalamares] Reduce warnings
- improve variable names, don't shadow
This commit is contained in:
parent
c13c7c4891
commit
5279e78c9f
1 changed files with 6 additions and 6 deletions
|
@ -45,21 +45,21 @@ static CommandLine get_variant_object( const QVariantMap& m )
|
||||||
static CommandList_t get_variant_stringlist( const QVariantList& l )
|
static CommandList_t get_variant_stringlist( const QVariantList& l )
|
||||||
{
|
{
|
||||||
CommandList_t retl;
|
CommandList_t retl;
|
||||||
unsigned int c = 0;
|
unsigned int count = 0;
|
||||||
for ( const auto& v : l )
|
for ( const auto& v : l )
|
||||||
{
|
{
|
||||||
if ( v.type() == QVariant::String )
|
if ( v.type() == QVariant::String )
|
||||||
retl.append( CommandLine( v.toString(), CommandLine::TimeoutNotSet ) );
|
retl.append( CommandLine( v.toString(), CommandLine::TimeoutNotSet ) );
|
||||||
else if ( v.type() == QVariant::Map )
|
else if ( v.type() == QVariant::Map )
|
||||||
{
|
{
|
||||||
auto c( get_variant_object( v.toMap() ) );
|
auto command( get_variant_object( v.toMap() ) );
|
||||||
if ( c.isValid() )
|
if ( command.isValid() )
|
||||||
retl.append( c );
|
retl.append( command );
|
||||||
// Otherwise warning is already given
|
// Otherwise warning is already given
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cWarning() << "Bad CommandList element" << c << v.type() << v;
|
cWarning() << "Bad CommandList element" << count << v.type() << v;
|
||||||
++c;
|
++count;
|
||||||
}
|
}
|
||||||
return retl;
|
return retl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue