mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 18:05: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
|
@ -44,7 +44,7 @@ Branding::instance()
|
|||
}
|
||||
|
||||
|
||||
QStringList Branding::s_stringEntryStrings =
|
||||
const QStringList Branding::s_stringEntryStrings =
|
||||
{
|
||||
"productName",
|
||||
"version",
|
||||
|
@ -60,14 +60,14 @@ QStringList Branding::s_stringEntryStrings =
|
|||
};
|
||||
|
||||
|
||||
QStringList Branding::s_imageEntryStrings =
|
||||
const QStringList Branding::s_imageEntryStrings =
|
||||
{
|
||||
"productLogo",
|
||||
"productIcon",
|
||||
"productWelcome"
|
||||
};
|
||||
|
||||
QStringList Branding::s_styleEntryStrings =
|
||||
const QStringList Branding::s_styleEntryStrings =
|
||||
{
|
||||
"sidebarBackground",
|
||||
"sidebarText",
|
||||
|
@ -268,7 +268,7 @@ void
|
|||
Branding::setGlobals( GlobalStorage* globalStorage ) const
|
||||
{
|
||||
QVariantMap brandingMap;
|
||||
foreach ( const QString& key, s_stringEntryStrings )
|
||||
for ( const QString& key : s_stringEntryStrings )
|
||||
brandingMap.insert( key, m_strings.value( key ) );
|
||||
globalStorage->insert( "branding", brandingMap );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue