mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-01 11:25:36 -04:00
Port away from most cases of Q_FOREACH to C++11 ranged for loop.
In order to avoid deep copies, Qt containers over which we iterate must be const The remaining unported cases require qAsConst (Qt 5.7) or std::as_const (C++17)
This commit is contained in:
parent
b0122f25e5
commit
9f0ca042fe
35 changed files with 105 additions and 92 deletions
|
@ -112,7 +112,8 @@ LicenseViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||
if ( configurationMap.contains( "entries" ) &&
|
||||
configurationMap.value( "entries" ).type() == QVariant::List )
|
||||
{
|
||||
foreach ( const QVariant& entryV, configurationMap.value( "entries" ).toList() )
|
||||
const auto entries = configurationMap.value( "entries" ).toList();
|
||||
for ( const QVariant& entryV : entries )
|
||||
{
|
||||
if ( entryV.type() != QVariant::Map )
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue